newbie question: kexec linux-based bootstrap

David N. Lombard dnlombar at ichips.intel.com
Tue Jan 13 11:43:11 EST 2009


On Tue, Jan 13, 2009 at 07:42:57AM -0800, Bizhan Gholikhamseh (bgholikh) wrote:
> > On IA using kexec-tools 2.0.0, use a command like this to load the
> kernel:
> > 
> >     kexec -l bzImage --initrd=initrd.img
> --command-line="kernel-cmd-args"
> > 
> > where
> > 	bzImage is the kernel's bzImage file
> > 	initrd.img is the initrd image file
> > 	kernel-cmd-args are the kernel's command line args
> > 
> > Then, boot the kernel with:
> > 
> >     kexec -e
> 
> We are using ramdisk instead of initrd, do you know what arguments I
> need to pass to point to the ramdisk install on a partition on SATA
> disk: e.g /dev/sda2?

I'm not sure what you mean by "ramdisk install on ... SATA disk".

If you want to just try kexec, take look at your current boot
configuration file, e.g., /boot/grub/grub.conf.  For example, on my F7
system, I have the following stanza:

  title Fedora (2.6.23.15-80.fc7)
    root (hd0,0)
    kernel /vmlinuz-2.6.23.15-80.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
    initrd /initrd-2.6.23.15-80.fc7.img

I could boot that as follows:

  kexec -l /boot/vmlinuz-2.6.23.15-80.fc7 \
    --initrd=/boot/initrd-2.6.23.15-80.fc7.img \
    --command-line="ro root=/dev/VolGroup00/LogVol00 rhgb quiet"
  kexec -e

Alternatively, to boot a diskless kernel/initrd, I might use

  kexec -l vmlinuz --initrd=initrd.img --command-line="root=/dev/ram rw"
  kexec -e

-- 
David N. Lombard, Intel, Irvine, CA
I do not speak for Intel Corporation; all comments are strictly my own.



More information about the kexec mailing list