Supermicro server cannot enter BIOS with F2, DEL or other when UEFI mode OS is installed

If you happen to have a supermicro server (X10SLH-F) and install Linux in UEFI mode in our case CentOS 7 and you want to enter the BIOS you’ll be surprised that you cannot with the keys provided in the very same BIOS boot screen – F2, DEL. The F11 and F12 also does not work for menu selection and network boot!

Even if you manage to press the DEL key and you see on the screen “Entering BIOS setup…” – the server WON’T enter BIOS, but will continue with the UEFI BIOS boot drive!

So what to do? Ammm break temporary your system by removing (renaming or moving) the EFI directory in your efi boot partition, resetting your server and holding pressed DEL key (again) on all start up screens of the server. When the UEFI BIOS boot entry is not valid any more and there are no other boot devices (and probably because we pressed DEL key) we were able to enter in the BIOS without remote hands on the collocation side or any other intervention on the server.

[root@srv ~]# mv /boot/efi/EFI/ /boot/efi/EFI_org
[root@srv ~]# reboot

This is the path in CentOS 7 and our standard partition layout:

[root@srv ~]# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda3         26G  4.5G    20G  19% /
devtmpfs         7.8G     0   7.8G   0% /dev
tmpfs            7.8G     0   7.8G   0% /dev/shm
tmpfs            7.8G  8.5M   7.8G   1% /run
tmpfs            7.8G     0   7.8G   0% /sys/fs/cgroup
/dev/sda2        976M   98M   812M  11% /boot
/dev/sda1        200M  9.8M   191M   5% /boot/efi
tmpfs            1.6G     0   1.6G   0% /run/user/0

DO NOT forget to remove all other (virtual) CD/DVD ROM Devices and temporary disable your network PXE Server (if you have any in the network)

Because it when the UEFI BIOS cannot find the EFI file saved in the UEFI BIOS BOOT drive it might follow the boot order before entering the BIOS!

Enter the bios by remote console on our X9 boards with UEFI bios

Apparently there is an issue with X8 and X9 supermicro boards in UEFI mode BIOS: https://www.supermicro.com/support/faqs/faq.cfm?faq=14029
So for someone it could be useful pressing and holding “ESC” + “-” or F4 to enter the UEFI BIOS, but we could not make it because of the IPMI KVM we used to manage the server.

grub2: grub-install: error: disk mduuid not found even after the partition has bios_grub on

This tutorial is for all of us that has done everything by the book with parted and still they receive an error when installing grub2 to the boot sector!

srv@local ~ # grub2-install /dev/sda
Installing for i386-pc platform.
grub2-install: error: disk `mduuid/51b39c2b565a6629d9efc9b3c39b44ff' not found. 

The solution is simple enough:

set the bios_grub on AGAIN even the parted reported it as ON

So you have a problem with your disks and booted to reinstall the grub and used parted from the rescue CD/DVD/USB and then you chroot to the OS you wanted to repair and execute

grub2-install or grub-install

you get the error above? But why parted reported this:

srv@local ~ # parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) p                                                                
Model: DELL PERC H700 (scsi)
Disk /dev/sda: 480GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name     Flags
 1      1049kB  2097kB  1049kB                  primary  bios_grub
 2      2097kB  4096MB  4094MB  linux-swap(v1)  primary  raid
 3      4096MB  24.0GB  19.9GB  ext4            primary
 4      24.0GB  480GB   456GB   ext4            primary

(parted)

And still you get the error:

grub2-install: error: disk `mduuid/51b39c2b565a6629d9efc9b3c39b44ff' not found. 

Why it is unknown for us, but the solution was simple, just do SET the flag again – in our case in the chrooted environment we used the parted program from the distro we wanted to repair and the grub-install was then used from the same distro (in the chrooted environment). At first we used the parted from the rescue distro, but apparently they are some issues with the versions even the two parted program – that one from the chrooted environment and from the rescue distro reported the bios_grub as set ON.
It is possible to get this error after using

sgdisk

to duplicate the partition table of a disk (BTW ALWAYS use “-G, –randomize-guids” with sgdisk, after you duplicate the partition table of a disk or you’ll get into BIG troubles!).
So to write down the solution (in fact it’s like a workaround):

srv@local ~ # parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) set 1 bios_grub on
(parted) q
srv@local ~ # parted /dev/sdb
GNU Parted 3.2
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) set 1 bios_grub on
(parted) q
srv@local ~ # grub2-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
srv@local ~ # grub2-install /dev/sdb
Installing for i386-pc platform.
Installation finished. No error reported.

* If you are using UEFI enabled boot you probably need more options for the grub installation

Something like that for the grub2 installation (but it is specific for your distro – the path for efi directory, just find it under /boot and put the right path – nothing special!):

grub-install --recheck --target=x86_64-efi --efi-directory=/boot/efi/ /dev/sda