Changeset 3379 in MondoRescue


Ignore:
Timestamp:
May 6, 2015, 11:43:08 PM (5 years ago)
Author:
Bruno Cornec
Message:
  • Fix GRUB detection issu on UEFI based systems
  • Initialize Boot type for non interactive setup as well
  • Syntax fix
Location:
branches/3.2/mondo/src/common
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mondo/src/common/libmondo-archive.c

    r3378 r3379  
    406406#ifdef DVDRWFORMAT
    407407        if (!find_home_of_exe("dvd+rw-format")) {
    408             fatal_error
    409                 ("Cannot find dvd+rw-format. Please install it or fix your PATH.");
     408            fatal_error("Cannot find dvd+rw-format. Please install it or fix your PATH.");
    410409        }
    411410#endif
    412411        if (!find_home_of_exe("growisofs")) {
    413             fatal_error
    414                 ("Cannot find growisofs. Please install it or fix your PATH.");
     412            fatal_error("Cannot find growisofs. Please install it or fix your PATH.");
    415413        }
    416414    }
     
    669667        if ((!does_file_exist("/boot/grub/menu.lst")) && (!does_file_exist("/boot/grub/grub.cfg")) && (!does_file_exist("/boot/grub2/grub.cfg"))) {
    670668            /* if UEFI then search under /boot/efi */
    671             mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("find /boot/efi -name grub.conf");
     669            mr_asprintf(tmp, "%s", call_program_and_get_last_line_of_output("find /boot/efi -name grub.conf"));
    672670            if (strstr(tmp, "grub.conf") == NULL) {
    673671                mr_free(bootldr_str);
  • branches/3.2/mondo/src/common/libmondo-cli.c

    r3373 r3379  
    9999        }
    100100    }
     101    bkpinfo->boot_type = mr_boot_type();
    101102
    102103    return (retval);
  • branches/3.2/mondo/src/common/libmondo-devices.c

    r3378 r3379  
    415415    assert_string_is_neither_NULL_nor_zerolength(str);
    416416
    417     /* For UEFI detection, this should be extended to count=2 */
    418     mr_asprintf(command, "dd if=%s bs=446 count=1 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null", dev, str);
     417    /* For UEFI detection, this should be extended to count=1000 ! */
     418    if (bkpinfo->boot_type == UEFI) {
     419        mr_asprintf(command, "dd if=%s bs=446 count=1000 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null", dev, str);
     420    } else {
     421        mr_asprintf(command, "dd if=%s bs=446 count=1 2> /dev/null | strings | grep \"%s\" > /dev/null 2> /dev/null", dev, str);
     422    }
    419423    i = system(command);
    420424    mr_free(command);
Note: See TracChangeset for help on using the changeset viewer.