You are not logged in.

#1 2020-06-30 17:12:11

qmastery
Member
Registered: 2020-06-25
Posts: 5

Full disk encryption: GRUB error "no such device" but then boots okay

I did a fresh Arch Linux install, using a LUKS/cryptsetup disk encryption for LVM container with everything except /boot.
Every boot, there's a GRUB error message:

error: no such device: ...UUID of root partition, which hides inside the encrypted LVM container...
error: disk `lvmid/...very long...' not found.
error: disk `lvmid/...same very long...' not found.

Press any key to continue...

, but after you press any key - GRUB shows a menu list, and if you choose a top menu entry - it asks a decryption password and boots okay! yikes

These errors seem to be produced by these lines of /boot/grub/grub.cfg :

### BEGIN /etc/grub.d/00_header ###
...
set root='lvmid/...very long...'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/...very long...'  UUID-of-root
else
  search --no-floppy --fs-uuid --set=root UUID-of-root
fi
...
set root='lvmid/...very long...'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvmid/...very long...'  UUID-of-root
else
  search --no-floppy --fs-uuid --set=root UUID-of-root
fi
...
### END /etc/grub.d/00_header ###

, just I can't find these lines at /etc/grub.d/00_header and no idea where they came from! find/grep search didn't help, and

grub-mkconfig -o /boot/grub/grub.cfg

still gets them from somewhere. Any guess?

Last edited by qmastery (2020-06-30 17:15:18)

Offline

#2 Today 17:57:35

qmastery
Member
Registered: 2020-06-25
Posts: 5

Re: Full disk encryption: GRUB error "no such device" but then boots okay

Solution for this problem:

1) back up a /etc/default/grub
2) purge a grub package with its' dependencies:

pacman -Rc grub

- notice the extra -c flag for erasing the configs!
3) rm -rf

/boot/grub/
/etc/grub.d/
/etc/default/grub
/usr/share/grub/

if they haven't been erased. After that, make sure to

mkdir /boot/grub

4) install a grub package with its' dependencies

pacman -S grub

5) do a GRUB installation command like

grub-install --target=i386-pc --boot-directory=/boot --bootloader-id=artix --recheck /dev/sdX

and

grub-mkconfig -o /boot/grub/grub.cfg

Not sure what was the origin of this problem, but now it's gone!  wink

Last edited by qmastery (Today 17:58:40)

Offline

Board footer

Powered by FluxBB