LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Encrypted root and swap on thumbdrive (https://www.linuxquestions.org/questions/ubuntu-63/encrypted-root-and-swap-on-thumbdrive-744458/)

itags.org 08-02-2009 12:07 AM

Encrypted root and swap on thumbdrive
 
Hello! I'm attempting a rather unusual install of Ubuntu, and have run into an issue. I'm trying to make a very multi-purpose thumbdrive, and I'll try to quickly explain that before the issue. Right now the thumbdrive is laid out as...:banghead:

0: GRUB (legacy, MBR)
-----------
1: NTFS (24gb)
2: ext4 (1gb, /boot, active)
3:extended partition containing...
4: ext4 (15gb, /, encrypted)
5: ext4 (15gb)
6: raw (linux-swap, encrypted)

The eventual goal is to have a working portable Ubuntu, along with GRUB being able to boot some liveCDs from partition 5. The reason for NTFS is because apparently Windows XP can only handle one partition per 'removable media' and always only mounts the first, so it's still a good storage thumbdrive too.

I can do all that, I believe, but I'm having a problem with encrypted filesystems. I used the 9.04 alternate installer, created my encrypted filesystems, and installed Ubuntu on 4. When I boot to it, GRUB Stage 1 fires off, pushes to 1.5, and 2, and the next thing I see is the Ubuntu splash asking for the password to the drive with a certain UUID, which I have confirmed to be partiton 4. I type in the password, it takes it and says it's right then... nothing. It hangs forever. Without the splash in the way, I can see it is hanging at... "Begin: Waiting for encrypted device... ...".

Originally, in the initrd, it had /conf/conf.d/cryptroot containing targets for both / and swap, and only / was called by UUID, while swap was called by /dev/sda6 (a bug in the alternate installer's creation of the ramdisk?), which was incorrect on the system I was booting it on. I changed it to be that partition's UUID, and still... nothing. Not sure what to try now! Any help would be appreciated! Please don't just advise against installing it on a thumbdrive... I know it's not the 'best' idea!

linus72 08-02-2009 05:04 PM

Mmmmm...
well, other Members can help with all the encryption stuff

I have a couple 3 questions if'n you don't mind...


Never seen a partition layout like that for a USB:)

I thought swap on a usb was a no-no??

What do you mean by "portable" ubuntu?
frugal install or full hd install?

You could use fat32 for the 1st partition too, I think?

There's many many Ubuntu based security distro's
which ubutntu?
just reg ubuntu?

Just wondering as I just use the whle usb on mine
new 8gb ext3 and have many distro's there:)


All times are GMT -5. The time now is 06:48 PM.