I have a VirtualBox with Debian Jessie. After some point I decided to create new virtual drive, encrypt it with LUKS, and copy old system to it without reinstalling. I've used several guides (1,2,3,4) to do this, but something goes wrong - when I'm trying to boot from the second drive, I'm getting black screen with cursor (not even sure if it blinks). Looks like that is some kind of a grub related problem.
What was before is just a system on a single partiton:
Disk /dev/sda: 20 GiB, 21474836480 bytes, 41943040 sectors Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 40136703 40134656 19,1G 83 Linux /dev/sda2 40138750 41940991 1802242 880M 5 Extended /dev/sda5 40138752 41940991 1802240 880M 82 Linux swap / Solaris
New disk is /dev/sdb 40Gb. I've prepared this drive as in 1, then mounted this drives and copy everything from old system:
# mount /dev/mapper/vg-root /mnt/ # mount /dev/mapper/vg-home /mnt/home # cp -a cp -a /bin /boot /etc /home /lib /root /sbin /usr /var /mnt
Then chrooted to "new" system:
# mount -t proc none /mnt/proc # mount -t sysfs none /mnt/sys # mount --bind /dev /mnt/dev # chroot /mnt
/dev/mapper/vg-root / ext4 errors=remount-ro 0 1 /dev/mapper/vg-home /home ext4 errors=remount-ro 0 1 /dev/mapper/vg-swap none swap sw 0 0
Added changes to crypttab, initramfs and grub:
# echo 'lvm /dev/sda2 none luks' >> /etc/crypttab # echo 'lvm2 dmcrypt' >> /etc/initramfs-tools/modules # update-initramfs -k all -u
Added options to /et/default/grub:
then installed grub
# dpkg-reconfigure grub-pc and verified /boot/grub/grub.cfg (pastebin)
After trying to boot from this second drive I'm getting black screen with cursor. No errors, not texts of any kind. I think that even grub wasn't started...
Any ideas except to reinstall?