Posts Tagged ‘kexec’

Super Kexec Disk mockup

noviembre 29, 2014

Yet another mockup.

Kexec let’s you boot into another Linux kernel from a live or running Linux kernel. So that makes things interesting because you can use a live kernel from a live cd in order to boot into another one but, just before it, you have a full GNU/Linux with their tools.

I had already known about kexec but I wasn’t aware that it was so useful. I thought the main purpose would be to update your kernel without having to reboot your machine.

After writing my Kernel box disk idea article I discussed it in Super Grub irc channel. Bfree and Smx explained me about Kexec and what you could do with it.

I haven’t used kexec myself yet and I don’t fully understand how an initrd is built depending on kernel modules you need on boot to mount root’s partition. So, some ideas you see here might be not right.


So Super Kexec App scans all your installed distributions thanks to the great variety of modules included in the Super Kexec Disk live cd. You are prompted to choose to the distribution you want to boot into.

Super Kexec Disk mockup - Distros Detected

Super Kexec Disk mockup – Distros Detected

Once you have selected which distribution you want to boot you are given the opportunity to choose which modules should have your initrd (will be created on the fly for being your kernel companion). Super Kexec app suggests you initially which modules you will need so that the Kernel knows how to mount its root partition from it.

Super Kexec Disk mockup - Modules detected

Super Kexec Disk mockup – Modules detected

Once you have decided which modules will needed to be loaded you can fine-tune the kernel boot parametres. Super Kexec App will have selected the current Super Kexec Disk boot options for you. If you already forced Super Kexec Disk to boot into nomodeset it’s highly probable that you want your booted system to have that option too. From this screen you will also be able to blacklist kernel modules (just in case some of them hang your system on boot) or force an specific systemd target (runlevel).

Super Kexec Disk mockup - Boot parametres

Super Kexec Disk mockup – Boot parametres

Finally a summary about what you are going to do is prompted and you can:

  • Boot into your Linux Kernel + Generated Initrd
  • Review the settings if you made a mistake
  • Exit from the Super Kexec App
Super Kexec Disk mockup - Summary

Super Kexec Disk mockup – Summary

Finally there should be another option named: Force this boot into the distribution so that:

  • Initrd is copied into /boot directory
  • /etc/grub.d/08_super_kexec is created
  • 08_super_kexec defines an entry to boot your kernel and the generated initrd with the choosen boot parametres

and somehow it should guess that Grub2 might need to be reinstalled into the MBR with enforced LVM+RAID capabilites if needed.

So that’s it, once you have a system that can modify another and at the same you can boot a system from it it sounds a bit like Rescatux and a bit like Super Grub2 Disk. Not everyday we see a system like this.

Am I going to implement Super Kexec App as a Rescatux application (instead of doing an only Super Kexec Disk as this mockup describes)?

Don’t think so. Making a Rescatux option to rebuild an initrd with several modules from your chroot and then add some Grub2 entries to boot into it. Yes, that make sense when you somehow manage to remove LVM support from your initrd while your root partition is in LVM. (Or you copy-and-paste a Distribution from Ext4 to LVM).

Not in the short term I will implement it.

If you think about any useful use case or task that might make worth implementing these option please drop a comment so that I am aware of it.

Anuncio publicitario