All pastes #440825 Raw Edit

Mine

public text v1 · immutable
·published 2007-04-15 09:41 UTC
rendered paste body
Index: write-bootloader-config.sh
===================================================================
--- write-bootloader-config.sh  (revision 3267)
+++ write-bootloader-config.sh  (working copy)
@@ -85,10 +85,10 @@
 winparts2=`fdisk -l 2>/dev/null| grep '[N,n][T,t][F,f][S,s]' | cut -c6-10`
 for x in $winparts2; do
        cnt2=$((`echo $w | cut -c4-5`-1))
+       [ "$cnt2" -lt "0" ] && cnt2=0
        echo "title Windows NT/2k/XP on $x" >> $INST_ROOT/boot/grub/grub.conf
-       echo "root (hd0,$cnt2)" >> $INST_ROOT/boot/grub/grub.conf
+       echo "rootnoverify (hd0,$cnt2)" >> $INST_ROOT/boot/grub/grub.conf
        echo "chainloader +1" >> $INST_ROOT/boot/grub/grub.conf
-       echo "makeactive" >> $INST_ROOT/boot/grub/grub.conf
        echo " " >> $INST_ROOT/boot/grub/grub.conf
 done
 
@@ -96,10 +96,10 @@
 winparts1=`fdisk -l 2>/dev/null| grep '[F,f][A,a][T,t]32' | cut -c6-10`
 for w in $winparts1; do
        cnt1=$((`echo $w | cut -c4-5`-1))
+       [ "$cnt1" -lt "0" ] && cnt1=0
        echo "title Windows 95/98/ME on $w" >> $INST_ROOT/boot/grub/grub.conf
-       echo "root (hd0,$cnt1)" >> $INST_ROOT/boot/grub/grub.conf
+       echo "rootnoverify (hd0,$cnt1)" >> $INST_ROOT/boot/grub/grub.conf
        echo "chainloader +1" >> $INST_ROOT/boot/grub/grub.conf
-       echo "makeactive" >> $INST_ROOT/boot/grub/grub.conf
        echo " " >> $INST_ROOT/boot/grub/grub.conf
 done