PDA

View Full Version : [SOLVED] Dual boot Ubuntu grub menu does not show. Boot flag issue?



haffer
November 8th, 2015, 01:40 PM
Hi guys,

I have just installed Ubuntu 14.04 next to my Windows 10, but I cannot get grub shown so I can boot Ubuntu.

On Windows I've disabled fast boot, secure boot and set the boot order so that the Windows Boot Loader is only above LAN-booting.

I've booted a live session from usb to run boot-repair a few times.

This is the first result: http://paste.ubuntu.com/13150199/
And second result: http://paste.ubuntu.com/13151334/

I've tried the suggested "bcdedit /set {bootmgr} path \EFI\ubuntu\shimx64.efi", and it says that the operation was succesful - but still no grub on restart.

I've tried to mount sda7 and /dev, /sys and /proc, from a live session to un-hide grub, check efibootmgr and run 'sudo update-grub'. Which had a "Adding boot menu entry for EFI firmware configuration" line - but still no grub on restart.

EDIT: Grub does show but only for a split-second. I saw a glimse of a few lines that said "Failed ... "


root@ubuntu:/# cat etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'

GRUB_DEFAULT="0"
#GRUB_HIDDEN_TIMEOUT=10
#GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"

# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#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"



root@ubuntu:/# sudo update-grub
sudo: unable to resolve host ubuntu
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.19.0-32-generic
Found initrd image: /boot/initrd.img-3.19.0-32-generic
Found linux image: /boot/vmlinuz-3.19.0-25-generic
Found initrd image: /boot/initrd.img-3.19.0-25-generic
Adding boot menu entry for EFI firmware configuration
done



root@ubuntu:/# efibootmgr
BootCurrent: 0010
Timeout: 2 seconds
BootOrder: 0010,000B,000A,000E,000D,000F,0012,000C,0011
Boot0000 Startup Interrupt Menu
Boot0001 Setup
Boot0002 Boot Menu
Boot0003 Diagnostic Splash Screen
Boot0004 Lenovo Diagnostics
Boot0005* ubuntu
Boot000A* USB CD
Boot000B* USB FDD
Boot000C* ATAPI CD0
Boot000D* ATA HDD0
Boot000E* ATA HDD1
Boot000F* ATA HDD2
Boot0010* USB HDD
Boot0011* PCI LAN
Boot0012* Windows Boot Manager
Boot0013 ME Configuration Menu
Boot0014 Rescue and Recovery
Boot0015* IDER BOOT CDROM
Boot0016* IDER BOOT Floppy


I'm not sure how this "boot flag" thing works. A screenshot from gparted list sda2 as /boot.

265412

At this point I don't know how to proceed, any inputs or good ideas?

oldfred
November 8th, 2015, 05:23 PM
It says Lenovo, what model? And it shows dual video which may be another issue. You may need boot parameters for Intel or nVidia depending on which video chip is is actually using to boot with.

You show grub also installed to MBR, best not to have done that, but it should never be used, so no matter. But do not try to boot in BIOS/CSM/Legacy mode only UEFI boot mode.

With UEFI boot flag is just the way gparted indicates the ESP - efi system partition. It really is a very long GUID and just a short cut to assign the correct GUID for the ESP.
The boot flag with UEFI/gpt is not the same as a boot flag with BIOS and MBR partitioning. With MBR boot flag is the Windows bootable partition. Grub does not use boot flag, but Lilo & Syslinux boot loaders also use boot flag.

Your efibootmgr shows ubuntu as first boot entry. If you make Windows first then it may boot into Windows and the BCD entry to reboot UEFI (one time) may work to boot Ubuntu. You can try with the one time boot key. Not sure with Lenovo what key that is, but many systems use f10 or f12. But my Asus motherboard is f8.

Many systems have now modified UEFI to use description as part of boot. And only valid description is "Windows". That is specifically not allowed in UEFI standard, but perhaps some major operating system vendor is suggesting this, since just about every vendor now seems to have implemented it.

There are multiple work arounds, the BCDedit is one. UEFI also has a fallback or default boot entry for a device and that is also how external devices are booted. The entry is /EFI/Boot/bootx64.efi. So one work around is to copy shimx64.efi and make it bootx64.efi. You may have to add a hard drive entry into UEFI with efibootmgr, but some UEFI auto create it. Details in link in my signature below.

T540 works but UEFI settings critical or it may brick
https://docs.google.com/document/d/1hFTArhNbmpmEBRkwRg0DMbEzLBCl43F1HXoXtJ8cm0k/edit?pli=1
Lenovo Thinkpad E531 - turn off locked boot order setting in UEFI
http://ubuntuforums.org/showthread.php?t=2255746
[SOLVED] Error 1962: No operating system found. Lenovo K430 only boot Ubuntu, rename files
http://ubuntuforums.org/showthread.php?t=2243715
Some Lenovos comes with a physical switch that enables you to select which graphics adapter to use.
Lenovo Z510 Laptop & Ubuntu
http://ubuntuforums.org/showthread.php?t=2232124

haffer
November 8th, 2015, 05:48 PM
Hi Olfred, thanks for the reply.

I actually managed to solve my issue before you posted - using a method from one of your threads !! (http://ubuntuforums.org/showthread.php?t=2147295)

I did this:


A: Manually rename files efi hard drive boot files in efi partition /EFI/Boot

Rename /efi/boot/bootx64.efi, copy shim or grub into /efi/boot and name it bootx64.efi Then boot harddrive entry in UEFI menu.
Older rename of Windows efi file not recommended anymore. (old versions of Boot-Repair did rename the Windows efi file)

From live installer booted in UEFI mode, mount the efi partition on hard drive, lines with # are comments only: Mount ESP - efi system partition. check which partition is FAT32 with boot flag. Often sda1 or sda2 but varies.
# if your ESP is not sda1 change this to correct partition
sudo mount /dev/sda1 /mnt
only if /EFI/Boot not already existing, run the mkdir command,
sudo mkdir /mnt/EFI/Boot
sudo cp /mnt/EFI/ubuntu/* /mnt/EFI/Boot
# If new folder created, the bootx64.efi will not exist, skip backup command
sudo mv /mnt/EFI/Boot/bootx64.efi /mnt/EFI/Boot/bootx64.efi.backup
# make grub be hard drive boot entry in UEFI. Then boot hard drive entry in UEFI menu.
sudo mv /mnt/EFI/Boot/grubx64.efi /mnt/EFI/Boot/bootx64.efi
# You may need new hard drive entry:
sudo efibootmgr -c -L "UEFI Hard drive" -l "\EFI\Boot\bootx64.efi"
# confirm entries:
sudo efibootmgr -v

And now grub appears and I can boot whatever OS i desire :D . Thanks for the help!

oldfred
November 8th, 2015, 06:04 PM
Glad that worked. :)