Debian Boot Failure Luks on LVM
Any seasoned gnu/linux gurus out there that would be willing to assist me in troubleshooting a Debian boot failure? I have read forum post and articles to gain as much knowledge as possible. I still feel unsure on how to proceed further. I never found I felt clear information in regards to Grub2 boot failures w/ LUKS on LVM.
My drives are all part of one volume group volumegroup. In the volume group is the following logical volumes; lv_boot, lv_home, lv_root, and lv_share. On top of the logical volumes are LUKS encrypted partitions; lv_home > home_crypt, lv_root > root_crypt, and lv_share > share_crypt.
This is a home personal file server, Debian Wheezy 7.9. It hasn't been rebooted in most likely six months. The only changes I have made are apt-get upgrades to the server. Note, I haven't rebooted since the last upgrade for sure and possibly haven't after previous ones. I rebooted yesterday and was presented with error message "error: no such device: f6b77c56-72da-413b-8bc6-be03b724fdbf Entering rescue mode ... grub rescue>. From the prompt executed command ls to display (hd0) (hd1) (hd2) (hd3) and the set command to display prefix=(hd0)/grub root=hd0 I assume this is normal since my /boot partition is on an lv.
I booted from a live Knoppix disk and was able to activate the LVs, luksOpen all of the encrypted partitions, and mount all without issue. I was also able to fsck -C -V -f each partition and all passed. I also executed smartctl and tested each physical drive and they passed without errors. The only thing I can think may have possibly caused this issue is either a virus, an upgrade, or possibly disk corruption? I hope it isn't a virus, I haven't seen odd behavior until now.
I have read of the possibility of chrooting to my / from a live distro, and executing a grub-install. I haven't ever performed this before. Also wasn't sure if it would work with the lvm/luks configuration. I am a little nervous though, would love advice before doing anything. I also would like to try to understand what has happened. Below I have pasted information in regards to my system. Where should I go next? Thanks so much.
blkid output below, please note the error missing UUID matches /dev/mapper/lv_boot, so that is the correct UUID.
/dev/sda1: UUID="0YgaZr-eS1S-Oavg-Eivj-lJM0-MeVV-CBWVp0" TYPE="LVM2_member"
/dev/sdb1: UUID="MMCG1D-VYlS-DpbG-8G7Q-voxK-fW4W-FHvSfZ" TYPE="LVM2_member"
/dev/sdc: UUID="CzyLmN-KcDr-4ZzT-fdDl-byBs-OPIe-JB5CXf" TYPE="LVM2_member"
/dev/sdd: UUID="d3l2c5-xePC-wxAe-Vxxo-AAhg-DTV2-n2Akpm" TYPE="LVM2_member"
/dev/mapper/lv_boot: LABEL="boot" UUID="f6b77c56-72da-413b-8bc6-be03b724fdbf" TYPE="ext2"
/dev/mapper/lv_root: UUID="05201dc1-a2db-461b-a999-f8e7d40e46c8" TYPE="crypto_LUKS"
/dev/mapper/lv_share: UUID="d921c506-3fa3-46da-9626-1e70668aa2b2" TYPE="crypto_LUKS"
/dev/mapper/lv_home: UUID="fb8038a8-6020-47f6-8cac-fa2599bd3101" TYPE="crypto_LUKS"
/dev/mapper/root_crypt: LABEL="root" UUID="4d5edea4-ec99-4d2e-ade1-1322c7594b2b" TYPE="ext4"
/dev/mapper/share_crypt: LABEL="share" UUID="63503a9f-ff15-4897-a5d2-ad1523c3e63c" TYPE="ext4"
/dev/mapper/home_crypt: LABEL="home" UUID="eee20a81-0c28-4f94-98ba-bcdf21c83f45" TYPE="ext4"
cat crypttab:
root_crypt UUID=05201dc1-a2db-461b-a999-f8e7d40e46c8 none luks
swap_crypt /dev/mapper/swap /dev/urandom cipher=aes-xts-plain64,size=256,swap
home_crypt UUID=fb8038a8-6020-47f6-8cac-fa2599bd3101 /root/afile luks
share_crypt UUID=d921c506-3fa3-46da-9626-1e70668aa2b2 /root/afile luks
cat fstab:
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/mapper/root_crypt / ext4 errors=remount-ro 0 1
/dev/mapper/lv_boot /boot ext2 defaults 0 2
/dev/mapper/home_crypt /home ext4 defaults 0 2
/dev/mapper/share_crypt /share ext4 defaults 0 2
/dev/mapper/swap_crypt none swap sw 0 0
/dev/sr0 /media/cdrom0 udf,iso9660 user,noauto 0 0
cat grub:
GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX=""
cat grub.cfg:
### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
load_env
fi
set default="0"
if [ "${prev_saved_entry}" ]; then
set saved_entry="${prev_saved_entry}"
save_env saved_entry
set prev_saved_entry=
save_env prev_saved_entry
set boot_once=true
fi
function savedefault {
if [ -z "${boot_once}" ]; then
saved_entry="${chosen}"
save_env saved_entry
fi
}
function load_video {
insmod vbe
insmod vga
insmod video_bochs
insmod video_cirrus
}
set timeout=5
### END /etc/grub.d/00_header ###
### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64' --class debian --class gnu-linux --class gnu --class os {
load_video
insmod gzio
echo 'Loading Linux 3.2.0-4-amd64 ...'
linux /vmlinuz-3.2.0-4-amd64 root=/dev/mapper/root_crypt ro quiet
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.2.0-4-amd64
}
menuentry 'Debian GNU/Linux, with Linux 3.2.0-4-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
load_video
insmod gzio
echo 'Loading Linux 3.2.0-4-amd64 ...'
linux /vmlinuz-3.2.0-4-amd64 root=/dev/mapper/root_crypt ro single
echo 'Loading initial ramdisk ...'
initrd /initrd.img-3.2.0-4-amd64
}
### END /etc/grub.d/10_linux ###
### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###
### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###
### BEGIN /etc/grub.d/41_custom ###
if [ -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###
|