Changeset 2222 in MondoRescue for branches/2.2.9


Ignore:
Timestamp:
Jun 17, 2009, 3:09:22 AM (15 years ago)
Author:
Bruno Cornec
Message:
  • Usage of partprobe at restore time if possible
  • fix call to fdisk into parted2fdisk
Location:
branches/2.2.9
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mindi/deplist.txt

    r2218 r2222  
    4141hosts host.conf resolv.conf hosts.allow hosts.deny nsswitch.conf
    4242klogd sysklogd
    43 fdisk hdparm uname
     43fdisk hdparm uname partprobe
    4444loadkeys
    4545# These lines require absolute paths now !
  • branches/2.2.9/mindi/mindi

    r2193 r2222  
    24912491fi
    24922492which mke2fs > /dev/null 2> /dev/null || Die "Please put mke2fs in system path"
    2493 [ ! -e "$FDISK" ] && Die "Cannot find (s)fdisk"
     2493[ ! -e "$FDISK" ] && Die "Cannot find $FDISK"
    24942494
    24952495[ "`uname -r | grep "2.4.[0-6]" | grep -v "2.4.[0-9][0-9]"`" != "" ] &&  echo "WARNING! Your kernel may have buggy loopfs code. Consider upgrading to 2.4.7"
  • branches/2.2.9/mondo/src/common/libmondo-cli.c

    r2214 r2222  
    393393    ********/
    394394    mr_asprintf(&command,
    395       "fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
     395      "parted2fdisk -l %s 2>/dev/null|grep -E \"^/dev/\"|awk '{printf(\"%%s \", $1)}END{print \"\"}'", dsf);
    396396    log_msg(4, "Executing: %s", command);
    397397    mr_asprintf(&partition_list, "%s", call_program_and_get_last_line_of_output(command));
     
    446446        /* See if it's swap. If it is, ignore it. */
    447447        mr_asprintf(&command,
    448           "fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'",
     448          "parted2fdisk -l %s 2>/dev/null | awk '{if(($1==\"%s\")&&(toupper($0) ~ \"SWAP\")){print $1;exit}}'",
    449449          dsf, partitions[i]);
    450450        log_msg(4, "  Running: %s", command);
     
    477477        log_msg(4, "  It's not mounted. Checking to see if it's LVM...");
    478478        /* Get the partition ID; 8e for LVM */
    479         mr_asprintf(&command, "fdisk -l %s |awk '{if($1 ~ \"^%s\"){print $5}}'", dsf, partitions[i]);
     479        mr_asprintf(&command, "parted2fdisk -l %s |awk '{if($1 ~ \"^%s\"){print $5}}'", dsf, partitions[i]);
    480480        log_msg(4, "  Running: %s", command);
    481481        mr_asprintf(&tmp, "%s", call_program_and_get_last_line_of_output(command));
  • branches/2.2.9/mondo/src/mondorestore/mondo-prep.c

    r2211 r2222  
    16861686        if (!run_program_and_log_output(tmp, 5)) {
    16871687            g_partition_table_locked_up++;
     1688        }
     1689        sprintf(tmp, "partprobe %s", drivename);
     1690        if (!run_program_and_log_output(tmp, 5)) {
     1691            g_partition_table_locked_up--;
     1692        }
     1693        if (g_partition_table_locked_up > 0) {
    16881694            log_to_screen
    1689                 ("A flaw in the Linux kernel has locked the partition table.");
     1695                ("A flaw in the Linux kernel has locked the partition table. Even calling partprobe did not suceed :-(");
    16901696        }
    16911697    }
Note: See TracChangeset for help on using the changeset viewer.