Changeset 2451 in MondoRescue
- Timestamp:
- Oct 6, 2009, 1:34:09 AM (15 years ago)
- Location:
- branches/2.2.10
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.10/mindi/mindi
r2446 r2451 1488 1488 LogAll "----------- syslinux's errors --------------" |tee -a $LOGFILE 1489 1489 cat $MINDI_TMP/syslinux.log |tee -a $LOGFILE 1490 echo "----------- syslinux's conf --------------" |tee -a $LOGFILE 1491 cat $MINDI_TMP/usb/syslinux.cfg |tee -a $LOGFILE 1490 1492 LogAll "Failed to create USB image." 1491 1493 else … … 1695 1697 return 0 1696 1698 fi 1697 free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`1698 1699 max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`)) 1699 1700 LogFile "Free space left on image = $free_space KB" … … 1790 1791 return 0 1791 1792 fi 1792 free_space=`df -k -P $mountpoint | tail -n1 | tr -s ' ' '\t' | cut -f4`1793 1793 max_kernel_size=$(($free_space+`du -sk $kernelpath | cut -f1`)) 1794 1794 LogFile "Free space left on image = $free_space KB" … … 2035 2035 res=`$FDISK -s $device 2>> $LOGFILE` 2036 2036 # end patch 2037 [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | grep -F "$device " | cut -d' ' -f2` 2037 # take only the first in case of multiple mount (cifs, nfs, ...) 2038 [ "$res" = "" ] && res=`df -k -P -x supermount | tr -s '\t' ' ' | grep -F "$device " | cut -d' ' -f2 | head -1` 2038 2039 [ "$res" = "" ] && res="-1" 2039 2040 echo $res -
branches/2.2.10/mondo/src/common/libmondo-archive.c
r2428 r2451 687 687 run_program_and_log_output("ln -sf /boot/grub/grub.conf /boot/grub/menu.lst", 5); 688 688 } 689 if ( !does_file_exist("/boot/grub/menu.lst")) {690 fatal_error("The de facto standard location for your boot loader's config file is /boot/grub/menu.lst but I cannot find it there. What is wrong with your Linux distribution?");689 if ((!does_file_exist("/boot/grub/menu.lst")) || (!does_file_exist("/boot/grub/grub.cfg"))) { 690 fatal_error("The de facto standard location for your boot loader's config file is /boot/grub/menu.lst or /boot/grub/grub.cfg but I cannot find it there. What is wrong with your Linux distribution?"); 691 691 } 692 692 } else if (bkpinfo->boot_loader == 'E') { -
branches/2.2.10/mondo/src/mondorestore/mondo-rstr-tools.c
r2405 r2451 1387 1387 backup_crucial_file(MNT_RESTORING, "/etc/fstab"); 1388 1388 backup_crucial_file(MNT_RESTORING, "/boot/grub/menu.lst"); 1389 backup_crucial_file(MNT_RESTORING, "/boot/grub/grub.cfg"); 1389 1390 backup_crucial_file(MNT_RESTORING, "/etc/lilo.conf"); 1390 1391 backup_crucial_file(MNT_RESTORING, "/etc/elilo.conf"); … … 1512 1513 mvaddstr_and_log_it(g_currentY, 1513 1514 0, 1514 "Modifying fstab, mtab, device.map and menu.lst , and running GRUB... ");1515 "Modifying fstab, mtab, device.map and menu.lst/grub.cfg, and running GRUB... "); 1515 1516 for (done = FALSE; !done;) { 1516 1517 p = popup_and_get_string("Boot device", "Please confirm/enter the boot device. If in doubt, try /dev/hda", boot_device); … … 1538 1539 done = TRUE; 1539 1540 } 1540 popup_and_OK("You will now edit fstab, mtab, device.map and menu.lst ");1541 popup_and_OK("You will now edit fstab, mtab, device.map and menu.lst/grub.cfg"); 1541 1542 if (!g_text_mode) { 1542 1543 newtSuspend(); … … 1552 1553 mr_free(tmp); 1553 1554 1554 mr_asprintf(tmp, "chroot %s %s /boot/grub/menu.lst", MNT_RESTORING, editor); 1555 if (does_file_exist(MNT_RESTORING"/boot/grub/menu.lst")) { 1556 mr_asprintf(tmp, "chroot %s %s /boot/grub/menu.lst", MNT_RESTORING, editor); 1557 } else if (does_file_exist(MNT_RESTORING"/boot/grub/grub.cfg")) { 1558 mr_asprintf(tmp, "chroot %s %s /boot/grub/grub.cfg", MNT_RESTORING, editor); 1559 } 1555 1560 paranoid_system(tmp); 1556 1561 mr_free(tmp); -
branches/2.2.10/mondo/src/restore-scripts/mondo/grub-MR
r2185 r2451 159 159 # --------------------------------- 160 160 161 echo "Trying to use the existing menu.lst file in batch mode" >> $LOGFILE 162 chroot /mnt/RESTORING grub --batch < /mnt/RESTORING/boot/grub/menu.lst 161 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then 162 GRUBCFGFILE=/boot/grub/menu.lst 163 elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then 164 GRUBCFGFILE=/boot/grub/grub.cfg 165 else 166 echo "Unable to find Grub conf file" 167 exit -1 168 fi 169 echo "Trying to use the existing $GRUBCFGFILE file in batch mode" >> $LOGFILE 170 chroot /mnt/RESTORING grub --batch < /mnt/RESTORING$GRUBCFGFILE 163 171 res=$? 164 echo " menu.lstapproach returned $res" >> $LOGFILE172 echo "$GRUBCFGFILE approach returned $res" >> $LOGFILE 165 173 [ "$res" -eq "0" ] && exit 0 166 174 -
branches/2.2.10/mondo/src/restore-scripts/mondo/stabgrub-me
r2095 r2451 57 57 LocateOldGrub() { 58 58 old_grubconf="" 59 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ] ; then 60 LogIt "No need for menu.lst search." 2 61 old_grubconf=/mnt/RESTORING/boot/grub/menu.lst 59 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ] || [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ] ; then 60 LogIt "No need for menu.lst/grub.cfg search." 2 61 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then 62 old_grubconf=/mnt/RESTORING/boot/grub/menu.lst 63 elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then 64 old_grubconf=/mnt/RESTORING/boot/grub/grub.cfg 65 fi 62 66 if [ -L "$old_grubconf" ] ; then 63 67 l=`readlink "$old_grubconf"` … … 120 124 LogIt "OK so far: I've found all the files I need." 2 121 125 new_fstab=/mnt/RESTORING/etc/fstab.NEW 122 new_grubconf=/mnt/RESTORING/boot/grub/menu.lst.NEW 126 if [ -f /mnt/RESTORING/boot/grub/menu.lst ]; then 127 new_grubconf=/mnt/RESTORING/boot/grub/menu.lst.NEW 128 elif [ -f /mnt/RESTORING/boot/grub/grub.cfg ]; then 129 new_grubconf=/mnt/RESTORING/boot/grub/grub.cfg.NEW 130 fi 123 131 # change back to /tmp if /mnt/RESTORING/etc be problematic 124 132
Note:
See TracChangeset
for help on using the changeset viewer.