One hard disk (sda), two partitions, with a working Ubuntu running.
1) /boot
2) LVM with this virtual volumes/partions/ or whatever they are called inside:
- Swap
- Ubuntu
- Home
- Prepared for Backtrack
Of course I would like to share home and swap. I have seen tutorials, but they look outdated and complicated and they are for setting up everything just with backtrack. It seems you have to do some things manually after backtrack install to get it running with LUKS. I like to know what it is exactly that backtrack don't do automatically and how to install backtrack in my prepared partition. I want to tell backtrack NOT to install a boot-loader (I think it's possible) and setup the grub from Ubuntu to be able to boot backtrack.
Best Answer
Warning, wall of text incoming. It's as well formatted as I could make it.
If we're going to answer this, we're going to answer the whole thing. I'm not doing another answer on this, so here goes:
Let's pretend you know absolutely nothing, and I'm feeding you keystrokes.
This tells you everything you need to know to do this WHOLE thing, with a little bit of this and this thrown in. Really, read.
You could have, by reading that, arrived at:
Boot Ubuntu 11.10 as live.
Open a terminal. The sizes I'm using are on a 40G virtual disk. We're doing this all as
root
Which means, open dev/sda, new primary partition in position 1 of size no less than 1000MB with type ext3 or better, new primary partition in position 2 of type LVM, and write to disk.
Because I spelled it out, I'm going to assume you're running that setup EXACTLY.
We'll use /dev/sda1 for /boot and /dev/sda2 for EVERYTHING ELSE. You can change the sizes to suit your bare metal install, but this was for a VM to answer your question.
That says create a physical volume on /dev/sda2, a volume group of name iammaster on /dev/sda2, and logical volumes lvubuntu, lvhome, lvyouarestudent, and lvswap on volume group iammaster.
Just to check. Then format...
Okie-doke. Now you've got encrypted LVM. Mount your crypt partitions.
And the formatting and enabling swap...
Install per normal (custom) and don't reboot. Note that you have to do a non-standard install and double click to on the logical volumes to choose FS-Type and mount-point. Don't forget /dev/sda1 as boot. We then click install now. After a couple of continues, you're on your way. Click continue testing NOT restart now.
Get directories ready
Mount the special filesystems and boot
And chroot/install lvm/crypt
Next we need crypttab so we only unlock our disks once
Now for initramfs
Now on to repeating all this for backtrack...because if you do it manually right once, the next time should be the same
Install specify manual, specify mountpoints(shared /boot too. if you're using one behind/stable Ubuntu and edge BT it shouldn't be a problem with clobbering...if you're still concerned, add another boot partition), don't format. At step 8, advanced
When it finishes continue testing again, just like last time:
Get directories ready
Mount the special filesystems and boot
And chroot/install lvm/crypt
Next we need crypttab so we only unlock our disks once
Now for initramfs
Reboot to ubuntu live media
Just change /dev/mapper/ubuntu to /dev/mapper/bt and pass the right kernel arguments and you're done.
I went to a lot of trouble to create this tutorial. I hope you appreciate it.