LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 03-13-2018, 01:55 PM   #1
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Rep: Reputation: Disabled
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

This does not help a bit.

Thanks in advance
 
Old 03-14-2018, 07:08 AM   #2
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
What files are on the efi partition?

Quote:
pre-installed Win7 and some other Dell recovery partitions. SO out of the box it had UEFI boot enabled
Are you sure Win7 was installed in efi mode?
 
Old 03-14-2018, 08:38 AM   #3
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Original Poster
Rep: Reputation: Disabled
Hey,
so on EFI partition there are pretty large amount of EFI files:
Code:
ls -la /esp/EFI/
total 24
drwxr-xr-x. 6 root root 4096 2018-03-07 16:30 .
drwxr-xr-x. 3 root root 4096 1970-01-01 ..
drwxr-xr-x. 3 root root 4096 2018-03-08 10:25 BOOT
drwxr-xr-x. 4 root root 4096 2018-01-22 11:20 dell
drwxr-xr-x. 4 root root 4096 2018-03-08 10:26 fedora
drwxr-xr-x. 4 root root 4096 2018-01-22 11:18 Microsoft

ls -la /efi/EFI/BOOT/
total 6016
drwxr-xr-x. 3 root root    4096 2018-03-08 10:25 .
drwxr-xr-x. 6 root root    4096 2018-03-07 16:30 ..
-rwxr-xr-x. 1 root root    1167 2017-11-05 07:38 BOOT.conf
-rwxr-xr-x. 1 root root  970064 2017-11-05 07:38 BOOTIA32.EFI
-rwxr-xr-x. 1 root root 1293304 2017-11-05 07:38 BOOTX64.EFI
drwxr-xr-x. 2 root root    4096 2017-11-05 07:38 fonts
-rwxr-xr-x. 1 root root    5190 2018-03-08 15:43 grub.cfg
-rwxr-xr-x. 1 root root  737608 2017-11-05 07:38 grubia32.efi
-rwxr-xr-x. 1 root root 1030472 2017-11-05 07:38 grubx64.efi
-rwxr-xr-x. 1 root root  929864 2017-11-05 07:38 mmia32.efi
-rwxr-xr-x. 1 root root 1163208 2017-11-05 07:38 mmx64.efi
as an example.

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.

Last edited by smbdie; 03-14-2018 at 08:39 AM.
 
Old 03-14-2018, 02:32 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 22,019

Rep: Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630Reputation: 3630
What does efibootmanager show?

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.

https://docs.microsoft.com/en-us/win...ive-partitions

I'd think a later version of 64 bit windows 7 could recreate this area if you don't want to make it under linux.

Seems to be a lot of dell users having issues on this.

Last edited by jefro; 03-14-2018 at 02:34 PM.
 
Old 03-14-2018, 02:35 PM   #5
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Check your esp partition is formatted as vfat32 and not ntfs.
 
Old 03-14-2018, 03:02 PM   #6
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by colorpurple21859 View Post
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 View Post
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?
 
Old 03-15-2018, 09:04 AM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
Quote:
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
Quote:
Filesystem not found
error?
 
Old 03-16-2018, 11:26 AM   #8
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Original Poster
Rep: Reputation: Disabled
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
 
Old 03-17-2018, 08:55 AM   #9
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
maybe the efi partition needs to be fat16 I've seen some rare instances where that was the case
 
Old 03-17-2018, 02:51 PM   #10
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Original Poster
Rep: Reputation: Disabled
Just tried FAt16 with basically same effect. Also I've tried Windows Recovery CD, which was not able to find any problems with it.
 
Old 03-17-2018, 05:55 PM   #11
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,568

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
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?
 
Old 03-27-2018, 01:07 PM   #12
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
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
 
Old 03-27-2018, 05:48 PM   #13
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,568

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
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.
 
Old 03-28-2018, 02:08 PM   #14
smbdie
LQ Newbie
 
Registered: Jul 2011
Distribution: Centos, Fedora, RHEL
Posts: 12

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by yancek View Post
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
 
Old 03-28-2018, 04:11 PM   #15
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,568

Rep: Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499Reputation: 2499
If the BIOS no longer sees the EFI partition, I expect this is a problem best discussed with Dell.
 
  


Reply

Tags
bios, gpt, legacy, uefi



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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rebuild UEFI windows 7 or 10, dual boot, mint17 Linux, GPT vs msdos partition table rtoney5 Linux - General 2 07-14-2017 10:03 AM
[SOLVED] dual boot win7/slackware 14.2 64bit in legacy mode on gpt disk timsoft Slackware 14 12-11-2016 05:14 PM
[SOLVED] Partition table and partitioning requirements for GRUB2 UEFI installation to USB? seangllghr Linux - Laptop and Netbook 5 04-09-2014 11:29 PM
GPT, UEFI and BIOS Legacy slaka Linux - Laptop and Netbook 8 04-17-2013 07:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:08 AM.

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