[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble installing to partition: embedding is not possible

From: Mistave
Subject: Trouble installing to partition: embedding is not possible
Date: Tue, 25 Jul 2017 14:19:21 +0200


I'm trying to setup encrypted dual-boot laptop with Win7 and Ubuntu Mate 16.04 
LTS on a disk with legacy BIOS/msdos partition table. Windows 7 is installed on 
sdb3 and encrypted with Veracrypt that has placed its bootloader in the first 
2048 disk sectors. Here's the disk layout:

Device     Boot      Start        End    Sectors   Size Id Type
/dev/sdb1             2048       4095       2048     1M 83 Linux
/dev/sdb2             4096 1954039807 1954035712 931.8G 83 Linux
/dev/sdb3  *    1954039808 3907028991 1952989184 931.3G  7 HPFS/NTFS/exFAT

The system boots fine to Windows, and it's time to install LUKS-encrypted linux 
to /dev/sdb2. Afaik, the VC bootloader is capable of chainloading or jumping to 
another partition, provided that the ESC key is pressed during passphrase 
entry. This would technically give me the ability to jump straight to GRUB2 on 
partition 1, if I were to install it there.

Normally I'd put a 512MB unencrypted /boot partiion here, but since GRUB2 
supports encrypted /boot I decided to give it a go. The guides I followed are 
the ones by Mr. Pavel Kogan.

I did pretty much what the guides suggest i.e....

- Setup LUKS on /dev/sdb2, format it as ext4 and set the mountpoint to /

- Install Ubuntu - Ubiquity had to be run with the "-b" flag to prevent grub2 
from overwriting the veracrypt bootloader on /dev/sdb (MBR area), will have to 
install grub manually later on.

- Chroot into /target

- Set GRUB_ENABLE_CRYPTODISK=y and GRUB_CMDLINE_LINUX in /etc/default/grub

- Add appropriate crypttab and fstab entries

- luksAddKey, update-initramfs -u, etc.

The only thing left to do was to install grub. Pavel's guides suggest to 
install grub to the MBR area, but unfortunately that isn't an option here since 
the Veracrypt bootloader already resides there. Knowing this in advance, I 
purpously created a small 1MB empty partition at /dev/sdb1 exclusively for grub:
# dd if=/dev/zero of=/dev/sdb1 bs=512 count=2048

Now all that's left is to...
# grub-install -v --debug -s --force 
/dev/disk/by-id/ata-ST2000LM007-1R8174_WCC22V3L-part1 > debug.log 2>&1

Unfortunately that doesn't work, and grub-install errors out with:
grub-install: warning: Attempting to install GRUB to a partitionless disk or to 
a partition.  This is a BAD idea..
grub-install: error: embedding is not possible, but this is required for RAID 
and LVM install.

I can't find any useful information about this error online. Why is this 
happening, is the dedicated partition (1 meg) too small? Out of curiosity I 
tried installing grub to MBR (/dev/sdb) directly, and it installed fine with no 
errors (don't worry, I had a backup of the first 2048 disk sectors which I 
dd'ed back to the HDD later on).

So here's where I'm stuck. Can someone please point me in the right direction 
I've attached a debug.log from the grub-install command I ran above.

Kind regards!

Attachment: debug.log
Description: Binary data

reply via email to

[Prev in Thread] Current Thread [Next in Thread]