User Tools

Site Tools


linux:crash_recovery

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
linux:crash_recovery [2018/10/08 11:04]
tkilla
linux:crash_recovery [2022/07/10 02:07] (current)
tkilla [Full Disc Encrypted System Rescue]
Line 61: Line 61:
   fdisk -l    fdisk -l 
      
-  # open the container: +  # open the container  
-  cryptsetup luksOpen /dev/sdXY sdXY_crypt+  # "sdb5_crypt" is just an example. **Check what's written in /etc/crypttab - the names must match!** 
 +  cryptsetup luksOpen /dev/sdXY sdXY_sdb5_crypt
      
-  # activate the LVM volume group:+  # activate the LVM volume group (if you use LVM2):
   vgchange -ay   vgchange -ay
      
Line 76: Line 77:
   mount -t proc proc /mnt/proc   mount -t proc proc /mnt/proc
   mount -o bind /dev /mnt/dev   mount -o bind /dev /mnt/dev
 +  mount -t sysfs none /mnt/sys
  
  
Line 86: Line 88:
 All following commands are executed inside the broken system. Some hints for repairs: All following commands are executed inside the broken system. Some hints for repairs:
  
-  apt install lvm2     # debian uninstalled lvm during an upgrade :(+  apt install lvm2 cryptsetup-initramfs    # debian uninstalled lvm during an upgrade :(
  
 If your root system is BTRFS, you need btrfs-progs and the kernel module during the early initramfs boot stage: If your root system is BTRFS, you need btrfs-progs and the kernel module during the early initramfs boot stage:
Line 100: Line 102:
 Write one module name like "btrfs" per line. Write one module name like "btrfs" per line.
  
-Then regenerate the initramfs for all of the installed kernels:+Then regenerate the initramfs for all installed kernels:
  
-  update-initramfs --k all+  update-initramfs --k all 
 + 
 + 
 +* Check that the name in /etc/crypttab is the same as in the cryptsetup luksOpen Command, usually something like sda5_crypt 
 +* Also check the UUID entries in /etc/crypttab compared to ls -la /dev/disk/by-uuid/
  
  
 TbC..  There may be various other reasons for bootproblems... TbC..  There may be various other reasons for bootproblems...
 +
 +
 +
 +== Links: ==
 +
 +  * really helpul! https://feeding.cloud.geek.nz/posts/recovering-from-unbootable-ubuntu-encrypted-lvm-root-partition/
 +  * various other hints https://askubuntu.com/questions/567730/gave-up-waiting-for-root-device-ubuntu-vg-root-doesnt-exist#567897
 +
 +
 +
  
linux/crash_recovery.1538989480.txt.gz · Last modified: 2018/10/08 11:04 by tkilla