Created
April 11, 2011 20:25
-
-
Save colinux/914250 to your computer and use it in GitHub Desktop.
successive commands to recover from live system my debian installation with lvm crypted and grub on separate partition
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assume here boot/grub is on a separate partition, /dev/sda4 | |
# The full LVM partition is on /dev/sda3 and named VM-system (pvs gives hints) | |
# On a live cd with network ... | |
aptitude install lvm2 (+ cryptsetup if not installed) | |
modprobe dm-crypt | |
cryptsetup luksOpen /dev/sda3 VM-system | |
pvs | |
pvdisplay /dev/mapper/VM-system | |
mount /dev/mapper/VM_group-LV_system /mnt | |
mount --bind /dev/pts /mnt/dev/pts | |
mount --bind /proc /mnt/proc | |
mount --bind /sys /mnt/sys | |
mount /dev/sda4 /mnt/boot # for grub / img manipulations | |
cp /etc/resolv.conf /mnt/etc/resolv.conf | |
chroot /mnt | |
# do all your recover operations here, including aptitude commands | |
umount /dev/pts | |
umount /sys | |
umount /proc | |
umount /boot | |
exit | |
cryptsetup luksClose VM-system |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment