You are not logged in.

#1 2017-09-15 20:37:58

zindabad
Member
Registered: 2017-09-15
Posts: 13

[SOLVED] EFI partition not detected

I'm trying to install Arch on my Dell XPS 13 9360, having never installed a Linux distro before. I have followed the installation guide end to end a few times, but my computer does not detect any bootable devices. I have UEFI enabled and secure boot disabled, and am attempting to wipe my internal SSD completely and install Arch on it (no dual-booting with Windows).

My partition structure is as follows:

# fdisk -l
Disk /dev/nvme0n1: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 2112A557-974C-41BD-B58E-49CBFFAD92BA

Device            Start       End   Sectors  Size Type
/dev/nvme0n1p1     2048   1026047   1024000  500M EFI System
/dev/nvme0n1p2  1026048  42969087  41943040   20G Linux filesystem
/dev/nvme0n1p3 42969088 500118158 457149071  218G Linux filesystem

The directory structure of /mnt/boot is as follows. You can see the complete tree at https://paste.pound-python.org/show/KOe … h00fpyyhq/

# tree
.
├── EFI
│   ├── boot
│   │   └── bootx64.efi
│   └── grub
│       └── grubx64.efi
├── grub
│   ├── grub.cfg
│   ├── grub.cfg.example
│   ├── grubenv
│   │   ...
│   └── x86_64-efi
│       ├── acpi.mod
│       ├── ...
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── intel-ucode.img
└── vmlinuz-linux

bootx64.efi is a copy of grubx64.efi that I made in case my UEFI firmware needed a bootable file at a known location, as advised here.

Finally, this is my /mnt/etc/fstab:

# cat fstab
# 
# /etc/fstab: static file system information
#
# <file system>	<dir>	<type>	<options>	<dump>	<pass>
# /dev/nvme0n1p2
UUID=3b105cd6-6336-49cd-8f49-ccf1fc08cca6	/         	ext4      	rw,relatime,data=ordered	0 1

# /dev/nvme0n1p1
UUID=2BC5-2CE5      	/boot     	vfat      	rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro	0 2

# /dev/nvme0n1p3
UUID=9415dba0-1b80-4efd-a8d1-baaf981bd542	/home     	ext4      	rw,relatime,data=ordered	0 2

Earlier I attempted to use the disk_toggle pmbr_boot option in parted to set an MBR bootable flag on the hard disk, which gave me a 'grub' option in my BIOS menu, but selecting it took me to the same error screen saying there were no bootable media detected. I'd appreciate any help you can offer in diagnosing and solving the problem here.

Last edited by zindabad (2017-09-17 07:20:22)

Offline

#2 2017-09-15 22:02:00

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] EFI partition not detected

Welcome to the arch linux forums zindabad.  Thank you for the detailed post.  From the install media what is the output of

# efibootmgr -v

Offline

#3 2017-09-15 22:53:37

Blasphemist
Member
From: Colorado
Registered: 2013-01-17
Posts: 160

Re: [SOLVED] EFI partition not detected

Here are a couple more things to use to look at the details. Try gdisk instead of fdisk. It shows a bit more about the partition table and MBR (should show as protective).

# gdisk /dev/nvme0n1 -l

Bootctl is installed with systemd so even though you haven't used it I believe this will accomplish showing us more details about the existing entries in the UEFI variables.

# bootctl status

Even with the detail that you provided I don't see the problem. Hopefully we will from one of these.


Simple and Open

Offline

#4 2017-09-16 01:18:48

zindabad
Member
Registered: 2017-09-15
Posts: 13

Re: [SOLVED] EFI partition not detected

Running bootctl status turns this up:

# bootctl status
Couldn't find EFI system partition. It is recommended to mount it to /boot. Alternatively, use --path= to specify path to mount point.
System:
     Firmware: UEFI 2.40 (American Megatrends 5.11)
  Secure Boot: disabled
   Setup Mode: user

Current Loader:
      Product: systemd-boot 234
          ESP: n/a
         File: └─/EFI/BOOT/loader.efi

Boot Loader Binaries:
          ESP: Cannot find or access mount point of ESP.

Boot Loader Entries in EFI Variables:
        Title: Windows Boot Manager
           ID: 0x0000
       Status: active
    Partition: /dev/disk/by-partuuid/1c8d41c5-32c0-496b-935a-96343f3da1ae
         File: └─/EFI/Microsoft/Boot/bootmgfw.efi

So it seems that I haven't mounted my ESP correctly. After creating the relevant directories, I entered mount /dev/nvme0n1p2 /mnt and mount /dev/nvme0n1p1 /mnt/boot, which I thought would mount my ESP (partition 1) to /mnt/boot, but it seems that's not the case.Could that be the cause of the problem? I should note that findmnt shows the relevant partitions mounted where they should be, though.

Update: bootcrl --path=/mnt/boot outputs this:

# bootctl --path=/mnt/boot
systemd-boot not installed in ESP.
System:
     Firmware: UEFI 2.40 (American Megatrends 5.11)
  Secure Boot: disabled
   Setup Mode: user

Current Loader:
      Product: systemd-boot 234
          ESP: n/a
         File: └─/EFI/BOOT/loader.efi

Boot Loader Binaries:
          ESP: /mnt/boot (/dev/disk/by-partuuid/996067d2-dc8c-4d16-adf5-9ec54ba4a9ca)
         File: └─/EFI/BOOT/bootx64.efi

Boot Loader Entries in EFI Variables:
        Title: Windows Boot Manager
           ID: 0x0000
       Status: active
    Partition: /dev/disk/by-partuuid/1c8d41c5-32c0-496b-935a-96343f3da1ae
         File: └─/EFI/Microsoft/Boot/bootmgfw.efi

My output from the other commands was about what I expected. efibootmgr -v gives me the following:

# efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001
Boot0000* Windows Boot Manager	HD(1,GPT,1c8d41c5-32c0-496b-935a-96343f3da1ae,0x800,0xfa000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....f...............
Boot0001* UEFI: Generic Flash Disk 8.07, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/HD(1,MBR,0x2870ac4c,0xa4,0x20000)..BO

gdisk:

# gdisk /dev/nvme0n1 -l
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.
Disk /dev/nvme0n1: 500118192 sectors, 238.5 GiB
Model: THNSN5256GPUK NVMe TOSHIBA 256GB        
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): 2112A557-974C-41BD-B58E-49CBFFAD92BA
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 500118158
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048         1026047   500.0 MiB   EF00  EFI System
   2         1026048        42969087   20.0 GiB    8300  Linux filesystem
   3        42969088       500118158   218.0 GiB   8300  Linux filesystem

Last edited by zindabad (2017-09-16 01:28:11)

Offline

#5 2017-09-16 07:27:01

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] EFI partition not detected

zindabad wrote:

My output from the other commands was about what I expected. efibootmgr -v gives me the following:

# efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001
Boot0000* Windows Boot Manager	HD(1,GPT,1c8d41c5-32c0-496b-935a-96343f3da1ae,0x800,0xfa000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....f...............
Boot0001* UEFI: Generic Flash Disk 8.07, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/HD(1,MBR,0x2870ac4c,0xa4,0x20000)..BO

You were not expecting there to be an entry for grub?
The only boot entry for the ESP is for bootmgfw.efi which has been removed from the system.

Offline

#6 2017-09-16 07:40:30

zindabad
Member
Registered: 2017-09-15
Posts: 13

Re: [SOLVED] EFI partition not detected

Stupid me. So the problem is with my Grub installation?

Offline

#7 2017-09-16 08:02:59

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] EFI partition not detected

Grub should have added an entry and I suspect the Windows entry is stopping the firmware from using the fallback location you copied grubx64.efi to.  GRUB#GRUB_UEFI_not_loaded
I would suggest repeating GRUB#Installation_2 checking the output for anything related to a failure to write to NVRAM.
Then before rebooting check the output of efibootmgr again.  Would also suggest you remove the Windows entry from NVRAM see efibootmgr.

Offline

#8 2017-09-16 08:10:44

zindabad
Member
Registered: 2017-09-15
Posts: 13

Re: [SOLVED] EFI partition not detected

Reinstalled Grub with no mention of a failure to write to NVRAM, and deleted the Windows entry. efibootmgr now shows Grub as entry 2 and the bootable USB as entry 1, with an order of 2, 1. Will unmount, reboot and update with the results. Thanks!

Offline

#9 2017-09-16 08:21:55

zindabad
Member
Registered: 2017-09-15
Posts: 13

Re: [SOLVED] EFI partition not detected

Installation was unsuccessful again; on booting from the USB again I checked efibootmgr and saw that the entry for Grub persisted this time, but the option had been removed from my boot order.

# efibootmgr -v
BootCurrent: 0001
Timeout: 0 seconds
BootOrder: 0001
Boot0001* UEFI: Generic Flash Disk 8.07, Partition 1	PciRoot(0x0)/Pci(0x14,0x0)/USB(1,0)/HD(1,MBR,0x2870ac4c,0xa4,0x20000)..BO
Boot0002* grub	HD(1,GPT,996067d2-dc8c-4d16-adf5-9ec54ba4a9ca,0x800,0xfa000)/File(\EFI\grub\grubx64.efi)

