Hallo liebes Forum,
ich habe gesterm das Update von 22.04 auf 24.04 angestoßen. Ich nutze verschlüsselte Partitionen (luks) mit LVM. Ich vermute, dass hierbei etwas bzgl. initramfs schief gelaufen ist (versehentlich etwas überschrieben o.ä.?). Das System bootet nicht mehr. Fehlermeldung:
1 2 3 4 5 6 7 8 9 10 | 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/vgubuntu-root does not exist. Dropping to a shell! BusyBox v1.36.1 (Ubuntu 1:1.36.1-6ubuntu3.1) built-in shell (ash) Enter 'help' for a list of built-in commands. (initramfs) |
Aus der shell (initramfs)
komme ich auch nicht mit exit heraus. cryptsetup luksOpen
kann ich von hier aus nicht nutzen.
Über ls konnte ich herausfinden, dass /dev/mapper/vgubuntu-root tatsächlich nicht vorhanden ist.
Ich kann ein Live-System starten und die verschlüsselten Partitionen einhängen und hoffe daher, dass ich mittels Live System und chroot das aktualisierte System wieder "retten" kann (ich nehme an über update-initramfs
, ähnlich wie hier: https://askubuntu.com/questions/286284/system-no-longer-boots-gave-up-waiting-for-root-device-initramfs-dev-mappe). Das hatte ich auch versucht (konkret im Wesentlichen nach dieser Anweisung: https://unix.stackexchange.com/a/647863) - leider erfolglos.
Ich habe ein Clonezilla Backup der gesamten SSD des betroffenen Systems. Notfalls kann ich also zu dem lauffähigen 22.04-Stand zurück.
Ich bitte hier um eure Unterstützung dabei das System wieder in einen bootfähigen Zustand zu bringen.
Infos zu meinem System
lsblk (Ausschnitt interne SSD des betroffenen Systems)
1 2 3 4 5 | NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS nvme0n1 259:0 0 1.8T 0 disk ├─nvme0n1p1 259:1 0 200M 0 part ├─nvme0n1p2 259:2 0 2G 0 part └─nvme0n1p3 259:3 0 1.8T 0 part |
lsblk -fs (Ausschnitt interne SSD des betroffenen Systems)
1 2 3 4 5 6 7 8 9 10 11 12 | NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS nvme0n1p1 vfat FAT32 EFI FD6C-D98B └─nvme0n1 nvme0n1p2 ext4 1.0 eff16e91-2089-4fc6-afcb-ba837b835eb0 └─nvme0n1 nvme0n1p3 crypto 2 a0b3f136-eece-4fae-bdb2-4dfa8fa401d0 └─nvme0n1 |
/etc/crypttab
1 | lukslvm UUID=a0b3f136-eece-4fae-bdb2-4dfa8fa401d0 none luks |
fstab
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point> <type> <options> <dump> <pass> /dev/mapper/vgubuntu-root / ext4 errors=remount-ro 0 1 # /boot was on /dev/nvme0n1p2 during installation UUID=eff16e91-2089-4fc6-afcb-ba837b835eb0 /boot ext4 defaults 0 2 # /boot/efi was on /dev/nvme0n1p1 during installation UUID=FD6C-D98B /boot/efi vfat umask=0077 0 1 /dev/mapper/vgubuntu-home /home ext4 defaults 0 2 /swapfile none swap sw 0 0 |
/etc/default/grub
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: # info -f grub -n 'Simple configuration' GRUB_DEFAULT=0 GRUB_TIMEOUT_STYLE=hidden GRUB_TIMEOUT=0 GRUB_DISTRIBUTOR=`( . /etc/os-release; echo ${NAME:-Ubuntu} ) 2>/dev/null || echo Ubuntu` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash kopt=root=/dev/mapper/vgubuntu-root" GRUB_CMDLINE_LINUX="" # If your computer has multiple operating systems installed, then you # probably want to run os-prober. However, if your computer is a host # for guest OSes installed via LVM or raw disk devices, running # os-prober can cause damage to those guest OSes as it mounts # filesystems to look for things. #GRUB_DISABLE_OS_PROBER=false # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal #GRUB_TERMINAL=console # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" |
etc/cryptsetup-initramfs/conf-hook
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | # # Configuration file for the cryptroot initramfs hook. # # # KEYFILE_PATTERN: ... # # The value of this variable is interpreted as a shell pattern. # Matching key files from the crypttab(5) are included in the initramfs # image. The associated devices can then be unlocked without manual # intervention. (For instance if /etc/crypttab lists two key files # /etc/keys/{root,swap}.key, you can set KEYFILE_PATTERN="/etc/keys/*.key" # to add them to the initrd.) # # If KEYFILE_PATTERN if null or unset (default) then no key file is # copied to the initramfs image. # # Note that the glob(7) is not expanded for crypttab(5) entries with a # 'keyscript=' option. In that case, the field is not treated as a file # name but given as argument to the keyscript. # # WARNING: # * If the initramfs image is to include private key material, you'll # want to create it with a restrictive umask in order to keep # non-privileged users at bay. For instance, set UMASK=0077 in # /etc/initramfs-tools/initramfs.conf # * If you use cryptsetup-suspend, private key material inside the # initramfs will be in memory during suspend period, defeating the # purpose of cryptsetup-suspend. # #KEYFILE_PATTERN= # # ASKPASS: [ y | n ] # # Whether to include the askpass binary to the initramfs image. askpass # is required for interactive passphrase prompts, and ASKPASS=y (the # default) is implied when the hook detects that same device needs to be # unlocked interactively (i.e., not via keyfile nor keyscript) at # initramfs stage. Setting ASKPASS=n also skips `cryptroot-unlock` # inclusion as it requires the askpass executable. #ASKPASS=y |
Was ich versucht habe (in Anlehnung an https://unix.stackexchange.com/a/647863)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | sudo cryptsetup luksOpen /dev/nvme0n1p3 nvme0n1pe_crypt sudo mkdir /mnt/vgubuntu-root sudo vgscan Found volume group "vgubuntu" using metadata type lvm2 sudo vgchange -ay 2 logical volume(s) in volume group "vgubuntu" now active sudo mount /dev/mapper/vgubuntu-root /mnt/vgubuntu-root sudo mount /dev/nvme0n1p2 /mnt/vgubuntu-root/boot/ sudo mount -o rbind /dev/ /mnt/vgubuntu-root/dev/ sudo mount -t proc proc /mnt/vgubuntu-root/proc/ sudo mount -t sysfs sys /mnt/vgubuntu-root/sys/ sudo cp /etc/resolv.conf /mnt/vgubuntu-root/resolv.conf sudo chroot /mnt/vgubuntu-root/ /bin/bash apt install cryptsetup [...] cryptsetup is already the newest version (2:2.7.0-1ubuntu4.2) apt install lvm2 [...] lvm2 is already the newest version (2.03.16-3ubuntu3.2). update-initramfs -u -k all update-initramfs: Generating /boot/initrd.img-6.8.0-54-generic update-initramfs: Generating /boot/initrd.img-5.19.0-41-generic update-grub Sourcing file `/etc/default/grub' Generating grub configuration file ... Found linux image: /boot/vmlinuz-6.8.0-54-generic Found initrd image: /boot/initrd.img-6.8.0-54-generic Found linux image: /boot/vmlinuz-5.19.0-41-generic Found initrd image: /boot/initrd.img-5.19.0-41-generic Found memtest86+ 64bit EFI image: /memtest86+x64.efi Warning: os-prober will not be executed to detect other bootable partitions. Systems on them will not be added to the GRUB boot configuration. Check GRUB_DISABLE_OS_PROBER documentation entry. Adding boot menu entry for UEFI Firmware Settings ... done exit sudo sync sudo umount /mnt/vgubuntu-root/sys sudo umount /mnt/vgubuntu-root/proc sudo umount /mnt/vgubuntu-root/boot |
Ich hoffe, dass hier jemandem noch etwas dazu einfällt. Sollte etwas fehlen, gerne melden und ich liefere nach.
Danke! Max
Bearbeitet von redknight:
Titel angepasst.