Changeset 3378 in MondoRescue


Ignore:
Timestamp:
May 6, 2015, 2:10:24 PM (9 years ago)
Author:
Bruno Cornec
Message:
  • Deal with grub used with UEFI
Location:
branches/3.2
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/3.2/mindi/mindi

    r3377 r3378  
    30453045    cat /etc/lilo.conf >> $LOGFILE
    30463046fi
     3047if [ -d /boot/efi ]; then
     3048    gcf=`find /boot/efi -name grub.conf`
     3049    LogFile "-------------"
     3050    LogFile "INFO: $gcf content"
     3051    LogFile "-------------"
     3052    cat $gcf >> $LOGFILE
     3053    LogFile "-------------"
     3054fi
     3055
    30473056LogFile "Full fdisk info"
    30483057LogFile "---------------"
  • branches/3.2/mondo/src/common/libmondo-archive.c

    r3376 r3378  
    668668        }
    669669        if ((!does_file_exist("/boot/grub/menu.lst")) && (!does_file_exist("/boot/grub/grub.cfg")) && (!does_file_exist("/boot/grub2/grub.cfg"))) {
    670             mr_free(bootldr_str);
    671             fatal_error("The de facto standard location for your boot loader's config file is /boot/grub/menu.lst, /boot/grub/grub.cfg, or /boot/grub2/grub.cfg but I cannot find it there. What is wrong with your Linux distribution?");
     670            /* 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");
     672            if (strstr(tmp, "grub.conf") == NULL) {
     673                mr_free(bootldr_str);
     674                fatal_error("The de facto standard location for your boot loader's config file is /boot/grub/menu.lst, /boot/grub/grub.cfg, or /boot/grub2/grub.cfg but I cannot find it there. What is wrong with your Linux distribution?");
     675            }
    672676        }
    673677        mr_asprintf(bootldr_ver, "%s", call_program_and_get_last_line_of_output("grub --version 2> /dev/null"));
  • branches/3.2/mondo/src/common/libmondo-devices.c

    r3377 r3378  
    77 * Functions to handle interactions with backup devices.
    88 */
     9
     10#include <sys/types.h>
     11#include <dirent.h>
    912
    1013#include "my-stuff.h"
     
    21162119#endif
    21172120    /* Try to detect whether we are in fact in UEFI mode */
    2118     fd = opendir("/sys/firmware/efi", "r");
     2121    fd = opendir("/sys/firmware/efi");
    21192122    if (fd != NULL) {
    21202123        ret = UEFI;
  • branches/3.2/mondo/src/restore-scripts/mondo/grub-MR

    r3377 r3378  
    206206elif [ -f "/mnt/RESTORING/boot/grub2/grub.cfg" ]; then
    207207    grep -vE '^#' /boot/grub2/grub.cfg > /mnt/RESTORING/tmp/grub.conf
     208elif [ -d "/mnt/RESTORING/boot/efi" ]; then
     209    grep -vE '^#' `find /boot/efi -name grub.conf` > /mnt/RESTORING/tmp/grub.conf
    208210else
    209211    echo "Unable to find Grub conf file" | tee -a $LOGFILE
  • branches/3.2/mondo/src/restore-scripts/mondo/stabgrub-me

    r3297 r3378  
    7979        return 0
    8080    fi
     81    if [ -d "/sys/firmware/efi" ]; then
     82        old_grubconf=`find /mnt/RESTORING/boot/efi -name grub.conf`
     83    fi
    8184    LogIt "GRUB not found." 2
    8285    return 1
Note: See TracChangeset for help on using the changeset viewer.