UEFI problem after LInux installation in Legacy mode on GPT partition table
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
UEFI problem after LInux installation in Legacy mode on GPT partition table
Hey all,
I have a dell xps 15 laptop, which came with pre-installed Win7 and some other Dell recovery partitions. SO out of the box it had UEFI boot enabled with several options (windows and etc). After some experiments with installing Fedora on top in automated manner on freed space (e.g neither ESP, nor Windows partitions were not affected), I realized that I had it installed in Legacy mode on GPT partition table (e.g with bios_grub partition and refitting protective MBR first 460 bytes with GRUB loader).
The problem is, that after this operation my UEFI firmware does not see ESP partition on this disk! ESP was not removed and still in place:
Code:
gdisk /dev/nvme0n1
GPT fdisk (gdisk) version 1.0.3
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/nvme0n1: 1000215216 sectors, 476.9 GiB
Model: PC300 NVMe SK hynix 512GB
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 4527FAAC-F0D2-4F20-9EF1-1459272B30ED
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 1000215182
Partitions will be aligned on 2048-sector boundaries
Total free space is 4717 sectors (2.3 MiB)
Number Start (sector) End (sector) Size Code Name
1 2048 1026047 500.0 MiB EF00
2 1026048 1288191 128.0 MiB 0C01 Microsoft reserved ...
3 1288192 69255167 32.4 GiB 0700 Basic data partition
4 973049856 973996031 462.0 MiB 2700
5 973996032 997951487 11.4 GiB 2700
6 997953536 1000214527 1.1 GiB 2700
7 88426496 88428543 1024.0 KiB EF02
Basically switching to UEFI mode and trying to add EFI bootloader in Bios does not do any good, it basically does not see ESP partition with error "Filesystem not found".
I've tried booting EFI Shell in UEFI mode from the USB flash drive - it shows disk as a BLK01 device without any FS on it, which brings us back to UEFI basically does not see any ESP on the disk..
GPT is intouched so my question is, what kind of black magic happened - that brakes UEFI to see ESP partition?
What I've already tried:
1) Recreating ESP
2) Write zeros to 460 bytes of MBR
One small thing - I've tried loading Fedora from live CD in UEFI mode and list the EFI entries via uefimngr and it sees them fine from the OS, I can add entry, remove it and change order.
There are two sizes of efi for each drive type. However you can only have limited things in this area usually. The size is rather small for large files.
Check your esp partition is formatted as vfat32 and not ntfs.
Yes its vfat32, just tried to reformat one more time..
Quote:
Originally Posted by colorpurple21859
What does efibootmanager show?
I had not rebooted, to basically give you the list, but it show something about 7 fields including WIndows, Fedora and Dell recovery among USB drive.by Fedora ins
It seems that something was changed bu Fedora installer, so UEFI firmware does not see ESP partition at all, but the question is what exactly can have this effect?
I had not rebooted, to basically give you the list, but it show something about 7 fields including WIndows, Fedora and Dell recovery among USB drive.by Fedora ins
Is this list from when you first boot and hit the esc key are something similar? If so when do you get the
No, the list is output of efibootmgr command running from liveCD in UEFI mode. THis list should be seeing from BIOS. However when you try to add boot record from BIOS it show the message provided "Filesystem not found" e.g BIOS does not see ESP partition on the disk
Your original post indicates you are using GPT partitioning so windows needs to be UEFI which it is as sda1 is your EFI partition. You installed Fedora Legacy with GPT so you needed a BIOS boot partition which you also have (sda7). With this setup, it should have been possible to boot either but it would be a convoluted process of going in and changing BIOS settings to UEFI to boot windows and Legacy to boot Fedora.
Your post #3 shows you have some Grub files in efi/EFI/BOOT and it also shows that you have a fedora directory in /esp/EFI. I would expect to see the Fedora boot files in the fedora directory. Not sure what's up with /esp/EFI and /efi/EFI, generally all these files are in the EFI directory on that partition. Maybe Fedora does things differently? Have you looked in the fedora directory to see what you have there?
What's the status now, can you boot anything?
Your original post indicates you are using GPT partitioning so windows needs to be UEFI which it is as sda1 is your EFI partition. You installed Fedora Legacy with GPT so you needed a BIOS boot partition which you also have (sda7). With this setup, it should have been possible to boot either but it would be a convoluted process of going in and changing BIOS settings to UEFI to boot windows and Legacy to boot Fedora.
Your post #3 shows you have some Grub files in efi/EFI/BOOT and it also shows that you have a fedora directory in /esp/EFI. I would expect to see the Fedora boot files in the fedora directory. Not sure what's up with /esp/EFI and /efi/EFI, generally all these files are in the EFI directory on that partition. Maybe Fedora does things differently? Have you looked in the fedora directory to see what you have there?
What's the status now, can you boot anything?
Hi, so the status is - that I can boot in Legacy mode only. And UEFI still not working. Currently I have no guess why DELL Bios not detecting EFI partition at all on this particular setup. I have a hunch, that the matter is in "grub bios" partition. e.g UEFI bios somehow detects it, and possibly marks whole disk as non-uefi. But I had not tried to remove that partition and check that out
If your current situation is that you can boot Fedora in Legacy mode but not EFI but cannot boot windows EFI and you remove the BIOS boot partition (#7), you won't be able to boot anything. Not sure why you can't boot both UEFI as you have files for both windows/fedora on your efi partition although the path looks a little weird to me. Did you ever check the EFI/fedora directory? I haven't used Fedora in years os don't know what to expect with EFI. Not familiar with the Dell BIOS either.
If your current situation is that you can boot Fedora in Legacy mode but not EFI but cannot boot windows EFI and you remove the BIOS boot partition (#7), you won't be able to boot anything. Not sure why you can't boot both UEFI as you have files for both windows/fedora on your efi partition although the path looks a little weird to me. Did you ever check the EFI/fedora directory? I haven't used Fedora in years os don't know what to expect with EFI. Not familiar with the Dell BIOS either.
Good day,
The core problem is not under EFI partition, the Fedora EFI one is fine, and seems bootable (if placed on USB stick). The whole fuss is about Bios not seeing ESP partition at all
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.