How can I dual-boot a TrueCrypt-encrypted Windows 7 and Ubuntu 11.10 when both are installed separately on different physical drives?
I have two hard drives. hd0 has a TrueCrypt-encrypted Windows 7 installation with the TrueCrypt bootloader. hd1 has an Ubuntu 11.10 installation with the grub2 bootloader.
The output of fdisk -l
is as follows:
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 206847 102400 7 HPFS/NTFS/exFAT
/dev/sda2 206848 976771071 488282112 7 HPFS/NTFS/exFAT
Device Boot Start End Blocks Id System
/dev/sdb1 * 2048 968517631 484257792 83 Linux
/dev/sdb2 968519678 976771071 4125697 5 Extended
/dev/sdb5 968519680 976771071 4125696 82 Linux swap / Solaris
I can successfully boot into either OS by changing the boot order in the BIOS but do not want to have to repeatedly do this. My options are either:
- Add the TrueCrypt bootloader to the grub2 config and chainload this with grub2.
- Boot into the TrueCrypt bootloader and, when hitting escape to exit password entry, boot into grub2.
I have had difficulty with option 1, as when hitting escape TrueCrypt finds no other bootable partition. As I understand, it should search for other bootable disks.
I also have had difficulty with option 2, and with the following inside /etc/grub.d/40_custom
(and then running update-grub2
) …
menuentry "Windows 7" {
set root=(hd0,1)
chainloader +1
}
(I also tried root=(hd0,0)
and root=(hd0,2)
)
… I get errors with no such partition. I have also read various sources that suggest it isn't possible to do this with grub2 without mounting and booting into the TrueCrypt rescue disk ISO prior to booting Windows. Is this necessary?
What am I doing wrong?
Best Answer
I can help you in a workarround, it is quite tricky so be sure to understand it.
First: BackUP all Second: It requieres two physical disks, with just one i did not get to it
Go to tricky part, the Boot secuence order process:
Having this in mind, how to archive that? Easy, follow this steps:
With this you will get this scheme:
The trick is:
So when booting this is what happens:
In this way:
Hope it is enough clear.
Things in mind to archive this:
Now, i must say it can be done without opening the PC... with both disks allways connected.
Imagine this:
That is the tricky!!!
The idea: Use another medium to do the actual boot menu where you can select waht to boot.
Personally on my netbook i have this chain:
This is the idea... have in the boot process more than one GRUB!!
Why more than one? Easy... in case the system updates the Grub it does not touch the one i use as a boot menu, simple and efective.
Now, the TrueCrypt problem... if it encypts the system partition it need to be onto the MBR it do not let you any other way (except RecoveryCD).
So if TrueTrypt encrypts a Windows system partition, better let it the full disk
Hey! Linux also can be installed on same disk as Windows for performance... and data on the other...
First HDD with:
Second HDD with:
Hope you will get to it.
I had explained as this just thinking you know how to boot from a CD, configure BIOS, create partitions, install GRUB2, etc...
This is not for noobs. Has very advances techniques steps and is not a HowTo...
It is only the idea to boot from another media, such other media (a CD, Floppy, etc) will contain a Boot menu that let select to boot from First HDD or from a partition, etc... in other words GRUB2.
Hope you find it usefull.