funktoo

Gentoo on a USBstick

An easy way to build your own Gentoo System on a USBstick to use as a kind of LiveCD alternative. Has some advantages over the original LiveCDs.
- it is faster
- it is quieter
- you can save your configuration or your configuration files

I used a 1GB USBstick and that's probably the size you need because I emerged X, Firefox and XFCE. Perhaps it's not the most elegant way to create a Live environment but it's ok to use. The installation has the size of about 767MB.

First of all create a directory somewhere, download a stage3 and a portage snapshot from Funtoo. Extract the stage3 tarball in the directory created before and the portage snapshot in /usr.

Now chroot into that directory and start to configure your files and emerge the packages you wish to have on your USBstick. I used nearly the same configuration as I have on my PC because I just want to use the USBstick at home and not on other machines.
- set USE flags, I decided for instance to use "minimal"
- edited make.conf,conf.d/"files", network configuration, locales etc.
- made an emerge -e system
- compile the kernel (I used genkernel and a bootsplash)
- emerged X, XFCE4, grub, dhcp, gentoolkit etc.
- prepare grub.conf and create a device.map file with (hd0) /dev/sda

After that I prepared the USBstick with an ext2 filesystem on it. Mount the USBstick and copy the files of the directory to the stick.

Don't copy /usr/src, /usr/portage, /var/db and /var/cache to the stick to save some space.

Unmount the stick.

Run grub as root to install it on the stick. You have to find out how grub recognizes the stick and be a bit careful not to ruin your PC's grub configuration.

type: find 'path to your kernel on the stick or initrd'

For me it was (hd2,0) so I typed:
root (hd2,0) and then
setup (hd2)

Now you're ready to test your USBstick!