Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
AnungOffline
Post subject: help with disk migration  PostPosted: 03.01.2012, 14:36



Joined: 2010-12-01
Posts: 9

Status: Offline
can anyone help me with the following problem:

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?
      Code:
update-initramfs -u -k all

or is there some else i'm missing?

thanks for any pointers

[Edit: typo fix]


Last edited by Anung on 07.01.2012, 14:33; edited 1 time in total
 
 View user's profile Send private message  
Reply with quote Back to top
michaaa62Offline
Post subject: RE: help with disk migration  PostPosted: 03.01.2012, 16:08



Joined: 2010-09-11
Posts: 54
Location: Berlin, Germany
Status: Offline
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?
 
 View user's profile Send private message  
Reply with quote Back to top
AnungOffline
Post subject: RE: help with disk migration  PostPosted: 07.01.2012, 14:41



Joined: 2010-12-01
Posts: 9

Status: Offline
Thanks michaaa62 but i'm still stuck

[more info]
The original setup was done following two sidux wiki articles, this one is still here (aptosid) however:
FullDiskEncryptionTheDebianWay
http://aptosid.com/index.php?module=wikula&tag=FullDiskEncryptionTheDebianWay
      Quote:
The kernelline must contain some entry for 'root=...' which points to sda5, there must not be any 'cryptopts=...' line in the kernel boot line
there are not any 'cryptopts=...' in the kernel boot line, i've never seen any of those.

i've verified the /boot/grub/grub.cfg file to make sure the uuid's point to the right partions
for every kernel i see these options:
search --no-floppy --fs-uuid --set=root <uuid>
root=UUID=<uuid>

which point to the correct partitions (/etc/fstab)
so it looks like the /boot/grub/grub.cfg file was generated correctly from the start.
      Quote:
Why is there still any crypttab in the /etc folder?
there is still a 2-nd hdd (in the extension bay) with 1 encrypted partition that belonged to the original cryptVG

i did a backup of one of the initrd.img, then did
update-initramfs -u -k <that>
update-grub
rebooted

that didn't work, so i got back to
update-initramfs -d -k <that>
update-initramfs -c -k <that>
rebooted

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
 
 View user's profile Send private message  
Reply with quote Back to top
bfreeOffline
Post subject: RE: help with disk migration  PostPosted: 07.01.2012, 15:33
Team Member


Joined: 2010-08-26
Posts: 258

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?
 
 View user's profile Send private message  
Reply with quote Back to top
AnungOffline
Post subject: RE: help with disk migration  PostPosted: 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:
      Code:

Loading, please wait...
mdadm: No arrays found in config file or automatically
  Volume group "cryptVG" not found
  Skipping volume group cryptVG
Unable to find LVM volume cryptVG/swap
INIT: version 2.88 booting
Uning makefile-style concurrent boot in runlevel S.
too many loops! (loop=100001, dep->name=udev, src->name=console-setup)
too many loops! (loop=100001, dep->name=udev, src->name=stop-bootlogd-single)
too many loops! (loop=100001, dep->name=udev, src->name=stop-bootlogd-single)
too many loops! (loop=100001, dep->name=udev, src->name=stop-bootlogd-single)
too many loops! (loop=100001, dep->name=udev, src->name=stop-bootlogd-single)
too many loops! (loop=100001, dep->name=udev, src->name=stop-bootlogd-single)
too many loops! (loop=100001, dep->name=udev, src->name=stop-bootlogd-single)
too many loops! (loop=100001, dep->name=udev, src->name=stop-bootlogd-single)
too many loops! (loop=100001, dep->name=udev, src->name=stop-bootlogd-single)
too many loops! (loop=100001, dep->name=bootlogd, src->name=stop-bootlogd-single)
Starting the hotplug events dispatcher: udevd.
Synthesizing the initial hotplug events...done.
Waiting for /dev/to be fully populated...udevd[1253]: failed to execute '/lib/udev/mtp-probe'


      Quote:
What does "cat /proc/cmdline" say in the initrd shell after it has failed to boot?
can't get any commandline to do "cat /proc/cmdline"
      Quote:
Did you re-install grub using the chroot method from the manual ...
<snip>
yes, i had to, but the old MBR would be useless anyway (i forgot to save the old disk's sda[12]'s MBR)
but i knew i could easily recover from such situations thanks to aptosid's fine manual Very Happy

More ideas?
thank you in advance
 
 View user's profile Send private message  
Reply with quote Back to top
AnungOffline
Post subject: RE: help with disk migration  PostPosted: 17.01.2012, 16:03



Joined: 2010-12-01
Posts: 9

Status: Offline
Update:

It does boot past the udev warnings, but i still get references to cryptVG like in the previous codebox.
How do i remove them completely?

thank you in advance
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by Zafenio