Recover from hard drive MBR corruption with LVM/LUKS partitions
Tags mbr luks lvm
Using latest version boot cd or usb rescue disk, which is created by usbboot.img from cd or ftp.slackware.com
create usbboot.img with dd command.(#dd if=usbboot.img of=/dev/sdb bs=1M) (clear usb disk #dd if=/dev/zero of=/dev/sdb bs=512).
once boot up:
# cryptsetup luksOpen /dev/sdxx luksname (sdxx your encrypted luks partition)
After successful enter password:
#vgscan --mknodes
#vgchange -ay
#mount /dev/cryptvg/root /mnt
before change root, you can modify any files necessary in /mnt/ directory; such as /mnt/etc/lilo.conf
#chroot /mnt
#mount /dev/sda1 /boot (assume your boot partition is /dev/sda1)
#lilo
reboot.
create usbboot.img with dd command.(#dd if=usbboot.img of=/dev/sdb bs=1M) (clear usb disk #dd if=/dev/zero of=/dev/sdb bs=512).
once boot up:
# cryptsetup luksOpen /dev/sdxx luksname (sdxx your encrypted luks partition)
After successful enter password:
#vgscan --mknodes
#vgchange -ay
#mount /dev/cryptvg/root /mnt
before change root, you can modify any files necessary in /mnt/ directory; such as /mnt/etc/lilo.conf
#chroot /mnt
#mount /dev/sda1 /boot (assume your boot partition is /dev/sda1)
#lilo
reboot.
Total Comments 0