LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-21-2019, 07:12 PM   #16
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Stretch
Posts: 1,075

Original Poster
Rep: Reputation: 83

Quote:
Originally Posted by bodge99 View Post
All of the advice given above is totally correct. It would appear that the OP is attempting to use the Grub tools in a "non-standard" way.
I am merely replicating everything I ever did on the first hard disk, always successfully.

Quote:
Originally Posted by bodge99 View Post
The initial error messages are purely a report on why grub-install cannot perform the requested action. i.e. the drive is either not an MBR drive or doesn't have any allocated space for a bios boot partition.
gdisk says it is and it does. It produces the exact same output for both disks except size.
 
Old 07-21-2019, 07:35 PM   #17
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 282

Rep: Reputation: 54
Hi,

Please don't think that I'm doubting you.. I'm not! It's just that installing grub to sda implies an MBR disk, whereas the report of GPT & protective MBR implies a GPT drive.

Without knowing more about the drive's history, then I can only guess the exact status of your drives. I'm of the opinion that the grub MBR write operation has bypassed the protective MBR and has ended up at the very front of the GPT drive.. In essence you may have something that is close to being a hybrid MBR/GPT drive.

I personally avoid these like the plague. I consider them virtual "time bombs" from the data security point of view. The drives may work perfectly fine on your machine now, but they may be "problematic" if moved to another.

Bodge99
 
1 members found this post helpful.
Old 07-21-2019, 08:43 PM   #18
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 5,216

Rep: Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992
Quote:
I think that poor UEFI firmware is behind most of these problems.. Just my 10p worth...
That is part of the problem not all uefi firmware behaves the same way. On my other system it wouldn't let you boot the internal drive in legacy mode. This system it will boot internal gpt drive in legacy mode when legacy mode is enabled and there are no efi entries in the bios firmware. I found that one out by accident. The other system efibootmgr worked as advertised, this system not so much.
Without knowing the ops ouput of fdisk -l and the bios settings can't tell what is really happening.

Last edited by colorpurple21859; 07-21-2019 at 08:49 PM.
 
1 members found this post helpful.
Old 07-22-2019, 02:10 PM   #19
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Stretch
Posts: 1,075

Original Poster
Rep: Reputation: 83
I converted my GPT table to MBR with gdisk. It worked and stupid Grub finally decided to install.

AFTER TWO DAYS OF STRUGGLE, it's booting. Cue the angel choir and the heavenly light beam.

Whatever. As long as I don't have to wrestle with that hunk of garbage anymore.

I won't mark this as solved. What if I it was a larger disk and I really had to use GPT? Grub sucks and stinks to high heaven.

Moving on with my life. Thank you for the attention.
 
Old 07-22-2019, 03:09 PM   #20
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 5,216

Rep: Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992
I believe a 1mb partition flagged as bios-grub would have also fixed the problem with the gpt disk.
https://en.wikipedia.org/wiki/BIOS_boot_partition that I mentioned in post 5.
Anyways at least you got working.

Last edited by colorpurple21859; 07-22-2019 at 03:27 PM.
 
Old 07-23-2019, 03:04 AM   #21
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 15,948

Rep: Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279Reputation: 5279
Quote:
Originally Posted by lucmove View Post
I converted my GPT table to MBR with gdisk. It worked and stupid Grub finally decided to install.

AFTER TWO DAYS OF STRUGGLE, it's booting. Cue the angel choir and the heavenly light beam.

Whatever. As long as I don't have to wrestle with that hunk of garbage anymore.

I won't mark this as solved. What if I it was a larger disk and I really had to use GPT? Grub sucks and stinks to high heaven.

Moving on with my life. Thank you for the attention.

