5.1. Creating a linux Filesystem

The rest of this chapter assumes you already installed needed packages. If it's not the case, you should go to squashfs3.4 You should also have configured your kernel properly, as described in Section 4.1, “Configuring the Kernel”

You might have a brand new usb stick, or an old one, you will need to make an ext2 filesystem on it, for the live system

First, open the key with your favorite partitioning program, eg. cfdisk or fdisk or some other, and remove any partition already existing on it. Then, issue the following command:

dd if=/dev/zero of=/dev/<sdx>

Where /dev/<sdx> is your usb device.

Then, create one primary partition on the usb stick.

You will then have to create ext2 filesystem on the partition you created, using:

mke2fs -m 0 -L livekey /dev/<sdx1>
tune2fs -i 0 /dev/<sdx1>

Where sdx1 is the flash drive partition for the livekey

Option -m 0 is used to prevent mke2fs to reserve blocks.

Option -i 0 is used to prevent filesystem from being automatically checked.

Now that the filesystem has been set up on the key, go to Section 6.1, “ Building Live key”