Cannot boot from external drive using Grub

Hi everyone,
I’ve been working on this issue for a while and have had a partial ‘fix’ but I’d like to properly fix this issue now and the problems that come with my ‘fix’.

First of all, my problem is that a while ago I had to perform a NVRAM reset, resulting in the loss of my boot entries in the BIOS, which I easily re-added for Windows and other OS’s, however I could not re add Grub effectively. I have used chroot to enter my system and reinstall the grub boot loader but when I boot the entry I receive the error from my BIOS ‘Boot media not accessible’ or another similar error - however, the disk is readable and I can view it from Windows, Linux on a USB. Therefore, I’d like to correctly reinstall Grub. I have tried reinstalling it using chroot via the command grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck. This passes successfully with no errors, but as said the boot option does not boot.

Secondly, I’d like to mention my temporary solution I have been using to boot Manjaro. It’s very hacky and does not work fully - I have to run commands from Grub Rescue on boot to enter Manjaro. I used the same command from above to install grub and copied the EFI files across to my internal HDD and used my bios file manager to add the grubx64 EFI as a boot option, which would get me past my issue of ‘Inaccessible boot device’. Once this boots I reach Grub Rescue in which I have to enter the commands:

set root=(hd0,2)
set prefix=(hd0,2)/boot/grub
insmod normal
normal

This is as I get an unknown filesystem error - I believe this is as Grub is on an alternate drive to which it is installed and therefore I have to manually set the drive to the one containing the necessary files.

Finally, I’d like to propose some solutions I have thought of but do not have the knowhow/ have not been able to implement.

  1. Install grub to the internal drive correctly via grub-install - I have tried to do this with grub-install /dev/sda .... but the installer installs to /dev/sdb anyways.
  2. Chainload Manjaro through Opencore - I do not know how to add the entry to Opencore manually. I have opencore installed and it works well for managing other OS’s
  3. Finding a way to actually fix the issue and not work around it by installing grub and fixing the installation on /dev/sdb

Some questions I assume you may have are:

  • Is the USB connection from the external HDD with Manjaro damaged:
    • No, I have tried it in other USB ports and another PC and it showed up correctly
  • Is your BIOS damaged (Due to the ‘Inaccessible error’):
    • I believe not - as I have reinstalled the BIOS from windows and the drive has previously worked to boot from with GRUB.

Thank you all, I hope someone helps me find a solution for this <3

Did you run update-grub or grub-mkconfig -o /boot/grub/grub.cfg afterwards?

@Soapie hi and welcome to the forum :+1:

  1. When you want to boot from an external drive, that external drive also has to have an $ESP partition the UEFI-BIOS needs to be able to read.
    Otherwise the UEFI-boot entries pointing to the external drive will be silently removed on reboots…

    • This is as far as i know intended behavior of the UEFI-BIOS’s for removable-drives.
    • If the removable drive has it’s own $ESP which instructs the UEFI-BIOS to create those entries again, they will be re-added.
  2. To make grub use the external harddisk to load it’s needed configuration it is using a grub.cfg file inside the same directory as grubx64.efi inside the $ESP of the respective drive the UEFI-BIOS used to execute grub.

So to assist further you need to start providing some info about your setup…

  • lsblk -fa
  • efibootmgr --verbose
  • Contents of grub.cfg inside the $EFI of both hard-disks if you have both.
    Else only the one your computer has and mention it’s location.
    (This is not the same file as /boot/grub/grub.cfg !)

Yes bootloaders can be a pain :wink:


Yes I did, and they created the files and looked normal when I checked the contents

Hi, I will provide the outputs of the commands later as I am currently out. However, I do believe I may have an issue with my ESP. This is as grub does not generate to it on the external drive and it is not detected by the bios in both uefi and legacy modes. Perhaps I could make a new one using grub as the external efi partition is empty (apart from when I generate grub - but it doesn’t show up so I’m not exactly loosing data by remaking it).

Grub does not generate any config in the $ESP when you update your grub config.

The only time it could generate any config is at install time of grub itself…
All the rest of the config it generates for your boot options inside the grub menu are placed in your /boot/grub directory which is normally not in the $ESP

We could if we both have the time, copy over the needed parts of the ESP to your external drive, so it will be recognized if its not yet.
(Which will become clear after you post the needed info as asked)

One extra info that might come handy is (with the external drive connected):

ls -la /dev/disk/by-uuid/

And you mentioning which drive is your external drive…

Hi, apologies for the late reply. I have run the commands from earlier:

BootCurrent: 1009
Timeout: 1 seconds
BootOrder: 0000,0008,0001,0002
Boot0000* OpenCore	PciRoot(0x0)/Pci(0x17,0x0)/Sata(2,65535,0)/HD(1,GPT,bc7b4186-5938-4d10-adfb-f13f5e37f346,0x800,0xfa000)/File(EFI\OC\OpenCore.efi)
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 17 / 03 12 0a 00 02 00 ff ff 00 00 / 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 a0 0f 00 00 00 00 00 86 41 7b bc 38 59 10 4d ad fb f1 3f 5e 37 f3 46 02 02 / 04 04 2c 00 45 00 46 00 49 00 5c 00 4f 00 43 00 5c 00 4f 00 70 00 65 00 6e 00 43 00 6f 00 72 00 65 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
Boot0001* Onboard NIC (IPV4)	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(14b31f27f01d,0)/IPv4(0.0.0.00.0.0.0,0,0)0000424f
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 03 1c / 01 01 06 00 00 00 / 03 0b 25 00 14 b3 1f 27 f0 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0c 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f
Boot0002* Onboard NIC (IPV6)	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(14b31f27f01d,0)/IPv6([::]:<->[::]:,0,0)0000424f
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 03 1c / 01 01 06 00 00 00 / 03 0b 25 00 14 b3 1f 27 f0 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0d 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f
Boot0008* Windows Boot Manager	HD(1,GPT,bc7b4186-5938-4d10-adfb-f13f5e37f346,0x800,0xfa000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)57494e444f5753000100000088000000780000004200430044004f0042004a004500430054003d007b00390064006500610038003600320063002d0035006300640064002d0034006500370030002d0061006300630031002d006600330032006200330034003400640034003700390035007d00000037000100000010000000040000007fff0400
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 a0 0f 00 00 00 00 00 86 41 7b bc 38 59 10 4d ad fb f1 3f 5e 37 f3 46 02 02 / 04 04 46 00 5c 00 45 00 46 00 49 00 5c 00 4d 00 69 00 63 00 72 00 6f 00 73 00 6f 00 66 00 74 00 5c 00 42 00 6f 00 6f 00 74 00 5c 00 62 00 6f 00 6f 00 74 00 6d 00 67 00 66 00 77 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
    data: 57 49 4e 44 4f 57 53 00 01 00 00 00 88 00 00 00 78 00 00 00 42 00 43 00 44 00 4f 00 42 00 4a 00 45 00 43 00 54 00 3d 00 7b 00 39 00 64 00 65 00 61 00 38 00 36 00 32 00 63 00 2d 00 35 00 63 00 64 00 64 00 2d 00 34 00 65 00 37 00 30 00 2d 00 61 00 63 00 63 00 31 00 2d 00 66 00 33 00 32 00 62 00 33 00 34 00 34 00 64 00 34 00 37 00 39 00 35 00 7d 00 00 00 37 00 01 00 00 00 10 00 00 00 04 00 00 00 7f ff 04 00

Above is the efibootmgr command.
Below is the result of lsblk -fa:

NAME   FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS
loop0                                         
loop1                                         
loop2                                         
loop3                                         
loop4                                         
loop5                                         
loop6                                         
loop7                                         
sda                                           
|-sda1                                        
|-sda2                                        
|-sda3                                        
|-sda4                                        
|-sda5                                        
`-sda6                                        
sdb                                           
|-sdb1                          495.1M     1% /boot/efi
|-sdb2                            1.9T     9% /
|-sdb3                                        
|-sdb4                                        
|-sdb5                                        
`-sdb6                                        
sdc                                           
|-sdc1                                        
`-sdc2                                        

The mount points for dev/sdb may seem strange - this is as I am using chroot due to the lack of a boot loader currently.
I also thought I should note that the commands were run from a manjaro live usb using Manjaro-chroot into the system.
I also do not have the grub.cfg file in my EFI, as due to the boot loader not working I removed these. If you like, I can re-run grub-install to install grub again and provide these files and information.

Please don’t use any chroot when you post info unless explicitly asked for…
You either didn’t copy the output properly or …

The current info you provided is useless because:

  • efibootmgr output is missing boot entries.
  • lsblkid is incomplete, it doesn’t contain any UUID’s for your disks nor anyother info.
  • You didn’t provide the output of the last command.

Anyhow current info you provided is useless…


No need to apologize for late replies, we all have real life and we all live in different timezones around the globe.
(See my profile info when you click my avatar)

1 Like

Hi, sorry. Here are the commands run again on the system directly.
lsblk -fa

NAME   FSTYPE   FSVER LABEL   UUID                                 FSAVAIL FSUSE% MOUNTPOINTS
loop0  squashfs 4.0                                                      0   100% /var/lib/snapd/snap/code/115
loop1  squashfs 4.0                                                      0   100% /var/lib/snapd/snap/code/116
loop2  squashfs 4.0                                                      0   100% /var/lib/snapd/snap/core/14399
loop3  squashfs 4.0                                                      0   100% /var/lib/snapd/snap/woe-usb/21
loop4                                                                             
loop5                                                                             
loop6                                                                             
loop7                                                                             
sda                                                                               
├─sda1 vfat     FAT32 ESP     584D-CB18                                           
├─sda2                                                                            
├─sda3 ntfs           OS      01D7AC89B3BC5440                                    
├─sda4 ntfs                   78042BF6042BB5D2                                    
├─sda5 apfs                   84df2109-639a-448e-a9f0-326a5ff9e612                
└─sda6 vfat     FAT32         4431-4205                                           
sdb                                                                               
├─sdb1 vfat     FAT32         57DD-CA44                               495M     1% /boot/efi
├─sdb2 ext4     1.0           5c0a82e8-fbf6-4a15-8691-72a78a49423f    1.9T     9% /
├─sdb3 ntfs           WINDOWS 16E4DF1BE4DEFC45                                    
├─sdb4 ext4     1.0   Storage 73aa66c1-3397-4f6c-add4-4fb292bdbf90                
├─sdb5 apfs                   d87ca5c4-77eb-4f70-a389-6e36ac6dfe29                
└─sdb6                                                                            

I also should clarify my dumb naming of the windows partition on dev/sdb3, it does not hold windows It is simply named that.
efibootmgr --verbose

BootCurrent: 0004
Timeout: 1 seconds
BootOrder: 0000,0001,0002,0003,0004
Boot0000* manjaro	VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
      dp: 01 04 14 00 e7 75 e2 99 a0 75 37 4b a2 e6 c5 38 5e 6c 00 cb / 7f ff 04 00
Boot0001* OpenCore	PciRoot(0x0)/Pci(0x17,0x0)/Sata(2,65535,0)/HD(1,GPT,bc7b4186-5938-4d10-adfb-f13f5e37f346,0x800,0xfa000)/File(EFI\OC\OpenCore.efi)
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 00 17 / 03 12 0a 00 02 00 ff ff 00 00 / 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 a0 0f 00 00 00 00 00 86 41 7b bc 38 59 10 4d ad fb f1 3f 5e 37 f3 46 02 02 / 04 04 2c 00 45 00 46 00 49 00 5c 00 4f 00 43 00 5c 00 4f 00 70 00 65 00 6e 00 43 00 6f 00 72 00 65 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00
Boot0002* Onboard NIC (IPV4)	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(14b31f27f01d,0)/IPv4(0.0.0.00.0.0.0,0,0)0000424f
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 03 1c / 01 01 06 00 00 00 / 03 0b 25 00 14 b3 1f 27 f0 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0c 1b 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f
Boot0003* Onboard NIC (IPV6)	PciRoot(0x0)/Pci(0x1c,0x3)/Pci(0x0,0x0)/MAC(14b31f27f01d,0)/IPv6([::]:<->[::]:,0,0)0000424f
      dp: 02 01 0c 00 d0 41 03 0a 00 00 00 00 / 01 01 06 00 03 1c / 01 01 06 00 00 00 / 03 0b 25 00 14 b3 1f 27 f0 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 03 0d 3c 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 40 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 / 7f ff 04 00
    data: 00 00 42 4f
Boot0004* Manjaro	HD(1,GPT,bc7b4186-5938-4d10-adfb-f13f5e37f346,0x800,0xfa000)/File(\EFI\manjaro\grubx64.efi)
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 a0 0f 00 00 00 00 00 86 41 7b bc 38 59 10 4d ad fb f1 3f 5e 37 f3 46 02 02 / 04 04 36 00 5c 00 45 00 46 00 49 00 5c 00 6d 00 61 00 6e 00 6a 00 61 00 72 00 6f 00 5c 00 67 00 72 00 75 00 62 00 78 00 36 00 34 00 2e 00 65 00 66 00 69 00 00 00 / 7f ff 04 00

I cannot see boot option Boot0000 in my Bios - potential issue?
ls -la /dev/disk/by-uuid

total 0
drwxr-xr-x 2 root root 240 Jan  1 11:55 .
drwxr-xr-x 9 root root 180 Jan  1 11:54 ..
lrwxrwxrwx 1 root root  10 Jan  1 11:54 01D7AC89B3BC5440 -> ../../sda3
lrwxrwxrwx 1 root root  10 Jan  1 11:55 16E4DF1BE4DEFC45 -> ../../sdb3
lrwxrwxrwx 1 root root  10 Jan  1 11:54 4431-4205 -> ../../sda6
lrwxrwxrwx 1 root root  10 Jan  1 11:55 57DD-CA44 -> ../../sdb1
lrwxrwxrwx 1 root root  10 Jan  1 11:54 584D-CB18 -> ../../sda1
lrwxrwxrwx 1 root root  10 Jan  1 11:55 5c0a82e8-fbf6-4a15-8691-72a78a49423f -> ../../sdb2
lrwxrwxrwx 1 root root  10 Jan  1 11:55 73aa66c1-3397-4f6c-add4-4fb292bdbf90 -> ../../sdb4
lrwxrwxrwx 1 root root  10 Jan  1 11:54 78042BF6042BB5D2 -> ../../sda4
lrwxrwxrwx 1 root root  10 Jan  1 11:54 84df2109-639a-448e-a9f0-326a5ff9e612 -> ../../sda5
lrwxrwxrwx 1 root root  10 Jan  1 11:55 d87ca5c4-77eb-4f70-a389-6e36ac6dfe29 -> ../../sdb5

Finally, I still do not have a grub.cfg even after regenerating grub to boot and provide these commands. (Used my hacky fix mentioned in op, not fixed my issue).

I also do just finally want to clarify roughlt what is on each partition - that i know.
dev/sda1 EFI on internal HDD
dev/sda2 Unknown - has flag msftres
dev/sda3 Windows 11
dev/sda4 Windows 10
dev/sda5 MacOS Big Sur
dev/sda6 Unknown - Has boot, esp flags which I find unusual as dev/sda1 also has these

dev/sdb1 External EFI, has boot, esp flags. Not recognised in BIOS
dev/sdb2 Root partition of manjaro
dev/sdb3 Simple storage partition ntfs
dev/sdb4 Another storage partition ext4
dev/sdb5 Unusued apfs partition - Dont know why I have it
dev/sdb6 Unknown, Is ~100gb and has flag msftdata

I’ve been bussy that’s why i haven’t responded yet, but ill do soon™ haven’t forgotten :wink:

Okay thank you!

Okay i got a little spare time again, lets see…

That’s an entry refering to some drive that is not available anymore, so it won’t show in the UEFI-Menu, thats normal…
You could try to delete it and recreate using proper info if needed later

Boot0004 is your USB-Stick you booted with i guess? :thinking:
Very weird that the UUID it uses doesn’t show in your output of /dev/disk/by-uuid though :thinking:

It seems to have been mounted as current ESP in your current boot though…
Plus you seem to already have booted your system from the external drive because sdb2 is mounted as /
Thus you already can boot from the external drive…

(You insist on deviating from a clean USB-Live boot that’s your choice to get wrong help)


But ok let’s concentrate on the ESP’s that are available from what you posted.
(i don’t have energy to complain about you cutting out info from command outputs, you hiding info means you’ll get wrong help, your choice…)

The potential ones we are interested in, from above info, are:

  • /dev/sda1
  • /dev/sda6
  • /dev/sdb1

Only those could be ESP’s because they are FAT32
If /dev/sda6 is an ESP also, it won’t be used by the UEFI-BIOS at all because /dev/sda1 is already there.
(Only one ESP per drive)

So lets investigate their contents by temporarily mounting them:

systemd-mount /dev/disk/by-uuid/584D-CB18 /tmp/ESP-a1
systemd-mount /dev/disk/by-uuid/4431-4205 /tmp/ESP-a6
systemd-mount /dev/disk/by-uuid/57DD-CA44 /tmp/ESP-b1

Then followed by these commands.
You will need to install the xclip package before these, it will help you to capture output into your clipboard to ease pasting the output in your reply.

alias xc='xclip -selection clipboard'
ls -lar /tmp/ESP-* | xc

Paste what is in your clipboard at this moment inside code-blocks in your reply !

And unmounting the temporary mounts can be done using:

systemd-umount /tmp/ESP-a1
systemd-umount /tmp/ESP-a6
systemd-umount /tmp/ESP-b1

Just a bookmark we might use later-on (when/if needed): GRUB/Tips and tricks - ArchWiki