Did you try [to check] my post (#7)? I mean the link I posted.
(From my side if I have no idea about what's happening I used to say stupid me)
 
Old 07-23-2019, 06:11 AM   #22
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Stretch
Posts: 1,075

Original Poster
Rep: Reputation: 83
Quote:
Originally Posted by pan64 View Post
Did you try [to check] my post (#7)? I mean the link I posted.
(From my side if I have no idea about what's happening I used to say stupid me)
I saw it and I didn't like the idea of creating a new 2MB partition. I had an empty 1MB space. I don't know if that would be enough, but I know that adding it would change the labels/numbering of sda1, sda2, sda3 etc.

Let's face it: Grub only does a half-assed job of supporting EFI. It requires kludges, ropes and stepping stones to reach it. Do Win and Mac users (no dual boot) go through that too?

And there is nothing stupid about me. I want something very reasonable. I want to say, "Computer, apply the proper code to the boot sector of this disk so it will boot." I am not asking it to make coffee. I am asking that it boots. When the mere wish to BOOT UP is asking too much or requires so much bending over backwards, something is very wrong. I could not BOOT UP, for Turing's sake. That is ridiculous.

Thank you for your contribution. I kept that tab opened for most of the time of my predicament. I just thought it wasn't the best approach.
 
Old 07-23-2019, 06:46 AM   #23
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 5,216

Rep: Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992
Quote:
Grub only does a half-assed job of supporting EFI
But your not booting in efi, your booting in legacy mode. Check to see if you have a /sys/firmware/efi folder.

Last edited by colorpurple21859; 07-23-2019 at 06:51 AM.
 
Old 07-23-2019, 11:53 AM   #24
lucmove
Senior Member
 
Registered: Aug 2005
Location: Brazil
Distribution: Debian Stretch
Posts: 1,075

Original Poster
Rep: Reputation: 83
Quote:
Originally Posted by colorpurple21859 View Post
But your not booting in efi, your booting in legacy mode. Check to see if you have a /sys/firmware/efi folder.
No, I don't. Do you?

I didn't choose that. When I boot up off a CD or USB, my motherboard offers me two boot menu items for it: UEFI and not. I booted into UEFI mode when I booted off the Debian CD and installed it. Debian or Grub in Debian decided to install the "legacy" flavor, not me.

Now, I don't have that option for hard disks. I guess it's whatever Grub tells the BIOS about them then.

Do you boot in EFI mode? Do you have trouble installing Grub in a legacy MBR disk, or does this problem only happen when it's the other way around?
 
Old 07-23-2019, 12:14 PM   #25
hazel
LQ Guru
 
Registered: Mar 2016
Location: Harrow, UK
Distribution: LFS, AntiX, Slackware
Posts: 5,178
Blog Entries: 14

Rep: Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991Reputation: 2991
Just a brief note on GPT disks. They can boot from a BIOS, a UEFI in legacy mode (which behaves like a BIOS) or a UEFI in native mode. But the GRUB requirements will vary.

If you are booting a GPT disk from a BIOS (or anything that behaves like one), the first part of GRUB will go into the "protective MBR" because that's where the BIOS will expect to find it. But the second part of GRUB can't go into its usual position between the MBR and the first partition because that space doesn't exist on a GPT disk. It's taken up by the further sectors of the partition table.

So in such cases, you need the first partition to be a "BIOS boot partition". This is a special type of partition created with gparted or gdisk to contain GRUB Stage 2. You don't put a filesystem on it because GRUB Stage 1 needs to find Stage 2 by its physical address, not by a filename. You obviously don't have such a partition; that's what grub-install is complaining about. If you can create one (it only needs to be a few MB), your problem is solved.

Some of the posters in this thread seem to be confusing the BIOS boot partition with the EFI System Partition. This will only exist if you have a UEFI. Unlike a BIOS boot partition, an ESP has a filesystem, which must be FAT-based. Usually it is FAT32. If you are booting with a UEFI in native mode, GRUB stage 2 will go here and the UEFI will boot it directly. You don't even need stage 1 in that case.

btw I agree with the OP about GRUB. It's a horrible mess.

Last edited by hazel; 07-23-2019 at 12:15 PM.
 
1 members found this post helpful.
Old 07-23-2019, 12:41 PM   #26
bodge99
Member
 
Registered: Oct 2018
Location: Ashington, Northumberland
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 282

Rep: Reputation: 54
hi,

I've never had any problems with Grub at all.. For single installations (only one os per machine) I just use the distro boot tools.. these tend to be fully automated and work pretty well. One machines that I multi boot with, I tend to do things "my way". Basically put grub (and all of the grub support files) into the EFI partition. A manually created grub.cfg in /boot/efi/EFI/BOOT (or /EFI/BOOT wrt the tld of the EFI partition) allows each installation grub configuration to be totally independent.

Why would you attempt a UEFI/GPT installation on an MBR/legacy system or a legacy installation on a UEFI/GPT system?? This makes as much sense as putting diesel in a petrol engine..

Bodge99
 
Old 07-23-2019, 01:13 PM   #27
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: slackware64-current, fedora,Xubuntu, others
Posts: 5,216

Rep: Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992Reputation: 992
Quote:
Do you boot in EFI mode? Do you have trouble installing Grub in a legacy MBR disk, or does this problem only happen when it's the other way around?
NO, not anymore I took the time to learn how grub works with gpt disks in efi and legacy mode both. I boot multiple distros along with windows on gpt disk without no problems on the hp laptop that I currently use. I'm able to boot in efi or legacy mode with the Linux distros

Quote:
I booted into UEFI mode when I booted off the Debian CD and installed it. Debian or Grub in Debian decided to install the "legacy" flavor, not me.
or at least you thought you was booting in uefi mode, henceforth the question did you have a /sys/firmware/efi directory, if the answer was no, you booted in legacy mode. Yes, I'm well aware of that being the problem, but none of the suggestions that was being made, you didn't won't to do for one reason or another and you wouldn't post some of the information that was asked, so like I said earlier it was just a guessing game.

Anyways at least you figured out a way to get it fixed to your liking.

Last edited by colorpurple21859; 07-23-2019 at 01:18 PM.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Infinite Grub Loop: GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB GRUB... beeblequix MEPIS 2 11-02-2013 11:56 PM
Booting my new ubuntu install = "GRUB GRUB GRUB GRUB GRUB" etc. dissolved soul Ubuntu 2 01-13-2007 01:55 PM
lilo to grub headaches harry349 Linux - General 3 05-23-2004 10:17 PM
GRUB GRUB GRUB GRUB "Whats Going on?" Gaweph Linux - Newbie 6 03-26-2004 11:40 AM
Usual partitioning/cylinder problems from an ignoramus. Scuttler Linux - Software 3 12-04-2001 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 06:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration