Sample Header Ad - 728x90

Problem with GRUB for dual-boot installation of LMDE 2 (and Windows) on encrypted luks-lvm (truecrypt)

1 vote
1 answer
1258 views
I'm trying to install LMDE 2 'Betsy' 64-Bit dual-booting with Windows 8.1 and both systems encrypted separately, Windows with truecrypt and LMDE with luks. When booting I want to be asked for the truecrypt volumes password and when I press Esc GRUB should start and boot the encrypted Linux. I want to have a LVM partition for my data which will be my home directory in Linux and which I plan to access with https://github.com/t-d-k/LibreCrypt . My problem is that I can't get GRUB working. Most of the following steps I took from https://wiki.ubuntuusers.de/system_verschl%C3%BCsseln and changed them to fit my needs. Here is my setup although Windows is not encrypted yet: /dev/sda1 Windows Recovery ntfs /dev/sda2 Boot ext4 300MiB /dev/sda3 Windows 8.1 truecrypt /dev/sda4 crypt-luks crypt-luks And here is what I did: Boot LMDE 2 from USB stick. Select German as language. Do the other stuff until I have to select a partition. There I enter Expert Mode where I get asked to mount my target System under /Ziel but it needs to be /target. I start to get the system ready with: cryptsetup -c aes-xts-plain64 -s 512 -h sha512 luksFormat /dev/sda4 cryptsetup luksOpen /dev/sda4 lukslvm pvcreate /dev/mapper/lukslvm vgcreate vglmde /dev/mapper/lukslvm Then I create my logical volumes: lvcreate -L 8G -n swap vglmde lvcreate -L 25G -n root vglmde lvcreate -l 100%FREE -n home vglmde I format these partitions with labels: mkswap /dev/mapper/vglmde-swap -L swap mkfs.ext4 /dev/mapper/vglmde-root -L root mkfs.ext4 /dev/mapper/vglmde-home -L home Then I mount the logical root partition in /target to continue installing: mkdir /target mount /dev/mapper/vglmde-root /target mkdir /target/boot mount /dev/sda2 /target/boot mkdir /target/home mount /dev/mapper/vglmde-home /target/home Then I continue the installation. When asked I choose that GRUB should be installed in /dev/sda2 because that is my boot partition. After the dialog Installation paused shows up, I perform the following steps: mount -o rbind /dev /target/dev mount -t proc proc /target/proc Here I get the message that proc is already mounted on /target/proc mount -t sysfs sys /target/sys Here it says that sys is already mounted or /target/sys is busy. cp /etc/resolv.conf /target/etc/resolv.conf chroot /target /bin/bash Then I make sure the required packages are up-to-date. apt-get update apt-get install cryptsetup lvm2 To set up the /etc/crypttab I first get the UUID and then append to the crypttab replacing with the UUID. blkid /dev/sda4 echo "lukslvm UUID= none luks" >> /etc/crypttab Then I append some necessary modules. echo "dm-crypt" >> /etc/modules echo "ohci_pci" >> /etc/initramfs-tools/modules update-initramfs -u -k all -t And I edit the /etc/fstab . echo "/dev/sda2 /boot ext4 defaults 0 2" >> /etc/fstab echo "/dev/mapper/vglmde-root / ext4 defaults,errors=remount-ro 0 1" >> /etc/fstab echo "/dev/mapper/vglmde-swap none swap sw 0 0" >> /etc/fstab echo "/dev/mapper/vglmde-home /home/ ext4 defaults 0 2" >> /etc/fstab Then I update GRUB and leave chroot. update-grub exit sync And continue the installation. When asked if I want to reboot I say yes and... ...at reboot I get the following output: error: no such partition Entering rescue mode... grub rescue> Now I can't figure out where I went wrong. Am I right that GRUB should have loaded normally when there is no other boot-able partition? P.S. When debugging the following commands let you use the installed system when on a live disc. Mounting the encrypted Volume cryptsetup luksOpen /dev/sda4 lukslvm Search and add the volume groups. vgscan vgchange -a y Mount the volumes as usual mount /dev/mapper/vglmde-root /mnt
Asked by Benjamin (191 rep)
Jul 16, 2015, 06:48 PM
Last activity: Jul 8, 2019, 09:02 AM