Edit: reinstalling Grub adds the option to the top of the boot order again, but I assume the option will be removed on reboot as before. Any advice/ideas about what's going wrong would be greatly appreciated. Thank you everyone for your help so far.

Last edited by zindabad (2017-09-16 08:54:25)

Offline

#10 2017-09-16 09:57:23

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,657

Re: [SOLVED] EFI partition not detected

You firmware might be  being an asshole, boot into your firmware/UEFI and go through the options to check if you maybe have the ability to manually add an EFI entry within the firmware's menu.

Offline

#11 2017-09-16 10:16:32

zindabad
Member
Registered: 2017-09-15
Posts: 13

Re: [SOLVED] EFI partition not detected

No luck there. There is an 'add boot option' button, but the file system I set up on the machine doesn't even show up in 'file system list.' I'm getting tired of reconfiguring my network settings/mounting disks/installing packages every reboot so I'm going to wait for more suggestions before doing anything else. If all else fails I'll abandon Grub and try another boot loader.

Offline

#12 2017-09-16 10:38:47

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] EFI partition not detected

The other location you could try copying grubx64.efi to would be EFI/Microsoft/Boot/bootmgfw.efi

Offline

#13 2017-09-16 10:52:59

zindabad
Member
Registered: 2017-09-15
Posts: 13

Re: [SOLVED] EFI partition not detected

Huh. I've already deleted the Windows boot option with efibootmgr; would you say it's still worth trying?

Last edited by zindabad (2017-09-16 10:53:23)

Offline

#14 2017-09-16 11:02:09

loqs
Member
Registered: 2014-03-06
Posts: 17,321

Re: [SOLVED] EFI partition not detected

The firmware was willing to load from an an entry pointing to that location so using that location possibly adding an entry using efibootmgr and seeing if the firmware boots is worth trying in my view.
Most simple solutions appear to not be applicable or have been tried and failed,  only other alternative suggestion I have is try using systemd-boot instead of grub it should not make a difference but testing it would rule it out.

Offline

#15 2017-09-16 14:58:08

zindabad
Member
Registered: 2017-09-15
Posts: 13

Re: [SOLVED] EFI partition not detected

Gave it a shot. At first the boot order was preserved between reboots, but this might have been because I set up the boot option pointing to bootmgfw.efi incorrectly, entering the partition name in the --disk option, so it was down as being on an MBR disk. When I entered the correct options, my Grub entry was down as being on a GPT disk and again was removed from my boot order between reboots. So creating an option pointing to EDI/Microsoft/Boot/bootmgfw.efi doesn't seem to be working.

I'm not sure where to proceed from here. Is there a chance, for example, that I should have set some firmware option in Windows before wiping my hard disk, meaning I'm now out of luck since I've wiped Windows? I'd appreciate any diagnostic advice or workarounds anyone would like to suggest; if I get nothing in the next few hours I will probably just try systemd-boot instead. Would it be better to remove Grub with some uninstall option, or to format my partitions again and attempt to install the boot loader from scratch? In the former case, are there files I'd need to delete manually after the uninstall?

Last edited by zindabad (2017-09-16 14:58:44)

Offline

#16 2017-09-16 16:50:13

blahhumbug
Member
Registered: 2016-10-08
Posts: 64

Re: [SOLVED] EFI partition not detected

I have the 9360, but i have never tried to use grub.   For EFI systems all you really need is systemd-boot, and its configuration is much easier.

/boot/loader/entries/arch.conf

title Arch Linux
linux /vmlinuz-linux
initrd /intel-ucode.img
initrd /initramfs-linux.img
options cryptdevice=/dev/disk/by-id/nvme-eui.002303561002a18d-part3:cryptroot zfs=zroot/ROOT/default resume=/dev/mapper/swapDevice pcie_aspm=force scsi_mod.use_blk_mq=Y dm_mod.use_blk_mq=Y rw

Last edited by blahhumbug (2017-09-16 16:53:02)

Offline

#17 2017-09-16 22:50:23

zindabad
Member
Registered: 2017-09-15
Posts: 13

Re: [SOLVED] EFI partition not detected

Gave up on Grub and used systemd-boot instead. Thank you blahhumbug for providing your config; I would have spent a lot of time staring at the wiki page in confusion had you not done that. Arch is now up and running. Next big challenge is getting X11 working, followed by KDE.

Offline

#18 2022-08-12 16:29:06

matzi11a
Member
Registered: 2022-08-12
Posts: 1

Re: [SOLVED] EFI partition not detected

i had this problem and internet brought me here. (i started out by replacing grub with systemd-boot but still did not resolve for me).

I also needed to install udisks2 2.7.2 or later. As per note https://github.com/fwupd/fwupd/wiki/fwupd-snap before i was successful.

Offline

Board footer

Powered by FluxBB