Fix for non root boot partitions.

P.S.S.Camp P.S.S.Camp at kent.ac.uk
Thu Apr 14 14:43:42 CEST 2005


I have tested this on machines with /boot partitions and machines with
/boot on / and it now seems to work for both cases.

--- /usr/share/doc/fai/examples/simple/files/boot/grub/menu.lst/postinst
2005-04-06 15:32:08.000000000 +0100
+++ /usr/local/share/fai/files/boot/grub/menu.lst/postinst	2005-04-13
17:33:30.957353347 +0100
@@ -5,11 +5,11 @@
 set -a
 [ -r $target/etc/fai/disk_var.sh ] && . $target/etc/fai/disk_var.sh

-# if class NOMBR is defined, write boot loader into root partition, not
into mbr
-ifclass NOMBR && BOOT_DEVICE=$ROOT_PARTITION
+# if class NOMBR is defined, write boot loader into boot partition, not
into mbr
+ifclass NOMBR && BOOT_DEVICE=$BOOT_PARTITION

 grub-install --no-floppy --root-directory=$target $BOOT_DEVICE
-GROOT=$(device2grub $ROOT_PARTITION)
+GROOT=$(device2grub $BOOT_PARTITION)
 perl -pi -e 's/#(\w+)#/$ENV{$1}/' $2
 $ROOTCMD /sbin/update-grub
 echo "Grub installed on $BOOT_DEVICE on $GROOT"


Phill.
-- 
Senior Computer Science Computing Officer
University Of Kent At Canterbury
Computer Science Systems <http://www.cs.kent.ac.uk/systems/>
The Mirror Service  <http://www.mirrorservice.org/>



More information about the linux-fai mailing list