Official GIGABYTE Forum

GA-Z77-UD5H show boot item when drives are connected

GA-Z77-UD5H show boot item when drives are connected
« on: September 05, 2012, 04:19:57 am »
Hi all,

I have an issue where my new GA-Z77-UD5H where there is a selectable boot item called 'ubuntu' present when no drives are connected!? Is this a feature of UEFI creating a boot loader on the motherboard?

I have loaded the optimized defaults and the boot item does not disappear. I have ubuntu installed on a ssd in the computer. Though I have never know ubuntu to modify a bios... Though I have never experienced UEFI either.

Any ideas?

Thanks.

Re: GA-Z77-UD5H show boot item when drives are connected
« Reply #1 on: September 05, 2012, 12:08:18 pm »
To update. As I had wrote the previous post while at work. I got home and switched the bios to the backup bios in an attempt to remove the mysterious 'ubuntu' boot item. This has worked.

So this means some how I have made a 'ubuntu' boot item in the main bios. The question is what could have caused this? I have never known an operating system to go any where near a bios...? And to reiterate this I have reinstalled ubuntu on the ssd present in the computer and not created a boot item.

The major difference is the bios version. The mysterious one is the main (F14) and the one correctly behaving is the older backup (F7). What version of the bios ships with the motherboard? As it seems strange there is a discrepency between the 2 bios.

Thanks. 

Re: GA-Z77-UD5H show boot item when drives are connected
« Reply #2 on: September 05, 2012, 01:30:25 pm »
This article should help: Managing EFI Boot Loaders for Linux: Basic Principles
http://www.rodsbooks.com/efi-bootloaders/principles.html

The EFI boot process doesn't refer to code in the MBR, and it normally doesn't use code in the boot sector of a partition, either. Instead, the EFI loads the default boot loader (normally EFI/BOOT/BOOTX64.EFI) or a boot loader whose filename is stored in the firmware's flash memory. This boot loader can then load an OS directly (as the Windows EFI boot loader does) or it can present a menu or prompt with additional options (as Linux EFI boot loaders do).

So we know that a bootloader (such as grub-efi for linux) can have the filename stored in flash.
But the question is how did it get there?

When you installed Ubuntu it would have installed packages such as grub-efi or grub-efi-amd64 which is the most common EFI bootloader for Linux. There probably would have also been a software package called EFI Boot Manager:
http://linux.die.net/man/8/efibootmgr

efibootmgr is a userspace application used to modify the Intel Extensible Firmware Interface (EFI) Boot Manager. This application can create and destroy boot entries, change the boot order, change the next running boot option, and more.

Some info on UEFI booting in Ubuntu here:
https://help.ubuntu.com/community/UEFIBooting

In any case it appears that when ubuntu was installed, it used EFI Boot Manager to create an entry in flash so that you can boot ubuntu. Otherwise it would have had to install the ubuntu bootloader in the default path (since we wouldn't be able to tell the flash about any other place):

/EFI/boot/bootx64.efi

Which would not be the ideal solution if the same disk was required to boot more than one operating system.


« Last Edit: September 05, 2012, 01:34:29 pm by alex80386 »

Re: GA-Z77-UD5H show boot item when drives are connected
« Reply #3 on: September 06, 2012, 02:31:44 am »
Thank Alex top notch answer and some interesting reading to get through,

This is certainly what has happened. Interestingly I was on the path to working with efibootmgr until I switched bios's and found the point of difference.

More interestingly though was that with the ubuntu efi boot-loader flashed the bios and became unstable. Drives would inconsistently unmount themselves and disappear from the boot menu. Or does the flashed item look at the efi partition on the drive? As this had been formatted and removed.

-Matt