Bug#966575: How to fix LLVM/LUKS installs?

Todd Howe todhowe at sourcefire.com
Tue Aug 4 22:08:44 BST 2020


tl;dr I hit this error while trying to reinstall grub:
grub-probe: error: can't mount encrypted volume '/dev/sda5': no such
partition

Hello, we've seen fixes suggested for non-encrypted installs which involve
either reinstalling grub or running dpkg-configure grub-pc from chroot.

How do we go about fixing an LLVM LUKS encrypted installation though? It's
a fairly common way of setting up the desktop I gather as it's the last
option on the Debian Installer menu.

Here's what I've discovered so far:
----------------------------------------------
fdisk -l /dev/sda

- this reveals the default LUKS/LVM setup
/dev/sda1
/dev/sda2
/dev/sda5

- further details can be found here, since I tried the Ubuntu boot repair
  USB but it failed to offer the repair option since I have a /boot
directory
  but it scanned my system

paste.ubuntu.com/p/5vpH3rGM9h

udisksctl unlock -b /dev/sda5
- enter password here, LUKs partition gets unlocked
apt update
apt install lvm2
vgchange -ay # makes LVM volumes active
udisksctl mount -b /dev/mapper/$HOSTNAME--vg-root

ls /media/root/$UUID
apt install grub
grub-install --root-directory=/media/root/$UUID /dev/sda

- here's the main error

grub-probe: error: can't mount encrypted volume '/dev/sda5': no such
partition

- trying the dpkg-reconfigre grub-pc solution gets me no further

chroot /media/root/$UUID
dpkg-reconfigure grub-pc

- I select th defaults in dpkg-configure, which is blank command line then
'quiet'

/var/lib/dpkg/info/grub-pc.postint: line 340: /dev/null: Permission denied
[ warnings about locale]
Can't open /dev/null: Permission denied

--------------------------------------------------
I am at an impasse, help? I'm stuck!

Todd
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-grub-devel/attachments/20200804/f432ad90/attachment.html>


More information about the Pkg-grub-devel mailing list