postmarketOS

Inspecting the initramfs

This page explains how to connect to your device when it has booted to the [[initramfs|Initramfs-development]] by installing the so-called usb-shell hook. This is useful if you want to know more about the [[boot process]], simply inspect the initramfs or you want to debug why something doesn't work.

NOTE: This is considered a security hole. Only use it for debugging, and uninstall the usb-shell hook afterwards

By default, initramfs launchs a telnet daemon listening on :23 waiting for your partition password.

It is possible to enable a second telnet daemon on :24 that gives you a shell this way:

./pmbootstrap.py initfs hook_add usb-shell
./pmbootstrap.py install

After reflashing the kernel or booting with the new initramfs image, you should be able to connect to the new telnet instance.