Hello folks,
I am attempting to boot a Linode with an encrypted root partition.
I have done this successfully on local virtual machines, but wanted to set one up on Linode.
My difficulty is with booting the system on the encrypted partition, not in setting up the encrypted partition or encrypted system.
From my understanding, I need to use the "pv-grub-x86_64" kernel in the Linode manager.
I consulted this forum post in which someone seemed to be doing something similar (
viewtopic.php?t=9101&p=52402) and this Linode How To regarding the use of pv-grub (
http://library.linode.com/custom-instan ... grub-howto).
I have the Linode disks configured as such:Code:
/dev/xvda /boot
/dev/xvdb swap
/dev/xvdc encrypted root partition
My /etc/crypttab is setup as follows:Code:
crypt-xvdc UUID=myuuid none luks
My /etc/fstab is setup as follows:Code:
prox /proc proc nodev,noexec,nosuid 0 0
/dev/mapper/crypt-xvdc / ext3 errors=remount-ro 0 1
/dev/xvda /boot ext3 defaults 0 2
/dev/xvdb swap swap defaults 0 0
I edited the /boot/grub/menu.lst file as in the Linode How To.
After update-grub, the file contains the following:Code:
title Ubuntu 12.04 LTS, kernel 3.2.0-23-generic
root (hd0)
kernel /vmlinuz-3.2.0-23-generic root=/dev/xvdc console=hvc0 ro quiet quiet splash
initrd /initrd.img-3.2.0-23-generic
title Ubuntu 12.04 LTS, kernel 3.2.0-23-generic (recovery mode)
root (hd0)
kernel /vmlinuz-3.2.0-23-generic root=/dev/xvdc console=hvc0 ro quiet single
initrd /initrd.img-3.2.0-23-generic
When I attempt to boot the following set in the Linode Manager:
- Kernel: pv-grub-x86_64
- Xenify Distro: off
- Root device: /dev/xvda
I invariable get dropped at a "grubdom" prompt.
Attempting to manually type in the same grub commands as above (at the console) results in a password prompt for decrypting the disk (yay!), but then errors out afterwards:
OutputCode:
grubdom> boot
close blk: backend at /local/domain/0/backend/vbd/3376/51712
close blk: backend at /local/domain/0/backend/vbd/3376/51728
close blk: backend at /local/domain/0/backend/vbd/3376/51744
Unlocking the disk /dev/disk/by-uuid/myuuid (crypt-xvdc)
Enter passphrase: ********
cryptsetup: crypt-xvdc set up successfully
mount: mounting /dev/xvdc on /root failed: No such device
mount: mounting /dev on /root/dev failed: No such file or directory
mount: mounting /sys on /root/sys failed: No such file or directory
mount: mounting /proc on /root/proc failed: No such file or directory
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.
BusyBox v1.18.5 (Ubuntu 1:1.18.5-1ubuntu4) built-in shell (ash)
Enter 'help' for a list of built-in commands.
Questions:- Is what I'm trying to do possible? (Encrypted root partition on a Linode), or am I just wasting my time?
- Any suggestions for where to look for more information?
- Any suggestions to fix the current problem with boot using grub?
Thanks!