I'm currently trying to reinstall Debian 11 (Bullseye) onto my laptop. The first install had worked perfectly a few months ago, but I'm currently stuck trying to boot after reinstalling.
Short description
I get the following error on boot:
Indeed, if I do `ls /dev/mapper` in the shell I'm presented with, the folder doesn't exist.ALERT! /dev/mapper/vg--1-lv--root does not exist. Dropping to a shell!
But if I boot from the flash drive and execute a shell in the root partition:
Code: Select all
# ls /dev/mapper
control nvme0n1p8_crypt vg--1-lv-home vg--1-lv-root vg--1-lv-swap vg--1-lv-tmp vg--1-lv-var
Hopefully this is enough information for somebody to have an idea how to fix things. I've searched the forum and the web but couldn't find a previous occurrence of this particular problem.
Longer description
I originally got a laptop (Dell XPS-15) with a 1TB hard drive and 6 Windows partitions. I resized the big NTFS partition in order to create 750GB of free space. From this space I created a 1GB partition for /boot, and an encrypted volume with several logical volumes, for /home, /, /tmp, /var, and some swap storage.
So the partitioning looks like the following:
- #1 200MB EFI system partition, mounted to /boot/efi
- #2 140MB Microsoft recovery partition
- #3 to #6 NTFS partitions
- #7 1GB ext4 partition mounted to /boot
- #8 750GB encrypted volume
- LV #1 540GB ext4 lv-home mounted to /home
- LV #2 150GB ext4 lv-root mounted to /root
- LV #3 16GB swap space
- LV #4 25GB ext4 lv-tmp mounted to /tmp
- LV #5 25GB ext4 lv-var mounted to /var
When reinstalling, I booted from the same flash drive as the original install, used Rescue Mode and formatted all the LVs except /home. I also formatted partition #7, setting it to ext4 and mounting it to /boot as before. Note that in the installer, I was unable to set its bootable flag to "on". But I'm pretty sure that was also the case during the original install.
So far so good, but on boot I get
Code: Select all
[ <number> ] psmouse serio1: elantech: elantech_semd_cmd query 0x02 failed
[ 1.598600] psmouse serio1: elantech: failed to query capabiities
Volume group "vg-1" not found
Cannot process volume group vg-1
<last 2 line srepeated many times>
Gave up waiting for suspend/resume device
Volume group "vg-1" not found
Cannot process volume group vg-1
Gave up waiting for root file system device. Common problems:
- Boot args (cat /proc/cmdline)
- Check rootdelay= (did the system wait long enough?)
- Missing modules (cat /proc/modules; ls /dev)
ALERT! /dev/mapper/vg--1-lv--root does not exist. Dropping to a shell!
BusyBox v1.30.1 (Debian 1:1.30.1-6+b3) built-in shell (ash)
Enter 'help' for a list of built-in commands
(initramfs) cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-5.10.0-10-amd64 root=/dev/mapper/vg--1-lv--root ro quiet
From `ls /dev`, I can see that /dev/mapper doesn't exist, which explains the error message.
But then I executed a shell in the root logical volume using the following steps:
- Booting from flash drive
- Advanced options...
- Graphical rescue mode
- Select language, keyboard layout, network, hostname etc
- Enter passphrase for encrypted volume /dev/nvme0n1p8
- Select root system /dev/vg-1/lv-root
- Mount /boot partition: Yes
- Mount /boot/efi partition: Yes
- Execute a shell in /dev/vg-1/lv-root
Code: Select all
# mount -a
# ls /dev/mapper
control nvme0n1p8_crypt vg--1-lv-home vg--1-lv-root vg--1-lv-swap vg--1-lv-tmp vg--1-lv-var
Things I've tried
I've tried reinstalling again.
From the graphical rescue mode, I also tried reinstalling GRUB into the boot partition (/dev/nvme0n1p7), to no avail.
In my searches, the closest thing I found to my problem was bug #968295, which was caused by a bad install of the cryptsetup package. That doesn't seem to be my problem. From a shell in the root partition:
Code: Select all
# mount -a
# dpkg -l cryptsetup lvm2
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Inst/Conf-files/Unpacked/halF-conf/Half-int/trig-aWait/Trig-pend
|/ Err?=(none)/Reinst-required (Statu,Err; uppercase=bad)
||/ Name Version Architecture Description
++-=============-============-============-===========================
ii cryptsetup 2:2.3.5-1 amd64 disk encryption support - startup scripts
ii lvm2 2.03.11-2.1 amd64 Linux Logical Volume Manager
Thanks to anyone who has read the whole post, and I hope someone will be able to point me in the right direction!