Discussion:
[Sisuite-devel] kboot support for SystemConfigurator (was Re: SystemImager for ppc/ppc64)
Bernard Li
2007-06-11 01:10:23 UTC
Permalink
any chance you can help adding support for kboot to systemconfigurator? We'd
need a module similar to Grub.pm which builds the kboot config file.
I suppose I could, when I have more time later. I guess the hard part
is figuring out that the client uses kboot as the boot loader -- how
would we determine that? The kboot configuration is typically stored
in /etc/kboot.conf, so would checking for the presence of this file be
a valid check -- how does SystemConfigurator usually check to see what
bootloader a client currently uses?

On a related note, David Lombard has a patch for kboot which will
allow it to parse standard grub.conf and make kboot boot with that
configuration (instead of requiring kboot.conf).
I have no idea how kboot works and have no toy to try it with. Can you
describe that? Is it a config file? Where located? How do you install it? How
do you make kboot look at your config file?
Kboot is a bootloader based on kexec. Basically kboot boots up a
Linux kernel with some additional user space tools (from busybox or
other sources) then it will read the kboot configuration and use kexec
to boot the kernel in your HD (or anywhere else).

A sample configuration looks like:

http://www.terrasoftsolutions.com/support/solutions/ydl_5.0/video-config.shtml

As you can see, it is fairly simple.

Currently, my image already has a kboot.conf, so I tell
systemconfigurator not to setup the bootloader, and it works fine.
However, that means I need to modify the configuration file if I make
changes to my partitions etc. -- having systemconfigurator dynamically
generate it would be a plus but not a very high priority for me right
now.

Cheers,

Bernard
Erich Focht
2007-06-12 15:23:55 UTC
Permalink
Hi Bernard,

thanks for the details. This sounds doable.
Post by Bernard Li
any chance you can help adding support for kboot to systemconfigurator? We'd
need a module similar to Grub.pm which builds the kboot config file.
I suppose I could, when I have more time later. I guess the hard part
is figuring out that the client uses kboot as the boot loader -- how
would we determine that? The kboot configuration is typically stored
in /etc/kboot.conf, so would checking for the presence of this file be
a valid check -- how does SystemConfigurator usually check to see what
bootloader a client currently uses?
Is there anything else than /etc/kboot.conf which could be used for
recognising that we have kboot? Is there any tool to tell the
kboot environment from which partition the kboot.conf should be read? Is
/etc/kboot.conf really allways there? In systemconfigurator lib/Boot/*.pm
there are two footprint routines, one detects the config file
(footprint_config) and the other one is supposed to detect the loader
(footprint_loader). Is there anything like a loader (like grub-install, lilo,
etc.) in kboot?
Post by Bernard Li
On a related note, David Lombard has a patch for kboot which will
allow it to parse standard grub.conf and make kboot boot with that
configuration (instead of requiring kboot.conf).
I have no idea how kboot works and have no toy to try it with. Can you
describe that? Is it a config file? Where located? How do you install it? How
do you make kboot look at your config file?
Kboot is a bootloader based on kexec. Basically kboot boots up a
Linux kernel with some additional user space tools (from busybox or
other sources) then it will read the kboot configuration and use kexec
to boot the kernel in your HD (or anywhere else).
So where does the kboot.conf reside? On a special partition? How does kboot
find it?

Thanks,
best regards,
Erich
Bernard Li
2007-06-12 16:23:19 UTC
Permalink
Post by Erich Focht
Is there anything else than /etc/kboot.conf which could be used for
recognising that we have kboot? Is there any tool to tell the
kboot environment from which partition the kboot.conf should be read? Is
/etc/kboot.conf really allways there? In systemconfigurator lib/Boot/*.pm
there are two footprint routines, one detects the config file
(footprint_config) and the other one is supposed to detect the loader
(footprint_loader). Is there anything like a loader (like grub-install, lilo,
etc.) in kboot?
kboot doesn't require a loader, it simply needs to read the
configuration files (/etc/kboot.conf) and these could reside in
numerous places. Typically the media which your kboot kernel resides,
there is a etc/ dir which contains kboot.conf, fstab, and other
configuration files for setting up that minimal kernel (ip address,
etc.). After the initial kernel is booted, it will try to scan for
kboot.conf in your USB media and/or HD (it searches for a bootable
partition) and will kexec the new kernel according to kboot.conf.

This is at least the mechanism that the PS3 kboot uses -- it may
deviate slightly from the official kboot -- I am hoping to get these
efforts merged.

kboot for PS3 can be found here:

http://www.kernel.org/pub/linux/kernel/people/geoff/cell/CELL-Linux-CL_20070516-ADDON/src/

I am working on implementing a "netboot" for kboot, so that it will
work similarly to pxelinux/syslinux. However, I need your help to
update netbootmgr so that it can handle both pxelinux and kboot
simultaneously.

Please let me know if you have any other questions.

Cheers,

Bernard
Erich Focht
2007-06-18 08:41:19 UTC
Permalink
Hi Bernard,
Post by Bernard Li
I am working on implementing a "netboot" for kboot, so that it will
work similarly to pxelinux/syslinux. However, I need your help to
update netbootmgr so that it can handle both pxelinux and kboot
simultaneously.
AFAIK you have things like wget, tftp and busybox available in kboot, which
means the most appropriate way of supporting netbooting would be to use the
same config file, as for syslinux/pxelinux, try downloading that via tftp from
the next-server (provided by dhcp) or the server which provided you the
address, and look for the file as pxeboot does: under
pxelinux.cfg/MAC-Address, pxelinux.cfg/HEXADDRESS or
pxelinux.cfg/default. Then parse the downloaded config file, locate kernel,
initrd, download them by tftp and generate on the fly a kexec command. I
wonder whether this doesn't exist already. Anyway, if you do it this way,
there will be no difference for managing kboot network booting and normal
pxeboots.

Regards,
Erich
Bernard Li
2007-06-18 16:08:31 UTC
Permalink
Hi Erich:

Yes, this is what I'm doing -- kboot does not have wget by default --
I guess you could enable it.

Since the configuration for kboot are different from pxelinux, they
reside in a different directory (i.e. /tftpboot/kboot.cfg) --
therefore netbootmgr needs to be modified to support either, or both.

Regards,

Bernard
Post by Erich Focht
Hi Bernard,
Post by Bernard Li
I am working on implementing a "netboot" for kboot, so that it will
work similarly to pxelinux/syslinux. However, I need your help to
update netbootmgr so that it can handle both pxelinux and kboot
simultaneously.
AFAIK you have things like wget, tftp and busybox available in kboot, which
means the most appropriate way of supporting netbooting would be to use the
same config file, as for syslinux/pxelinux, try downloading that via tftp from
the next-server (provided by dhcp) or the server which provided you the
address, and look for the file as pxeboot does: under
pxelinux.cfg/MAC-Address, pxelinux.cfg/HEXADDRESS or
pxelinux.cfg/default. Then parse the downloaded config file, locate kernel,
initrd, download them by tftp and generate on the fly a kexec command. I
wonder whether this doesn't exist already. Anyway, if you do it this way,
there will be no difference for managing kboot network booting and normal
pxeboots.
Regards,
Erich
Loading...