Avoiding ejecting the diskette...

Jens Ruehmkorf ruehmkorf at informatik.Uni-Koeln.DE
Tue Sep 4 03:35:28 CEST 2001


> We are thinking to always boot on the FAI diskette, testing with a
> bootp request if a FAI installation is really requested and, if not,
> transfer the control from the running FAI Linux to the Linux on the
> hard disk. It is this last stage we don't know about... A kind of lilo
> we could exec from a running Linux...

What you want is to boot Linux from Linux; there are several projects that
work on that: with kexec -- like exec ;) -- from LinuxBIOS [1], with
bootimg [2] or with Two Kernel Monte. I haven't tested kexec nor two
kernel monte yet but they are reported to work (you might want to have an
eye on the linux-kernel list when using them). Still with bootimg it's
pretty neat to see linux boot your linux ;)

If you don't have the time to test those out you could still use 2.4.x and
work with initrd and pivot_root to switch root. Then you have at least the
new root on your harddrive available. Remark: pivot_root has changed
significantly from the old chroot. See the documentation provided within
the kernel-sources and the other documentation that is mentioned therein.

> By exterior control, we test if the PC is OK and, if not, set up the bootp
> server to ignite a FAI re-install.

So you don't even need a boot-disk. Use a custom initrd that is loaded
every time during bootup and talks to your dhcp-server to decide whether
it shall install or continue booting.

For Debian 3.0 you get a pretty good idea to start from if you simply
install the kernel-image-2.4.x from Herbert Xu and fiddle around with the
provided initrd. We used a dhcp-client within an initrd for our network
automated installation nais. Take a look at the scripts and the docs at
http://www.informatik.uni-koeln.de/nais/ to see how it's done.

> By the way, is there on PC an equivalent of a watchdog reset as on Sun
> computers that would reboot the PC if the OS hangs ?

See linux/Documentation/watchdog.txt for some PC-solutions that have
drivers for linux. I have no experience with watchdog-cards for linux, so
please report what else you find out!

> In fact, having access to the eeprom on a Sun is very useful to do all
> these kind of dirty tricks and it is a pity not having a equivalent
> standard on the PCs... :-(

Well that's the disadvantage of having so many vendors (for i386) to
choose from :( But you could try a little tool we used for our automatic
installation: download nais from the homepage and extract cmosifier,
follow the directions provided there. We used it on our cluster-clients to
alter bios-settings, thus switching between harddisk and network boot.

Regards,
Jens

[1] http://www.acl.lanl.gov/linuxbios/papers/als00/lobos.ps and
    http://www.uwsg.indiana.edu/hypermail/linux/kernel/0011.1/0281.html
[2] ftp://icaftp.epfl.ch/pub/people/almesber/misc/bootimg-8.tar.gz
[3] http://www.scyld.com/products/beowulf/software/monte.html

--
ruehmkorf at informatik dot uni hyphen koeln dot de



More information about the linux-fai mailing list