how_kexecboot_works

andrea-adami edited this page Oct 21, 2015 · 4 revisions

How kexecboot works

Submitted by Jay7 on Wed, 04/20/2011 - 11:55

  • Devices bootloader is loading and starting kexecboot kernel
  • Kernel is starting kexecboot binary as init process from initramfs
  • Kexecboot then does following:
  • enumerate /proc/partitions entries (except partitions smaller than 200Kb);
  • if devices-recreating feature is enabled then remove device node from /dev and mknod' it again;
  • check every partitions for known (using fstype routine from klibc) and supported (using /proc/filesystems) filesystem;
  • try to mount partitions and look for boot.cfg;
  • if boot.cfg exists then read and parse it else check for default kernels (/boot/[zu]Image, /[zu]Image);
  • sort items found by PRIORITY;
  • show menu and wait for selection;
  • run kexec binary to load and boot selected kernel;

Notes

  • There is 'undocumented' support for 'machine-kernel'. When enabled, kexecboot will look into /proc/cpuinfo for 'Hardware' line, lowercase it, replace spaces by _, then prepend it with /boot/zImage- string. This path will be used to look for kernel as well when no boot.cfg is found. This 'feature' is obsoleted. If you are using this feature please let us know.
  • Currently fstype routine can recognize following FS'es and devices content: gzip, cramfs, romfs, xfs, ext4, squashfs, ext3, ext2, minix, jffs2, vfat, nilfs2, ocfs2, reiserfs, reiser4, gfs2, jfs, iso9660, luks, lvm2, swap, suspend.
  • uImage and zImage support is controlled by –with-zimage and –with-uimage configure options
  • kexec binary should reside in /usr/sbin/kexec
  • kexec will load kernel with following cmdline: root= rootfstype= rootwait mtdparts= fbcon=
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.