Initramfs/Inspecting: Difference between revisions
Appearance
m Link to boot process, adjust initramfs generation step (no full install necessary) |
Update to osk-sdl integration, use note template |
||
Line 1: | Line 1: | ||
{{note|This is considered a security hole. Only use it for debugging, and uninstall the usb-shell hook afterwards}} | |||
{{note|The port is for historic reasons, we used to have another telnet daemon on <code>:23</code>}} | |||
This page explains how to connect to your device when it has booted to the [[Initramfs-development|initramfs]] by installing the so-called [https://github.com/postmarketOS/pmbootstrap/blob/master/aports/main/postmarketos-mkinitfs-hook-usb-shell/20-usb-shell.sh 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. | This page explains how to connect to your device when it has booted to the [[Initramfs-development|initramfs]] by installing the so-called [https://github.com/postmarketOS/pmbootstrap/blob/master/aports/main/postmarketos-mkinitfs-hook-usb-shell/20-usb-shell.sh 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. | ||
It is possible to enable a telnet daemon on <code>:24</code> that gives you a shell this way: | |||
It is possible to enable a | |||
<source lang="shell">./pmbootstrap.py initfs hook_add usb-shell | <source lang="shell">./pmbootstrap.py initfs hook_add usb-shell | ||
./pmbootstrap.py initfs | ./pmbootstrap.py initfs | ||
./pmbootstrap.py flasher boot # or however you flash/boot the kernel</source> | ./pmbootstrap.py flasher boot # or however you flash/boot the kernel | ||
telnet 172.16.42.1 24</source> | |||
If the telnet command does not work out of the box, read the detailed description on [[Boot_process|how to connect to your device via USB networking]]. | |||
=== Tips and tricks === | === Tips and tricks === | ||
* [http://www.microhowto.info/howto/copy_a_file_from_one_machine_to_another_using_netcat.html copy files to/from the initramfs with <code>nc</code> while it is running] | * [http://www.microhowto.info/howto/copy_a_file_from_one_machine_to_another_using_netcat.html copy files to/from the initramfs with <code>nc</code> while it is running] |
Revision as of 00:15, 15 October 2017
This is considered a security hole. Only use it for debugging, and uninstall the usb-shell hook afterwards |
The port is for historic reasons, we used to have another telnet daemon on :23 |
This page explains how to connect to your device when it has booted to the initramfs 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.
It is possible to enable a telnet daemon on :24
that gives you a shell this way:
./pmbootstrap.py initfs hook_add usb-shell
./pmbootstrap.py initfs
./pmbootstrap.py flasher boot # or however you flash/boot the kernel
telnet 172.16.42.1 24
If the telnet command does not work out of the box, read the detailed description on how to connect to your device via USB networking.