Changeset 2904 in MondoRescue
- Timestamp:
- Nov 21, 2011, 3:46:46 AM (13 years ago)
- Location:
- branches/3.0/mondo/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.0/mondo/src/common/libmondo-files-EXT.h
r2551 r2904 45 45 extern long size_of_partition_in_mountlist_K(char *tmpdir, char *dev); 46 46 47 extern int make_grub_install_scriptlet(char *outfile);48 47 extern int read_one_liner_data_file(char *fname, char *contents); -
branches/3.0/mondo/src/common/libmondo-files.h
r2551 r2904 44 44 int make_hole_for_dir(char *outdir_fname); 45 45 long size_of_partition_in_mountlist_K(char *tmpdir, char *dev); 46 int make_grub_install_scriptlet(char *outfile);47 48 46 int read_one_liner_data_file(char *fname, char *contents); -
branches/3.0/mondo/src/mondorestore/mondo-rstr-tools.c
r2878 r2904 1444 1444 if (res) { 1445 1445 popup_and_OK 1446 ("GRUB installation failed. Please install manually using 'grub-install' or similar command. You are now chroot()'ed to your restored system. Please type 'exit' when you are done."); 1447 newtSuspend(); 1448 system("chroot " MNT_RESTORING); 1449 newtResume(); 1450 popup_and_OK("Thank you."); 1446 ("GRUB installation failed. You will now edit fstab, mtab, device.map and menu.lst/grub.cfg in order to fix grub install"); 1447 if (!g_text_mode) { 1448 newtSuspend(); 1449 } 1450 sprintf(tmp, "chroot %s %s /etc/fstab", MNT_RESTORING, editor); 1451 paranoid_system(tmp); 1452 sprintf(tmp, "chroot %s %s /etc/mtab", MNT_RESTORING, editor); 1453 paranoid_system(tmp); 1454 if (does_file_exist(MNT_RESTORING"/boot/grub/menu.lst")) { 1455 sprintf(tmp, "chroot %s %s /boot/grub/menu.lst", MNT_RESTORING, editor); 1456 } else if (does_file_exist(MNT_RESTORING"/boot/grub/grub.cfg")) { 1457 sprintf(tmp, "chroot %s %s /boot/grub/grub.cfg", MNT_RESTORING, editor); 1458 } 1459 paranoid_system(tmp); 1460 sprintf(tmp, "chroot %s %s /boot/grub/device.map", MNT_RESTORING, editor); 1461 paranoid_system(tmp); 1462 if (!g_text_mode) { 1463 newtResume(); 1464 } 1465 sprintf(command, "stabgrub-me %s", boot_device); 1466 res = run_program_and_log_output(command, 1); 1467 if (res) { 1468 popup_and_OK 1469 ("GRUB installation failed. Please fix the conf files so that a manual install using 'grub-install' or similar command works. You are now chroot()'ed to your restored system. Please type 'exit' when you are done."); 1470 newtSuspend(); 1471 system("chroot " MNT_RESTORING); 1472 newtResume(); 1473 popup_and_OK("Thank you."); 1474 } else { 1475 popup_and_OK("GRUB is now installed correctly"); 1476 done = TRUE; 1477 } 1451 1478 } else { 1452 1479 done = TRUE; 1453 }1454 popup_and_OK("You will now edit fstab, mtab, device.map and menu.lst/grub.cfg");1455 if (!g_text_mode) {1456 newtSuspend();1457 }1458 sprintf(tmp, "chroot %s %s /etc/fstab", MNT_RESTORING, editor);1459 paranoid_system(tmp);1460 sprintf(tmp, "chroot %s %s /etc/mtab", MNT_RESTORING, editor);1461 paranoid_system(tmp);1462 if (does_file_exist(MNT_RESTORING"/boot/grub/menu.lst")) {1463 sprintf(tmp, "chroot %s %s /boot/grub/menu.lst", MNT_RESTORING, editor);1464 } else if (does_file_exist(MNT_RESTORING"/boot/grub/grub.cfg")) {1465 sprintf(tmp, "chroot %s %s /boot/grub/grub.cfg", MNT_RESTORING, editor);1466 }1467 paranoid_system(tmp);1468 sprintf(tmp, "chroot %s %s /boot/grub/device.map", MNT_RESTORING, editor);1469 paranoid_system(tmp);1470 if (!g_text_mode) {1471 newtResume();1472 1480 } 1473 1481 }
Note:
See TracChangeset
for help on using the changeset viewer.