Patch to add re-Install menu entry for grub/menu.lst
Niklaus Giger
ngiger at mus.ch
Thu Jul 24 22:12:19 CEST 2003
Hi
As I stated in a prior message I was looking for a simple way to re-install
using FAI. As I have just a small home network to maintain (which takes much
too many hours to make my wife happy) I came to the conclusion that a good
idea in this context is to give the choice to the user when starting up the
computer (which may be not the case in a different/larger setup).
It is not much tested but works in my environment. Is there any interest in
accepting this patch for fai-2.5 (or later). If so I am willing to improve on
it (adding a option for it in fai.conf or whatever file is considered good
for this purpose) and add a patch along the same line for lilo also.
Index: scripts/BOOT
===================================================================
--- scripts/BOOT (revision 11)
+++ scripts/BOOT (working copy)
@@ -67,6 +67,16 @@
kernel $kernelname
$initrdopt
EOF
+
+ # BOOT_IMAGE is set if BOOT-Parameters set by DCHP
+ if [[ "$BOOT_IMAGE" == "" ]] ; then BOOT_IMAGE=vmlinuz-`uname -r` ; fi
+ echo "Now BOOT_IMAGE is $BOOT_IMAGE"
+[ -f /boot/$BOOT_IMAGE ] && cp -v /boot/$BOOT_IMAGE $target/boot && cat >>
$target/boot/grub/menu.lst <<-EOF
+ title Debian GNU/Linux, Fully Automatic re-Installation
+ root $broot
+ kernel /boot/$BOOT_IMAGE root=/dev/nfs ip=dhcp FAI_FLAGS=$FAI_FLAGS
FAI_LOCATION=$FAI_LOCATION
+EOF
+
if ifclass BOOTWINDOWS; then
cat >> $target/boot/grub/menu.lst <<-EOF
Thanks a lot for everybody for their work on FAI. It really rocks once you get
to know a few things about it.
Best regards
--
Niklaus Giger
Wieshoschet 6
CH-8753 Mollis
Tel. ++41 55 612 20 54 (privat)
Tel. ++41 55 618 64 68 (Geschäft)
More information about the linux-fai
mailing list