Changeset 1845 in MondoRescue
- Timestamp:
- Dec 18, 2007, 1:05:57 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2.2.5/mondo/src/mondorestore/mondo-rstr-tools.c
r1843 r1845 1473 1473 char *tmp; 1474 1474 char *name; 1475 char *cmd = NULL; 1475 1476 1476 1477 malloc_string(device); 1477 1478 malloc_string(tmp); 1478 1479 malloc_string(name); 1480 1481 /* In order to have a working bootloader, we need to have all devices 1482 * ready in the chroot. If they are not there (udev) then copy them from 1483 * the current /dev location 1484 */ 1485 asprintf(&cmd,"tar cf - /dev | ( cd %s ; tar xf - )",MNT_RESTORING); 1486 run_program_and_log_output(cmd, 3); 1487 1479 1488 backup_crucial_file(MNT_RESTORING, "/etc/fstab"); 1480 1489 backup_crucial_file(MNT_RESTORING, "/etc/grub.conf"); 1481 1490 backup_crucial_file(MNT_RESTORING, "/etc/lilo.conf"); 1482 1491 backup_crucial_file(MNT_RESTORING, "/etc/elilo.conf"); 1492 backup_crucial_file(MNT_RESTORING, "/boot/grub/device.map"); 1493 backup_crucial_file(MNT_RESTORING, "/etc/mtab"); 1483 1494 read_cfg_var(g_mondo_cfg_file, "bootloader.device", device); 1484 1495 read_cfg_var(g_mondo_cfg_file, "bootloader.name", name); … … 1491 1502 res = run_elilo(offer_to_hack_scripts); 1492 1503 } else if (!strcmp(name, "GRUB")) { 1493 // if ( does_file_exist(DO_MBR_PLEASE) || (offer_to_hack_scripts && ask_me_yes_or_no("Because of bugs in GRUB, you're much better off running mondorestore --mbr after this program terminates. Are you sure you want to install GRUB right now?")))1494 // {1495 1504 res = run_grub(offer_to_hack_scripts, device); 1496 // unlink(DO_MBR_PLEASE);1497 // }1498 // else1499 // {1500 // log_msg(1, "Not running run_grub(). Was a bad idea anyway.");1501 // res = 1;1502 // }1503 1505 } else if (!strcmp(name, "RAW")) { 1504 1506 res = run_raw_mbr(offer_to_hack_scripts, device); … … 1733 1735 newtSuspend(); 1734 1736 } 1735 sprintf(tmp, " %s " MNT_RESTORING "/etc/fstab", editor);1737 sprintf(tmp, "chroot %s %s /etc/fstab", MNT_RESTORING, editor); 1736 1738 paranoid_system(tmp); 1737 sprintf(tmp, "%s " MNT_RESTORING "/etc/elilo.conf", 1738 editor); 1739 sprintf(tmp, "chroot %s %s /etc/elilo.conf", MNT_RESTORING, editor); 1739 1740 paranoid_system(tmp); 1740 1741 if (!g_text_mode) {
Note:
See TracChangeset
for help on using the changeset viewer.