Ignore:
Timestamp:
Nov 2, 2012, 8:28:12 PM (11 years ago)
Author:
Bruno Cornec
Message:
  • Fix #611 by changing make-me-bootable to first desactivate all active partitions on the given disk, and then reactivate only the one needed (change of interface for this script). This remains not very satisfactory, and storing active flags at backup time would probably be better, but would require to handle HW modification cases with this script anyway.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/3.0/mondo/src/mondorestore/mondo-prep.c

    r3048 r3057  
    16911691
    16921692    if (pout_to_fdisk) {
    1693 // mark relevant partition as bootable
    1694         sprintf(tmp, "a\n%s\n",
    1695                 call_program_and_get_last_line_of_output
    1696                 ("make-me-bootable /tmp/mountlist.txt dummy"));
    1697         fput_string_one_char_at_a_time(pout_to_fdisk, tmp);
    1698 // close fdisk
     1693        // close fdisk
    16991694        fput_string_one_char_at_a_time(pout_to_fdisk, "p\n");
    17001695        fput_string_one_char_at_a_time(pout_to_fdisk, "w\n");
     1696        paranoid_pclose(pout_to_fdisk);
    17011697        system("sync");
    1702         paranoid_pclose(pout_to_fdisk);
    1703         log_msg(0,
    1704                 "------------------- fdisk.log looks like this ------------------");
     1698        log_msg(0,"------------------- fdisk.log looks like this ------------------");
    17051699        sprintf(tmp, "cat %s >> %s", FDISK_LOG, MONDO_LOGFILE);
    17061700        system(tmp);
    1707         log_msg(0,
    1708                 "------------------- end of fdisk.log...       ------------------");
     1701        // mark relevant partition as bootable
     1702        mr_asprintf(&tmp1,"make-me-bootable /tmp/mountlist.txt %s noaction",drivename);
     1703        call_program_and_get_last_line_of_output(tmp1);
     1704        mr_free(tmp1);
     1705        log_msg(0,"------------------- end of fdisk.log...       ------------------");
     1706        system("sync");
    17091707        sprintf(tmp, "tail -n6 %s | grep -F \"16: \"", FDISK_LOG);
    17101708        if (!run_program_and_log_output(tmp, 5)) {
Note: See TracChangeset for help on using the changeset viewer.