How to make a bootable USB stick for booting a geli encryptet hard disk?

Adam Wood aswood at gmail.com
Wed Apr 19 16:45:20 UTC 2006


On 4/19/06, Frank J. Beckmann <frank at barda.agala.net> wrote:
> Thank you very much for your detailed description. It tells me that I have
> done everything right. I prepared the USB device like you described it, but
> none of my two computers is alble to boot the USB device. One always tells me
> "ivalid slice" and the other "invalid label". Because of that I think there
> is some geometry problem. I guess the bios uses another geometry than FreeBSD
> does. Or something else is completely wrong.

You might try using a CD-R, then. For this, you'll need access to
another (FreeBSD) system that has sysutils/cdrtools installed on it
(mkisofs is part of sysutils/cdrtools).

Boot your Live CD and mount some storage, like your USB key for example.

mount /dev/storage /mnt

Tar up the /dist/boot directory:

cd /dist; tar -zcvpf /mnt/boot.tgz boot

umount /dev/storage

Take the storage media and transfer this to another system, the one
with sysutils/cdrtools installed. If it's all networked, you can just
SCP it over (scp /dist/boot user at otherhost:~/boot).

On the other machine, unpack the boot.tgz into a new directory:

mkdir mybootcd; mv boot.tgz mybootcd/;
cd mybootcd; tar -zxvf boot.tgz
rm boot.tgz

Create a boot/loader.conf like you did previously:

echo geom_eli_load=\"YES\" >> boot/loader.conf

Create an /etc/fstab as you did before and place it in mybootcd/etc:

mkdir etc
vi etc/fstab

Now the fun part. Create the bootable ISO image with mkisofs:

mkisofs -R -no-emul-boot -b boot/cdboot -o /tmp/bootcd.iso mybootcd

Then in whatever manner you deem necessary, burn the /tmp/bootcd.iso
image to CD-R, load it up, and reboot. You should be good to go at
that point.

--adam


More information about the freebsd-geom mailing list