Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
My old nemesis is back. The single most dreadful piece of software to ever plague the Linux landscape: Grub (not legacy).
Code:
# grub-install /dev/sdb
Installing for i386-pc platform.
grub-install: warning: this GPT partition label contains no BIOS Boot Partition; embedding won't be possible.
grub-install: warning: Embedding is not possible. GRUB can only be installed in this setup by using blocklists. However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 1.0.1
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Note that gdisk produces the exact same output for sda and sdb, except number and size of partitions. Grub installed on sda. What in the Grub Hell is going on?
Well, if your disks are GPT then you have no MBR for grub to install on, because GPT does not use MBR it is GPT, not MBR. If you have a UEFI boot, then you need to follow the instructions to install UEFI grub. Which in this case you must have UEFI because you stated exact same output for sda and sdb. Look into UEFI grub and how to install and manage it.
I do not do UEFI, or I'd probably have more info for you, but this should be enough to get you on the right track.
Well, if your disks are GPT then you have no MBR for grub to install on, because GPT does not use MBR it is GPT, not MBR. If you have a UEFI boot, then you need to follow the instructions to install UEFI grub. Which in this case you must have UEFI because you stated exact same output for sda and sdb. Look into UEFI grub and how to install and manage it.
How come the same grub installed on sda, also GPT, also with a protective MBR?
Grub needs extra room between the mbr and first partition to install everything, this extra space exist on mdos disk but not on a gpt disk. On a gpt disk create an empty 1mb partition flagged as bios-grub for legacy install of grub. I think this might work without a bios-grub partition to make fit in mbr of gpt but not sure
# grub-install /dev/sdb
Installing for i386-pc platform.
This would indicate the op is booting in legacy mode. Is it possible the op is mixing legacy and efi on the same system, windows installed in efi mode and debian installed in legacy mode, hence forth the problem. If your booting in legacy mode /sys/firmware/efi won't exit.
If debian is install in legacy mode and assuming debian is 64bit, one way would be to boot installation disk in efi mode, run fdisk -l or parted -l to determine efi partition
mount system partition to /mnt
create /mnt/boot/efi
mount efi partition to /mnt/boot/efi
then
you will get error about efivars or something similar.
reboot, at restart use esc/f-keys to get boot options, you should have one for debian.
If your able to boot into debian efi mode,
mount efi partition to /boot/efi run grub-install
Create an entry in fstab to mount efi partition to /boot/efi
Last edited by colorpurple21859; 07-20-2019 at 05:34 PM.
This would indicate the op is booting in legacy mode. Is it possible the op is mixing legacy and efi on the same system, windows installed in efi mode and debian installed in legacy mode, hence forth the problem. If your booting in legacy mode /sys/firmware/efi won't exit.
I use EFI. Debian only, no other OS. I never chose to boot in legacy mode. Why does it happen?
I used to have the 'grub-pc' package, still have 'grub-pc-bin.' I removed grub-pc and intalled grub-efi, grub-efi-amd64, and grub-efi-amd64-bin.
Quote:
Originally Posted by colorpurple21859
run fdisk -l or parted -l to determine efi partition
What does "determine" mean exactly? Do you mean I need to know my partition table or actually create that efi partition?
You need a fat32 formatted esp flagged partition about 200-300mb to boot in uefi mode. If this is a system with windows 10 preinstalled it probably already exist. If this is an empty drive you will need to create one.
Last edited by colorpurple21859; 07-21-2019 at 04:14 PM.
Again, Windows is not involved at all in any of this. I never had Windows installed in any of these disks. Please stop mentioning Windows.
I don't have a FAT32 formatted ESP flagged partition about 200-300MB to boot in UEFI mode in the other hard disk. How did Grub ever get installed in it? I have /boot as ext2 in a 200MB partition. Would that fit the purpose?
If I have to sacrifice 200-300MB of my hard disk just so I can do something as unbelievably basic as BOOTING, then I'll just ditch this horrible POS and look for boot loaders that won't impose ridiculous demands.
This doesn't have anything to do with grub. It is an efi thingy. Your system may have had legacy mode enabled and switched to legacy automatically. With out info on you drive setup it is all a guessing game.
Last edited by colorpurple21859; 07-21-2019 at 07:40 PM.
Distribution: Artix, Slackware, Devuan etc. No systemd!
Posts: 368
Rep:
Hi,
I've just seen this thread.. Sorry, must disagree.. IMHO Grub2 is the best, most versatile bootloader available. It's very powerful when used properly.
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.
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.
I've seen machines with GPT drives (UEFI firmware, legacy mode disabled) where a legacy installation succeeds. Some tools then reported an MBR installation and others a UEFI one.
The machine seemed to run reasonably O.K. but an examination of the partition structures showed "a real mess". I advised the owner to backup his user files and start from scratch. Create a GPT drive and reinstall.
I've also seen a couple of UEFI machines that had pre-formatted MBR drives used (without creating GPT drives). Installation succeeded but drive performance was poor. Again, reinstalling with GPT solved this.
I think that poor UEFI firmware is behind most of these problems.. Just my 10p worth...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.