Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I can't get a Ubuntu 14.04 Virtual server to boot correctly. It's recently been cloned "dd if=/dev/sda of=vmimage" The Physical has a RAID1-LVM-DMCRYPT-LUKS configuration, The boot sequence aborts and drop to the BusyBox shell.

Begin: Waiting for encrypted source device

I can see above the message that it was unable to find any volume groups.

No volume groups found

I suspect this is due to the raid not starting up correctly.

Looking at /proc/mstat indicates that md0 is active and md1 is inactive

I have to stop md1, and force it with --run to start

mdadm --stop /dev/md1
mdadm --assemble /dev/md1 /dev/sda2 --run

I am now able to mount partitions on /dev/md0 and unlock the dmcrypt volume manually if I so desire.

If I exit the shell, it tries to unlock the dmcrypt container, but still fails to boot.

enter image description here

How do I fix this?

share|improve this question

2 Answers 2

Your problem is caused by booting with one virtual disk cloned from two physical disks. After manually booting, you could try this if you have md0 uncrypted and md1 crypted :

vi /etc/initramfs-tools/scripts/local-top/workaround_mdadm : #!/bin/sh sleep 5 mdadm --stop /dev/md1 mdadm --stop /dev/md0 sleep 5 mdadm --assemble --scan Note : Feel free to change the sleep values as well.

Make the file executable : chmod 755 /etc/initramfs-tools/scripts/local-top/workaround_mdadm

Create new initrd files in /boot : update-initramfs -k all -c

Reboot with your virtual disk and check if you are prompted for a passphrase.

share|improve this answer

It looks like since your passphrase worked, you can just manually mount it in a LiveCD / repair CD, and then find out what is wrong... maybe the filesystem is corrupt, but you can at least read most of it, just not boot.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.