2

Hi I'm following this: How to install the Boot-Repair tool in an Ubuntu live disc?

but i get the following error at the end.

#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"



/boot/efi detected in the fstab of sda9: UUID=F2C9-69DB  (sda1)

*******lspci -nnk | grep -iA3 vga
00:02.0 VGA compatible controller [0300]: Intel Corporation Haswell-ULT Integrated Graphics Controller [8086:0a16] (rev 09)
Subsystem: ASUSTeK Computer Inc. Device [1043:13fd]
Kernel driver in use: i915
00:03.0 Audio device [0403]: Intel Corporation Haswell-ULT HD Audio Controller [8086:0a0c] (rev 09)
*******

grub-install: info: executing modprobe efivars 2>/dev/null.
grub-install: info: Looking for /sys/firmware/efi ...
grub-install: info: ... not found. Looking for /proc/device-tree ...
grub-install: info: ... not found.
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.
,.
GRUB too old for SecureBoot. Please report this message to [email protected]

chroot /mnt/boot-sav/sda9 efibootmgr -v
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.

chroot /mnt/boot-sav/sda9 uname -r
Kernel: 3.13.0-24-generic
WinEFI detected. Do you want to activate [Backup and rename Windows EFI files]? yes (if any choice fails, please retry with the other)

Reinstall the grub-efi of sda9
grub-install: error: /usr/lib/grub/i386-pc/modinfo.sh doesn't exist. Please specify --target or --directory.
grub-install : exit code of grub-install :1
Error: no grub*.efi generated. Please report this message to [email protected]

Add /mnt/boot-sav/sda9/boot/efi efi entries in /mnt/boot-sav/sda9/etc/grub.d/25_custom
Adding custom /mnt/boot-sav/sda9/boot/efi/EFI/Microsoft/Boot/bootmgfw.efi
Adding custom /mnt/boot-sav/sda9/boot/efi/EFI/Boot/bootx64.efi
sda1/bootx64.efi already added
sda1/bootmgfw.efi already added

---- Grub-install verbose
/usr/sbin/grub-install: 1: /usr/sbin/grub-install: cannot create n\F0\F0TT@T@DDP\E5td\8C\D2\8C\D2L\8C\D2Ll9l9Q\E5tdR\E5td\F0=\F0=n\F0=n/lib64/ld-linux-x86-64.so.2GNUGNUm: Directory nonexistent
+ ELF @@@@@@\F8\F888@8@@@d:d: \F0=\F0=n\F0=n\9E{ \81 
/usr/sbin/grub-install: 1: /usr/sbin/grub-install: ELF: not found
/usr/sbin/grub-install: 2: /usr/sbin/grub-install: Syntax error: ")" unexpected
--------
/usr/sbin/grub-install : exit code of grub-install :2
---- End of grub-install verbose


chroot /mnt/boot-sav/sda9 efibootmgr -v
Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.

chroot /mnt/boot-sav/sda9 update-grub
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.13.0-24-generic
Found initrd image: /boot/initrd.img-3.13.0-24-generic
Found Windows Recovery Environment (loader) on /dev/sda2
Found Windows 8 (loader) on /dev/sda4
Unhide GRUB boot menu in sda9/boot/grub/grub.cfg

An error occurred during the repair.

You can now reboot your computer.


You may want to retry after deactivating the [Backup and rename Windows EFI files] option.

The boot of your PC is in Legacy mode. You may want to retry after changing it to EFI mode.

1 Answer 1

3

The biggest single problem people encounter when attempting to dual-boot Linux on an EFI-based computer (such as the vast majority of computers that shipped with Windows 8) is in enabling BIOS/CSM/legacy support in the firmware. To paraphrase Nancy Reagan, just say "no" to BIOS/CSM/legacy support!!! Enabling that support can help get past a hurdle early on, but it creates several new hurdles later. In the end, you need to figure out how to get Linux booted without that support, so enabling it just creates work. (There are exceptions to this rule, but they're rare, and must be discovered on a case-by-case basis through experimentation.) Note that disabling Secure Boot is sometimes necessary, so if you've done that, don't re-enable it -- at least, not yet.

That said, you've clearly made this early mistake, so you now have to correct it. To do so, you should first go into your firmware and disable BIOS/CSM/legacy support. (The details of how to do this vary from one machine to another, but you've probably changed it to begin with, so you might remember what you changed.)

With BIOS/CSM/legacy support disabled, you must then install an EFI-mode boot loader for Linux. There are several ways to do this, but the two easiest are:

  • Download the USB flash drive or CD-R version of my rEFInd boot manager, prepare a boot medium from it, and boot it. rEFInd should give you options to boot both Windows and Ubuntu. Test both to be sure you can boot both OSes. If you can, boot to Ubuntu and install the Debian-package version of rEFInd. This will set it up as your default boot manager, enabling you to boot either OS from rEFInd without the USB drive or CD-R. Note that this approach requires that Secure Boot be disabled, at least initially. (You can re-enable it later, but that may require jumping through some extra hoops.)
  • Re-run the Boot Repair utility from whatever Linux installation you can get booted (probably a live CD or USB drive). With BIOS/CSM/legacy support disabled, Linux should run in EFI mode, which should enable Boot Repair to use efibootmgr, which is required for a proper repair of your installation. With any luck, when you reboot GRUB will come up and give you the option to boot either Ubuntu or Windows. Unfortunately, you take more on faith with this approach -- usually it works, but sometimes it doesn't help, and on rare occasion it will make matters worse.

You may want to read my page on EFI-mode Linux installations to learn how to do it right for future installations, or should you decide to just scrap what you've got now and start again.

4
  • I had the CSM disabled from the start. I also disabled the fast smart boot that comes with windows 8.1. I also went into the security tab under BIOS to disable it. May 11, 2014 at 15:19
  • So i tried Enabling CSM and choosing USB with EFI as boot order #1 and then ran the same thing again. I still got an error: paste.ubuntu.com/7447896 May 11, 2014 at 15:55
  • 1
    ^That seems to have done the trick. I can see the GNU bootup menu now. May 11, 2014 at 16:14
  • Your first Boot Repair output showed clear signs that Linux had booted in BIOS/CSM/legacy mode. Unfortunately, some EFIs take BIOS/CSM/legacy-vs-EFI/UEFI options more as suggestions than as constraints, so you can end up booting in the mode you thought you'd disabled. That's one of the reasons I suggest using rEFInd for this -- it boots only in EFI mode, so there's no guesswork involved.
    – Rod Smith
    May 11, 2014 at 19:25

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .