[Fai-commit] r6510 - trunk/examples/simple/scripts/CENTOS

Thomas Lange lange at alioth.debian.org
Wed Apr 27 14:21:19 UTC 2011


Author: lange
Date: 2011-04-27 14:21:05 +0000 (Wed, 27 Apr 2011)
New Revision: 6510

Modified:
   trunk/examples/simple/scripts/CENTOS/40-install-grub
Log:
use /dev from nfsroot, define device in grub


Modified: trunk/examples/simple/scripts/CENTOS/40-install-grub
===================================================================
--- trunk/examples/simple/scripts/CENTOS/40-install-grub	2011-04-27 14:17:51 UTC (rev 6509)
+++ trunk/examples/simple/scripts/CENTOS/40-install-grub	2011-04-27 14:21:05 UTC (rev 6510)
@@ -14,20 +14,26 @@
 bootdev=`device2grub $BOOT_DEVICE`
 bootpart=`device2grub $BOOT_PARTITION`
 version=`$ROOTCMD rpm -qv kernel | cut -d- -f2-`
+
 if grep '[[:space:]]/boot[[:space:]]' $LOGDIR/fstab; then
 	bootdir=''
 else
 	bootdir='/boot'
 fi
 
+mount -o bind /dev $target/dev
+
 $ROOTCMD grub-install --just-copy
 
-$ROOTCMD grub --no-floppy --batch <<-EOF
+$ROOTCMD grub --device-map=/dev/null --no-floppy --batch <<-EOF
+	device $bootdev $BOOT_DEVICE
 	root $bootpart
 	setup $bootdev
 	quit
 	EOF
 
+umount $target/dev
+
 ln -s ./menu.lst $target/boot/grub/grub.conf
 
 if [ -f $target/boot/grub/splash.xpm.gz ]; then




More information about the Fai-commit mailing list