Changeset 2137 in MondoRescue for branches/2.2.8/mondo/src/restore-scripts
- Timestamp:
- Feb 2, 2009, 5:07:34 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.8/mondo/src/restore-scripts/mondo/grub-MR
r2095 r2137 18 18 BOOTPATHNAME="" 19 19 for sz in /boot / ; do 20 bootpart=`grep " $sz " $2 | cut -d' ' -f1 | head -n1`21 [ "$bootpart" ] && [ -e "/mnt/RESTORING/$bootpart" ] && break20 bootpart=`grep " $sz " $2 | cut -d' ' -f1 | head -n1` 21 [ "$bootpart" ] && [ -e "/mnt/RESTORING/$bootpart" ] && break 22 22 done 23 23 [ ! "$bootpart" ] && Die "Cannot find boot partition in mountlist" 24 24 25 25 if [ "$sz" = "/boot" ] ; then 26 BOOTPATHNAME=/grub26 BOOTPATHNAME=/grub 27 27 else 28 BOOTPATHNAME=/boot/grub28 BOOTPATHNAME=/boot/grub 29 29 fi 30 30 if [ -e "$MNT_RESTORING/boot/grub/stage1" ] ; then 31 echo "Alright then."32 return31 echo "Alright then." 32 return 33 33 fi 34 34 35 35 cd $MNT_RESTORING 36 36 for i in usr/lib/grub/* ; do 37 echo "Checking $i"37 echo "Checking $i" 38 38 if [ -e "$i/stage1" ] ; then 39 BOOTPATHNAME=/$i40 mkdir -p /boot/grub41 cp -au $i/* /boot/grub/42 echo "BOOTPATHNAME is now $BOOTPATHNAME"43 return 044 fi39 BOOTPATHNAME=/$i 40 mkdir -p /boot/grub 41 cp -au $i/* /boot/grub/ 42 echo "BOOTPATHNAME is now $BOOTPATHNAME" 43 return 0 44 fi 45 45 done 46 46 cd / … … 114 114 if echo $bootpart | grep "/cciss/" > /dev/null ; then 115 115 partno=`basename $bootpart | cut -d'p' -f2` 116 elif echo $bootpart | grep "/mapper/mpath" > /dev/null ; then 117 partno=`basename $bootpart | cut -d'p' -f2` 116 118 else 117 119 partno=`basename $bootpart | sed s/[a-z]*//` … … 164 166 [ "$res" -eq "0" ] && exit 0 165 167 166 #echo "Now I'll use grub-install" >> $LOGFILE167 #chroot /mnt/RESTORING grub-install $1 >> $LOGFILE168 #res=$?169 #echo "grub-install returned $res" >> $LOGFILE170 #[ "$res" -eq "0" ] && exit 0171 172 168 echo "grub-MR returned res=$res" >> $LOGFILE 173 169
Note:
See TracChangeset
for help on using the changeset viewer.