Changeset 2944 in MondoRescue
- Timestamp:
- Feb 3, 2012, 2:12:47 AM (12 years ago)
- Location:
- branches/3.0/mondo/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/common/libmondo-archive.c
r2931 r2944 701 701 ("ln -sf /boot/grub/grub.conf /boot/grub/menu.lst", 5); 702 702 } 703 if ((!does_file_exist("/boot/grub/menu.lst")) && (!does_file_exist("/boot/grub/grub.cfg")) ) {703 if ((!does_file_exist("/boot/grub/menu.lst")) && (!does_file_exist("/boot/grub/grub.cfg")) && (!does_file_exist("/boot/grub2/grub.cfg"))) { 704 704 fatal_error 705 ("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?");705 ("The de facto standard location for your boot loader's config file is /boot/grub/menu.lst, /boot/grub/grub.cfg, or /boot/grub2/grub.cfg but I cannot find it there. What is wrong with your Linux distribution?"); 706 706 } 707 707 } else if (bkpinfo->boot_loader == 'E') { -
branches/3.0/mondo/src/common/libmondo-mountlist.c
r2918 r2944 949 949 } 950 950 paranoid_fclose(fout); 951 if (!(fout = fopen(MONDO_MNTLISTCHG, "w"))) { 952 log_OS_error("WMTD - Cannot openout "MONDO_MNTLISTCHG); 953 return (1); 954 } 955 fprintf(fout, "the mountlist was changed by mondorestore\n"); 956 paranoid_fclose(fout); 951 957 return (0); 952 958 } -
branches/3.0/mondo/src/mondorestore/mondo-rstr-tools.c
r2904 r2944 1301 1301 backup_crucial_file(MNT_RESTORING, "/boot/grub/menu.lst"); 1302 1302 backup_crucial_file(MNT_RESTORING, "/boot/grub/grub.cfg"); 1303 backup_crucial_file(MNT_RESTORING, "/boot/grub2/grub.cfg"); 1303 1304 backup_crucial_file(MNT_RESTORING, "/etc/lilo.conf"); 1304 1305 backup_crucial_file(MNT_RESTORING, "/etc/elilo.conf"); 1305 1306 backup_crucial_file(MNT_RESTORING, "/boot/grub/device.map"); 1307 backup_crucial_file(MNT_RESTORING, "/boot/grub2/device.map"); 1306 1308 backup_crucial_file(MNT_RESTORING, "/etc/mtab"); 1307 1309 read_cfg_var(g_mondo_cfg_file, "bootloader.device", device); … … 1456 1458 } else if (does_file_exist(MNT_RESTORING"/boot/grub/grub.cfg")) { 1457 1459 sprintf(tmp, "chroot %s %s /boot/grub/grub.cfg", MNT_RESTORING, editor); 1460 } else if (does_file_exist(MNT_RESTORING"/boot/grub2/grub.cfg")) { 1461 sprintf(tmp, "chroot %s %s /boot/grub2/grub.cfg", MNT_RESTORING, editor); 1458 1462 } 1459 1463 paranoid_system(tmp); 1460 sprintf(tmp, "chroot %s %s /boot/grub/device.map", MNT_RESTORING, editor); 1464 if (does_file_exist(MNT_RESTORING"/boot/grub/device.map")) { 1465 sprintf(tmp, "chroot %s %s /boot/grub/device.map", MNT_RESTORING, editor); 1466 } else if (does_file_exist(MNT_RESTORING"/boot/grub2/device.map")) { 1467 sprintf(tmp, "chroot %s %s /boot/grub2/device.map", MNT_RESTORING, editor); 1468 } 1461 1469 paranoid_system(tmp); 1462 1470 if (!g_text_mode) { -
branches/3.0/mondo/src/restore-scripts/mondo/grub-MR
r2920 r2944 133 133 [ "$res" -eq "0" ] && exit 0 134 134 135 136 echo "Now I'll use grub2-install" >> $LOGFILE 137 if [ "$MNT_RESTORING" ] ; then 138 chroot $MNT_RESTORING grub2-install $1 >> $LOGFILE 2>> $LOGFILE 139 res=$? 140 else 141 grub2-install $1 >> $LOGFILE 2>> $LOGFILE 142 res=$? 143 fi 144 echo "grub2-install returned $res" >> $LOGFILE 145 [ "$res" -eq "0" ] && exit 0 146 135 147 echo "Trying a hack" >> $LOGFILE 136 148 FindBootPart $1 $2 2>&1 | tee -a $LOGFILE -
branches/3.0/mondo/src/restore-scripts/mondo/stabgrub-me
r2449 r2944 57 57 LocateOldGrub() { 58 58 old_grubconf="" 59 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ] || [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ] ; then59 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ] || [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ] || [ -f "/mnt/RESTORING/boot/grub2/grub.cfg" ] ; then 60 60 LogIt "No need for menu.lst/grub.cfg search." 2 61 61 if [ -f "/mnt/RESTORING/boot/grub/menu.lst" ]; then … … 63 63 elif [ -f "/mnt/RESTORING/boot/grub/grub.cfg" ]; then 64 64 old_grubconf=/mnt/RESTORING/boot/grub/grub.cfg 65 elif [ -f "/mnt/RESTORING/boot/grub2/grub.cfg" ]; then 66 old_grubconf=/mnt/RESTORING/boot/grub2/grub.cfg 65 67 fi 66 68 if [ -L "$old_grubconf" ] ; then … … 68 70 if [ _"`echo $l | cut -c1`" = _"/" ]; then 69 71 # If readlink gives an absolute path it's related to the chroot 70 old_grubconf=/mnt/RESTORING/$l72 old_grubconf=/mnt/RESTORING/$l 71 73 else 72 74 # If readlink gives a relative path, it's in the same dir 73 old_grubconf=/mnt/RESTORING/boot/grub/$l 75 d=`dirname "$old_grubconf"` 76 old_grubconf=$d/$l 74 77 fi 75 fi 78 fi 76 79 return 0 77 80 fi … … 128 131 elif [ -f /mnt/RESTORING/boot/grub/grub.cfg ]; then 129 132 new_grubconf=/mnt/RESTORING/boot/grub/grub.cfg.NEW 133 elif [ -f /mnt/RESTORING/boot/grub2/grub.cfg ]; then 134 new_grubconf=/mnt/RESTORING/boot/grub2/grub.cfg.NEW 130 135 fi 131 136 # change back to /tmp if /mnt/RESTORING/etc be problematic
Note:
See TracChangeset
for help on using the changeset viewer.