Changeset 3297 in MondoRescue
- Timestamp:
- Jun 7, 2014, 10:39:10 AM (11 years ago)
- Location:
- branches/3.2/mondo/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.2/mondo/src/mondorestore/mondo-rstr-tools.c
r3292 r3297 1384 1384 strcpy(boot_device, bd); 1385 1385 1386 if (offer_to_run_stabgrub 1387 && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?")) { 1386 if (offer_to_run_stabgrub && ask_me_yes_or_no("Did you change the mountlist or cloned the system ?")) { 1388 1387 /* interactive mode */ 1389 mvaddstr_and_log_it(g_currentY, 1390 0, 1391 "Modifying fstab, mtab, device.map and menu.lst/grub.cfg, and running GRUB... "); 1388 mvaddstr_and_log_it(g_currentY, 0, "Modifying fstab, mtab, device.map and menu.lst/grub.cfg, and running GRUB..."); 1392 1389 /* Did we changed the mountlist ? If yes, then force editing conf files */ 1393 1390 if ((fin = fopen(MONDO_MNTLISTCHG, "r")) != NULL) { … … 1395 1392 } 1396 1393 for (done = FALSE; !done;) { 1397 popup_and_get_string("Boot device", "Please confirm/enter the boot device. If in doubt, try /dev/ hda", boot_device, MAX_STR_LEN / 4);1394 popup_and_get_string("Boot device", "Please confirm/enter the boot device. If in doubt, try /dev/sda", boot_device, MAX_STR_LEN / 4); 1398 1395 /* Only try to adapt grub here first if the mountlist wasn't changed before */ 1399 1396 if (! mntlistchg) { … … 1465 1462 if (!run_program_and_log_output("which grub-MR", FALSE)) { 1466 1463 log_msg(1, "Yay! grub-MR found..."); 1467 mr_asprintf(command, "grub-MR %s "MINDI_CACHE"/mountlist.txt", boot_device);1464 mr_asprintf(command, "grub-MR %s /"MOUNTLIST_FNAME_STUB, boot_device); 1468 1465 log_msg(1, "command = %s", command); 1469 1466 } else { 1467 // Or grub2-install 1470 1468 mr_asprintf(command, "chroot " MNT_RESTORING " grub-install %s", boot_device); 1471 1469 log_msg(1, "WARNING - grub-MR not found; using grub-install"); … … 1749 1747 } else { 1750 1748 /* nuke mode */ 1751 mr_asprintf(command, "raw-MR %s "MINDI_CACHE"/mountlist.txt", boot_device);1749 mr_asprintf(command, "raw-MR %s /"MOUNTLIST_FNAME_STUB, boot_device); 1752 1750 log_msg(2, "run_raw_mbr() --- command='%s'", command); 1753 1751 … … 1809 1807 } else { 1810 1808 sprintf(g_mondo_cfg_file, "%s/%s", temppath, MONDO_CFG_FILE_STUB); 1811 sprintf(g_mountlist_fname, "%s/%s", temppath, 1812 MOUNTLIST_FNAME_STUB); 1809 sprintf(g_mountlist_fname, "%s/%s", temppath, MOUNTLIST_FNAME_STUB); 1813 1810 } 1814 1811 } -
branches/3.2/mondo/src/restore-scripts/mondo/stabgrub-me
r2944 r3297 184 184 grub_res=$? 185 185 if [ "$grub_res" -ne "0" ] ; then 186 LogIt "grub- install failed. Running grub-MR..."186 LogIt "grub-MR failed. Running grub-install..." 187 187 chroot /mnt/RESTORING grub-install '(hd0)' >> $LOGFILE 2>> $LOGFILE 188 188 grub_res=$? 189 else 190 LogIt "grub-MR ran ok." 2 189 191 fi 190 192 if [ "$grub_res" -ne "0" ] ; then 191 LogIt "GRUB failed." 3 193 LogIt "grub failed. Running grub2-install..." 3 194 chroot /mnt/RESTORING grub2-install /dev/sda >> $LOGFILE 2>> $LOGFILE 195 grub_res=$? 192 196 else 193 197 LogIt "GRUB ran ok." 2 194 198 fi 199 if [ "$grub_res" -ne "0" ] ; then 200 LogIt "grub2 failed..." 3 201 else 202 LogIt "GRUB2 ran ok." 2 203 fi 195 204 fi 196 205
Note:
See TracChangeset
for help on using the changeset viewer.