I had to restore my system from backup to a brand new disk, restored grub2 as per the manual http://manual.aptosid.com/en/sys-admin-grub2-en.htm#chroot adjusted fstab and /etc/crypttab but the system wouldn't boot.
It was previously configured as:
sda2: /boot as a separate partition
sda3: LUKS/dm-crypt with LVM2 on top-partition, with different lv's for / /usr /var /tmp /home swap
which, in hindsight i found it to be too cluttered
On boot up i had to type in the crypto passphrase to unlock the cryptvolume, it found all lv's and activated them, straight on to the kdm login.

So now i went for an easier approach
sda2: /boot as a separate partition
sda5: /
sda6: /var
sda3 swap
no LUKS/dm-crypt and no LVM2

How should i proceed to have the restored system boot up properly without complaining for the missing crypto volume
Do i just need to update the initramfs'es?

Incomplete checklist:
Grub in the mbr must point to the boot partition.
The kernelline must contain some entry for 'root=...' which points to sda5, there must not be any 'cryptopts=...' line in the kernel boot line
Why is there still any crypttab in the /etc folder?

that didn't work either, then mv /etc/crypttab /etc/crypttab.BAK, recreated the initrd.img, rebooted,
still didn't work

The only thing i get to see past the grub menu after choosing the kernel version for which i recreated it's initrd.img is the penguins, followed by the following text

Code:

Loading, please wait...
Volume group "cryptVG" not found
Skipping volume group cryptVG
Unable to find LVM volume cryptVG/swap
Reading all physical volumes. This may take a while...
No volume groups found
No volume groups found
crypsetup: evms_activate is not available

Any idea's ?
thank you in advance

bfree

Post subject: RE: help with disk migration Posted: 07.01.2012, 15:33

Team Member

Joined: 2010-08-26
Posts: 267

Status: Offline

You can probably find out where cryptVG stuff is still hiding with:

Code:

grep -r cryptVG /etc

Use what you find there to make sure nothing is left trying to access the cryptVG, get crypttab out of the way, recreate the initrd and update-grub.

What does "cat /proc/cmdline" say in the initrd shell after it has failed to boot?

Did you re-install grub using the chroot method from the manual ... or in other words are you sure that the grub you are using is the new grub and not still the old one from the encrypted install?

Anung

Post subject: RE: help with disk migration Posted: 17.01.2012, 15:13

Joined: 2010-12-01
Posts: 9

Status: Offline

Thanks bfree!

A bit late reply bc the notebook had to go in for a mobo replacement, so i couldn't test more.

That command really helped me find most of the references to the cryptVG stuff.
I moved stuff out of the way in /etc/lvm/archive, /etc/lvm/backup, /etc/lvm/cache and /etc/lvm/lvm.conf
also in /etc/initramfs-tools/conf.d/resume
mv /etc/crypttab /etc/crypttab.BAK (see previous post)

recreated the initrd and ran update-grub
rebooted
but i still couldn't get past these errors: