GRUB 2 does not start from BIOS anymore

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post please read how to get help
Post Reply
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

GRUB 2 does not start from BIOS anymore

Post by Moishe »

SYSLINUX boots from USB.
Super Grub2 Disk 2.02s4: (http://www.supergrubdisk.org/category/d ... sk-stable/) calls GRUB menu without a problem.
No need to search for boot options.
It is sufficient to select the default Super Grub2 Disk option: boot from HDD.
In other words: the only way to start GRUB2 is via SYSLINUX from USB.

Boot-repair-disk (https://sourceforge.net/projects/boot-repair-cd/) log is here: http://paste.ubuntu.com/16876210/.
Boot-repair-disk did not fix the GRUB 2.
Linux reinstall did not fix the problem too.

Have 3 Linux Mint versions installed that GRUB should find and boot properly.
Other Linux versions can add to GRUB later manually and this is OK.

The issue started after formating sda1 (could be some GRUB 2 files were located there earlier, could be I installed GRUB once in the past on sda1 and not on sda) and installing third Linux Mint on another partition (that become sda1 after Gparted action). But somehow sda1 become sda5 after Gparted action (removing it and then creating a new partition). So now sda5 starts from the lowest sectors...

How to fix GRUB 2? What prevents it to start from BIOS? GRUB 2 alternative?
I noticed that on sda2 the following is missing: /boot/grub/i386-pc/core.img
But this is present on sda1 and sda4
Could this be the reason?
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
grizzler
Level 5
Level 5
Posts: 652
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: GRUB 2 does not start from BIOS anymore

Post by grizzler »

According to the Boot-Info output, the first partition on the disk (sda5) is in a bit of a weird state. It's marked as a BIOS Boot Partition (BBP), but it is formatted as ext4 and even gets mounted in one of the fstab files. This is BAD. A BBP is where GRUB puts its (binary) core image on a disk with a GPT in a machine with a BIOS (rather than an EFI). If that partition is formatted and mounted, there's no telling how it may get messed up.

How to fix this? First remove the formatting from that partition and mark it (again) as BBP. In gparted the flag is called bios_grub. Make sure no fstab tries to mount it. Then reinstall GRUB. It should pick up the BBP automatically.
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

Thanks! It must be a good point!

It probably relates only to the legacy mode - correct?
Do I need BBP when I use UEFI?
BBP should not be formatted?
Or you mean formatted as: cleared?

Someone advised me that for UEFI I need 512mb fat32 boot partition.
Then he advised that I must install GRUB 2 on sda1 (sda2 or whatever partition formatted this way) on /boot/efi
Secure boot should be disabled.
Can you confirm?
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
fabien85
Level 7
Level 7
Posts: 1810
Joined: Tue Mar 11, 2014 4:30 pm

Re: GRUB 2 does not start from BIOS anymore

Post by fabien85 »

Good point from grizzler, the bios-grub partition is mounted at /boot. You must have been confused by reading different informations.

The bios-grub partition is needed only in the case when you want to boot in Legacy mode with a GPT disk. In that case, the partition contains the grub image.
/boot is a different thing, it is the place that usually contains the linux kernel, initrd image, and the config file grub.cfg. It can be on a separate partition if you want, but it does not have too. On this computer I'm writing with, I simply have a partition for / for example.

If you want to boot in Legacy mode, I think it's simpler to format the drive in MBR.

If you want to boot in UEFI mode, the drive has to be in GPT (as it is at the moment), and you indeed need an EFI System Partition (ESP) : small FAT32 partition, preferably at the start of the disk (sda1), flagged as 'boot' with gparted ; 200MB is enough.
There is no use for a bios-grub partition in UEFI mode.
During install, it's indeed better to disable secure boot.

If you want an install in UEFI mode, you need to make sure that your computer is UEFI-capable. Nearly all recent computers are, but I dont know how old yours is.
To find out, look for any mention of EFI or UEFI in your computer manual and/or in the firmware interface. If there is, you are UEFI-capable, otherwise it's Legacy-only.

What's next depends on your computer and your choice : whether you are ok with reinstalling everything, whether you want UEFI or Legacy mode...
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

@fabien85 - you are a star!
First testing legacy mode.
Reinstalled GRUB 2, log: http://paste2.org/YCyExbgE
Disabled UEFI in bios.
Now I will reboot.
Will keep you posted. :wink:
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: GRUB 2 does not start from BIOS anymore

Post by austin.texas »

I like the idea of installing in Legacy mode to a GPT disk. I have switched both my hard drives to GPT.
All my OS installations are Legacy, just as yours are.
Follow these instructions :arrow: Legacy Mode Installation Using GPT Partitions
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

Thanks for the link!
Somehow first attempt to do it in legacy failed.
I will follow your link and try again.

In the meantime I tested UEFI mode too, but received this error:
"The current session is in Legacy mode. Please reboot the computer, and use this software in an EFI session. This will enable this feature. For example, use a live-USB of Boot-Repair-Disk-64bit (http://www.sourceforge.net/p/boot-repair-cd), after making sure your BIOS is set up to boot USB in EFI mode"

So my SYSLINUX Yumi flash must be Legacy...
How can I transform it into UEFI?
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: GRUB 2 does not start from BIOS anymore

Post by austin.texas »

If you really want to switch everything to UEFI, you will have to re-install Grub for all of your installed OS's, according to these instructions
:arrow: Converting Ubuntu into UEFI or Legacy mode
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

austin.texas - Thanks for the link!
It looks very good!

Hope to find or figure out the right procedure in my configuration soon!!!
So far it has been like a real FOOBAR!
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: GRUB 2 does not start from BIOS anymore

Post by austin.texas »

My opinion is that switching everything to UEFI is more trouble than it is worth. There is nothing wrong with a legacy installation on a GPT drive.
TUTORIAL: viewtopic.php?f=42&t=223015
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

@austin.texas - Thanks!

A few facts:
1. I did not realize I had a GPT disk on one of my PCs.
2. My other PC from 2011 has basic MBR and had originally Windows 7, I upgraded to Windows 10 and in addition I installed there many additional Linux versions (Mint and other frugal) without any problem and without using boot tools (I only had to add to Grub some code to add frugal Linux versions to the booting list).
3. Everything boots perfect on this basic MBR PC: Windows 10 and each Linux. No need for BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of this disk! As far as I understand it can work like this because it is NOT GPT.
4. My PC with GPT also worked fine. I had only 2 Mint versions there. Then I decided to make one partition bigger and add another Mint and a few frugal Linuxes.
5. I remember I had there a 512 MB ext4 (YES ext4 and not fat32) partition on this GPT disk. It was the first partition. It was mounted like: boot/efi
6. I do not know why but I came to probably wrong conclusion that I do not need this 512 MB ext4 partition that big as it was about 95% empty.
7. I wanted to make it smaller but when Gparted did it it returned an unknown error.
8. I did not want to have partition with a strange error so I decided to remove it (grave mistake!).
9. From this point the problems started and each attempt to recreate this partition or fix Grub any other way with Grub Boot-repair tools failed.
10. I will follow the instructions from your links very carefully and I hope it will work fine this time. Could be I messed up something in my previous attempts to fix it with Boot-repair tools or in HD partitioning.

The strange thing is that:
- Windows 10 starts from basic MBR (I thought that Windows 10 needs GPT and/or UEFI but apparently it does not!)
- I had 512 MB ext4 partition with boot/efi mounting point on another PC (this PC was newer and had a full UEFI support). It was booting from its 512 MB ext4 partition without any difficulties, I just have a trouble to recreate this partition now! (512 MB ext4 worked for me in the past but people suggest that I should use only 512 MB FAT32, OK, could be it worked for me with ext4 because I do not have Windows 10 on this PC and GRUB does not care if it reads from ext4 or fat32)
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
grizzler
Level 5
Level 5
Posts: 652
Joined: Wed Jun 15, 2011 5:19 pm
Location: The Hague, NL

Re: GRUB 2 does not start from BIOS anymore

Post by grizzler »

Possibly. It's hard to tell why exactly things worked the way they did, but an ESP should definitely be FAT formatted to avoid problems with Windows type operating systems. The UEFI specification prescribes FAT formatting of the ESP anyway.

As has been said before, it's fine to use a GPT disk with the firmware in legacy mode. You just need a BBP and not an ESP in that case and the BBP must not be formatted or mounted. BBP's are only required on GPT disks. MBR disks have enough space between the MBR and the first partition sector to store GRUB's core image.

What I find odd is the Boot-Repair output showing several instances of "The util fdisk doesn't support GPT." This was correct once, but current versions of fdisk do support GPT, so this suggests to me that some things on that system may be pretty outdated. Whether/how this affected the repair attempts is unclear, but it makes me wonder...
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

Good point again.
Some suggest that it is the best to use boot-repair (this is what I used in last case) from a live system:
sudo add-apt-repository ppa:yannubuntu/boot-repair
Could be PPA version a bit out of date?
Today I made a flash GPT UEFI only bootable image from:
https://sourceforge.net/projects/boot-r ... =directory
My intuition tells me that this is going to work fine.

Hope will be able to give it a chance tonight.
Will keep you posted.

GPT disk with the firmware in legacy mode is a problematic option for me because:
1) I have already 3 installations made in UEFI mode (probably - as before I was quite ignorant to these modes and could even mix them up sometimes unintentionally :?)
2) My ASUS BIOS/UEFI configuration does not have a straight forward option to disable UEFI and secure boot mode
3) Future belongs rather to UEFI and not BIOS
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: GRUB 2 does not start from BIOS anymore

Post by austin.texas »

Moishe wrote: A few facts:
3. Everything boots perfect on this basic MBR PC: Windows 10 and each Linux. No need for BIOS-Boot partition (1MB, unformatted filesystem, bios_grub flag) at the start of this disk! As far as I understand it can work like this because it is NOT GPT.
Correct.
Moishe wrote: The strange thing is that:
- Windows 10 starts from basic MBR (I thought that Windows 10 needs GPT and/or UEFI but apparently it does not!)
- I had 512 MB ext4 partition with boot/efi mounting point on another PC (this PC was newer and had a full UEFI support). It was booting from its 512 MB ext4 partition without any difficulties, I just have a trouble to recreate this partition now!
If Windows is installed on a GPT drive, it always installs in UEFI mode, and a ESP (EFI System Partition) will be created.
If Windows is installed on a msdos drive, it always installs in non-UEFI mode (Legacy mode), and the ESP (EFI System Partition) is not needed.
Linux is different. Linux can be installed on a GPT drive in Legacy mode. So you can end up with Windows installed in UEFI and Linux installed in Legacy mode on the same drive - not a desirable configuration.
For instructions on how to create the ESP for UEFI mode installations, see the tutorial :arrow: http://forums.linuxmint.com/viewtopic.php?p=912036
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

Here are the results:

1) UEFI Grub install was not possible with Grub repair disk running in UEFI mode The Grub repair disk was stubbornly rejecting to see the boot partition with fat32, 200-250 MB size and boot flag that Gparted created without any error.

Possible reasons:
- Gparted does not format properly GPT disk
- GPT has its own unresolved bugs
- Grub repair tool from 2014 is not capable to perform this task on GPT
- Other

2) Grub repair disc running in Legacy session (and installed from PPA) could see the boot partition with fat32, 200-250 MB size and boot flag, but it kept complaining that it was running in a legacy session and that it could not do the job. So why running the tool in UEFI session did not solve this issue??? (please see point 1 for details)

3) There is still a possibility that Grub repair disk installed from PPA and in UEFI session could do a better job (hope to check it soon!)

4) After running Grub repair disc in Legacy mode (Recommended Repair) I received this:

"Boot successfully repaired.

Please write on a paper the following URL:
http://paste.ubuntu.com/17045436/

In case you still experience boot problem, indicate this URL to:
boot.repair@gmail.com or to your favorite support forum.

You can now reboot your computer."

Booted again and again Grub did not start!
Will email boot.repair - let's see.
Last edited by Moishe on Tue Jun 07, 2016 5:36 am, edited 11 times in total.
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: GRUB 2 does not start from BIOS anymore

Post by austin.texas »

Moishe wrote:SYSLINUX boots from USB.
Super Grub2 Disk 2.02s4: (http://www.supergrubdisk.org/category/d ... sk-stable/) calls GRUB menu without a problem.
No need to search for boot options.
It is sufficient to select the default Super Grub2 Disk option: boot from HDD.
In other words: the only way to start GRUB2 is via SYSLINUX from USB.
Boot your SuperGrub2.
Chose "Boot Manually" from the first menu, then "Operating Systems".
It will take some time, but you will eventually get a Grub menu allowing you to boot into Mint Mate (or any of the installed OS's).
After booting into Mate, open a terminal and enter:

Code: Select all

sudo update-grub

Code: Select all

sudo grub-install /dev/sda
Then everything should work.
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

austin.texas wrote:Boot your SuperGrub2.
Chose "Boot Manually" from the first menu, then "Operating Systems".
It will take some time, but you will eventually get a Grub menu allowing you to boot into Mint Mate (or any of the installed OS's).
After booting into Mate, open a terminal and enter:

Code: Select all

sudo update-grub

Code: Select all

sudo grub-install /dev/sda
Then everything should work.
Thanks a lot! Looking forward to checking it and sharing with you good news! :P
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

FROM CINNAMON (this did not fix anything again):

Code: Select all

$ sudo update-grub
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 memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
  No volume groups found
Found Linux Mint 17.3 Rosa (17.3) on /dev/sda2
Found Linux Mint 17.3 Rosa (17.3) on /dev/sda3
done
$ sudo grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
FROM MATE (this did not fix anything again too!!!):

Code: Select all

$ sudo update-grub
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.13.0-53-generic
Found initrd image: /boot/initrd.img-3.13.0-53-generic
Found linux image: /boot/vmlinuz-3.13.0-24-generic
Found initrd image: /boot/initrd.img-3.13.0-24-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
  No volume groups found
Found Linux Mint 17.3 Rosa (17.3) on /dev/sda3
Found Linux Mint 17.3 Rosa (17.3) on /dev/sda4
done
$ sudo grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
User avatar
austin.texas
Level 20
Level 20
Posts: 12046
Joined: Tue Nov 17, 2009 3:57 pm
Location: at /home

Re: GRUB 2 does not start from BIOS anymore

Post by austin.texas »

Are you sure that you are not booting in UEFI mode?
Mint 18.2 Cinnamon, Quad core AMD A8-3870 with Radeon HD Graphics 6550D, 8GB DDR3, Ralink RT2561/RT61 802.11g PCI
Linux Linx 2018
User avatar
Moishe
Level 2
Level 2
Posts: 67
Joined: Thu Jun 02, 2016 6:15 am

Re: GRUB 2 does not start from BIOS anymore

Post by Moishe »

100% sure
Have a wonderful day!
"If you're not having fun, you're doing it wrong" - Groucho Marx
Post Reply

Return to “Installation & Boot”