You are not logged in.

#1 2019-10-02 14:03:35

TheDevKiller
Member
Registered: 2019-08-20
Posts: 19

[SOLVED] UEFI: GRUB doesn't know (hd1) exists

Introduction

Hey! I know I already asked it but the topic is now dead and we can't necrobump, so I'll try again with more informations big_smile.

The problem is that I can't boot my computer if I don't go in BIOS before

Description of the problem

Long version

If I boot my computer, knowing GRUB entry is the first one, and let it boot, I have a "No such device" error:

error: no such device: 8dcb916d-f8c2-45ac-b8b4-fc84b4de4217
error: unknown filesystem.
Entering rescue mode...
grub rescue>

But, if:
1570023317-boot-override.png
it goes into GRUB without problems
click the image to zoom
(here there is no GRUB entry because the picture isn't from me, but on my BIOS there is GRUB, Windows, and rEFInd which is uninstalled, I'll remove the entry later)

Short version

So
If I boot without going to BIOS first:

grub rescue> ls
(hd0) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1)

Else, if I go into BIOS, then go to GRUB with boot override

grub rescue> ls
(hd0) (hd0,gpt4) (hd0,gpt3) (hd0,gpt2) (hd0,gpt1) (hd1) (hd1,gpt2)

and / is on (hd1,gpt2)

Additional informations

Informations

GRUB

Boot

Partitions

Last edited by TheDevKiller (2019-10-19 13:20:31)

Offline

#2 2019-10-03 12:42:58

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 137

Re: [SOLVED] UEFI: GRUB doesn't know (hd1) exists

First, I am not an expert, just a regular Arch Linux user.
Second, I have an Asus K55VM.
Third, I like things simple.
After this intro, I would like to suggest using EFISTUB instead of grub.

When you start your computer, press the <escape> key as soon as you see the Asus logo and you will see a list of EFI entries (systems to run) to choose from.
If you do not press the <escape>, you will run the default entry.
What you have to do is use efibootmgr to add an entry for Arch Linux.

Your command efibootmgr command will depend on the relative-path location of your "boot loader", which is vmlinuz-linux.
If your loader vmlinuz-linux and other boot files are located at the root of your EFI Partition, the command should look like this

# efibootmgr --disk /dev/sda --part 2 --create --label "Arch Linux" --loader vmlinuz-linux --unicode 'root=PARTUUID=e4af66fe-b4d1-2248-92f3-a90a55434fda rw initrd=initramfs-linux.img' --verbose

In short, this command means/assumes that
- your loader is on /dev/sda, partition 2 (/dev/sda2) and it is in the root directory relative to this partition. For example, if /dev/sda2 is mounted on /boot and your vmlinuz-linux is in /boot the relative path is "/" and you can omit it.
- your system (root) is on a partition identified by PARTUUID=e4af66fe-b4d1-2248-92f3-a90a55434fda.

Now,...back to your problem.

error: no such device: 8dcb916d-f8c2-45ac-b8b4-fc84b4de4217
error: unknown filesystem.

If you want to keep grub, I cannot help you. But people who would like to help you may need listings of

efibootmgr --verbose
lsblk -f

Offline

#3 2019-10-03 12:57:24

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 137

Re: [SOLVED] UEFI: GRUB doesn't know (hd1) exists

These two links will NOT help you directly, but if you have the time and the will to read them you will learn a lot.
Just apply this knowledge to your file systems. (You probably do not use BTRFS. I don't.)
https://gist.github.com/altercation/58d … 7c64c97f34
https://wiki.archlinux.org/index.php/Us … ch_Install

Offline

#4 2019-10-03 15:49:55

TheDevKiller
Member
Registered: 2019-08-20
Posts: 19

Re: [SOLVED] UEFI: GRUB doesn't know (hd1) exists

Hey dif. First, thanks a lot for trying to help, really. This is awesome, thanks.

I added the outputs of efibootmgr --verbose and lsblk -f in the main message.

I'm downloading an ISO of Arch Linux so if I do mistakes I'll be able to boot on my system from USB key's bootloader, or even chroot on it. I'll try a few things with efibootmgr from what you said, but with GRUB, and, if it doesn't work, I think I'll try EFISTUB.

But I don't understand what "Bulletproof Arch" means roll

Last edited by TheDevKiller (2019-10-03 15:51:03)

Offline

#5 2019-10-03 21:00:54

dif
Member
From: Stalowa Wola, Poland
Registered: 2009-12-22
Posts: 137

Re: [SOLVED] UEFI: GRUB doesn't know (hd1) exists

Do not worry about the "bulletproof arch". The author shows a complicated and difficult system configuration and a way to set it up every time somebody tries to do it. This is what he means by "Bulletproof".

Back to your problem.
Your 'lsblk -f' shows that your EFI partition is mounted at /boot/efi.
Your 'efibootmgr --verbose ' shows that your boot loader is GRUB and it is run from path '\EFI\GRUB\grubx64.efi'. (/boot/efi/EFI/GRUB/grubx64.efi)
Interestingly, there are no arguments/parameters for grub64.efi to run with. I do not use grub, so I do not know if that is correct.

If you want a EFISTUB setup, locate the linux boot-loader "vmlinuz-linux". It is almost certainly at /boot, which currently is not on your EFI partition. To remedy it, copy files located in /boot (minimum: vmlinuz-linux, initramfs-linux.img) to /boot/efi. (Just to remind you:  /boot/efi is your current mount point for the EFI partition, so by copying the files you put them in the root of the EFI partition.)
Then change /etc/fstab entry that points where the efi partition is mounted.
(I just realised that I did not ask you for a listing of /etc/fstab.)
Your current entry probably looks like

# /dev/sda2
UUID=ECFE-75F3      	/boot/efi     	vfat      	defaults,relatime	0 2

Change it to

# /dev/sda2
UUID=ECFE-75F3      	/boot     	vfat      	defaults,relatime	0 2

After a reboot your EFI partition will be mounted at /boot.
DO NOT reboot yet.
It's time to add an Arch Linux entry to your UEFI/BIOS. The command I wrote in my first post will be OK.
Now change the boot order using efibootmgr so that the Arch Linux entry is the first/default one.
After reboot you should start with Arch Linux.

The whole idea/phylosophy of using efibootmgr is tell the UEFI/BIOS to use a boot-loader (for example vmlinuz-linux, or \EFI\GRUB\grubx64.efi, or \EFI\refind\refind_x64.efi, or \EFI\Microsoft\Boot\bootmgfw.efi, or whatever) and give the boot-loader parameters that tell it  which partition the system root is on etc.

Last remarks.
- Because at this point your EFI partition will be mounted at /boot, you do not have to worry about system updates.
- You will still have old files /boot files on "/dev/sdb2)/boot". If everything works well, they are save to remove, but it is not trivial, because your /boot will be located on /dev/sda2 not /dev/sdb2.
- (very unlikely in case of Asus, but quite likely on Lenovoes) Instead of the "vmlinuz-linux" boot-loader you may need to have "vmlinuz-linux.efi". It is enough to copy "vmlinuz-linux" into "vmlinuz-linux.efi". You can add another UEFI/BIOS entry for "vmlinuz-linux.efi" as the loader. If this is a case such copying should be done whenever vmlinuz-linux changes after a system update. It is easy to set up such automatic copying.
- If you have an Intel processor consider adding intel-ucode.img to your UEFI Arch Linux entry. You will have to add another UEFI entry for that (and perhaps remove the previous one). See https://wiki.archlinux.org/index.php/Microcode

Last edited by dif (2019-10-03 21:11:20)

Offline

#6 2019-10-03 21:19:19

mxfm
Member
Registered: 2015-10-23
Posts: 163

Re: [SOLVED] UEFI: GRUB doesn't know (hd1) exists

It looks like hardware issue - ssd disk is not immediately visible during boot. Can you specify in bios some time delay?

Offline

#7 2019-10-18 14:20:53

TheDevKiller
Member
Registered: 2019-08-20
Posts: 19

Re: [SOLVED] UEFI: GRUB doesn't know (hd1) exists

Hey! First I'm sorry for the delay. I completely forgot this thread until yesterday.

So mxfm, I tried your solution, I added a 5 seconds delay with

# efibootmgr -t 5

It doesn't work. In fact I think it doesn't work because the added delay is not at the right time, it's just that the ASUS screen is longer, but not a delay between BIOS and GRUB. But I can't find another solution to add a delay at boot.

And dif, thanks a lot for your answer, I'll try it right now!

Offline

#8 2019-10-18 14:32:35

TheDevKiller
Member
Registered: 2019-08-20
Posts: 19

Re: [SOLVED] UEFI: GRUB doesn't know (hd1) exists

I know I should edit my message but in this case I think it is useful to write a new one. So dif, using a EFISTUB setup works like a charm! I love you, thanks a lot!!! <3

Offline

Board footer

Powered by FluxBB