Forum archive
TKL Rescue Live CD
A recent issue with my headless PVE server at work (which required me to manually connect a video card, moniter, mouse and keyboard to access and repair it) have prompted an idea:
This first part isn't a new idea; I'd like to create a TKLPatch for a TKL Rescue liveCD/USB. The ISO could be downloaded and burned straight to CD/USB as per usual (for commandline rescue of any system).
But (wait for it, this is the exciting bit... at least in my mind) what would be even more awesome would be if it had an accompanying script which could leverage TKLPatch to prepopulate network configuration info, root password, etc so that headless servers could be fully accessed really easily via SSH (no need for me to open the box and fit a vid card etc).
I was going to start having a play with this idea but I have hit a stumbling block straight off the bat :( The CD defaults to install on boot rather than run live (which I know I assisted in suggesting it to be that way, way back when... but...). Is there an easy way I could change that back?
Another question; normally a LiveCD doesn't have/need a password, but for SSH connection to work I'm assuming that you'd need to have one wouldn't you? How would one go about doing that? I haven't done much research yet but happy to be pointed to links if you have anything relevant.
You know, a TurnKey-based rescue live CD sounds like an awesome idea for a new project. And a really good way to learn more about TurnKey internals/Linux to boot.
Regarding the technical questions:
Take a look at /usr/share/initramfs-tools/casper-bottom to see what kind of environment is setup when in "live mode". Casper is what Ubuntu calls the set of scripts that sets up the live cd environment.
Initramfs is the temporary RAM filesystem from which the rest of the system is bootstrap by the kernel. It contains basic drivers (e.g., for accessing storage devices where the operating system might reside) for example.
If you patch/add a script to the /usr/share/initramfs-tools directory you can create a new initramfs by running this command inside the chroot environment:
The new initramfs is stored to /boot/initrd.img which you have to copy to the cdroot/casper/initrd.gz for it to be run by the ISO/CD bootloader in Live CD mode.
You'll probably have to experiment a bit to understand the exact details but this should get you started.