This HOWTO explains how to create a
Although the instructions found in this document aim at emulating a Gentoo Linux LiveCD using a USB flash drive, they should work for any arbitrary block device as long as you adjust the device names accordingly.
In order to use a Gentoo Linux LiveUSB you need the following:
You will also need access to the following for creating the LiveUSB:
Create a FAT16 partition on your USB flash drive and mark it bootable using
# fdisk -l /dev/sdc Disk /dev/sdc: 2063 MB, 2063597056 bytes 255 heads, 63 sectors/track, 250 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdc1 * 1 250 2008124+ 6 FAT16
Create a FAT16 filesystem on the USB flash drive using
(Make sure you have sys-fs/dosfstools installed) # emerge -av sys-fs/dosfstools # mkdosfs -F 16 /dev/sdc1 mkdosfs 2.11 (12 Mar 2005)
Install the precompiled Master Boot Record (MBR) from
(Make sure you have sys-boot/syslinux-3.00 or later installed) # emerge -av '>sys-boot/syslinux-3' # dd if=/usr/share/syslinux/mbr.bin of=/dev/sdc 0+1 records in 0+1 records out 304 bytes (304 B) copied, 0.0162317 s, 18.7 kB/s
Download the Gentoo Weekly Minimal Install CD for your architecture from your
local Gentoo Linux
(Create the /mnt/cdrom mount point if needed) # mkdir -p /mnt/cdrom # mount -o loop,ro -t iso9660 /path/to/iso.iso /mnt/cdrom
Mount the newly formatted USB flash drive on
(Create the /mnt/usb mount point if needed) # mkdir -p /mnt/usb # mount -t vfat /dev/sdc1 /mnt/usb
Copy the files from the Gentoo Linux Installation CD to the LiveUSB. The files
need to be reordered a bit as we will be using the
# cp -r /mnt/cdrom/* /mnt/usb # mv /mnt/usb/isolinux/* /mnt/usb # mv /mnt/usb/isolinux.cfg /mnt/usb/syslinux.cfg # rm -rf /mnt/usb/isolinux*(The memtest86 kernel needs to be renamed for loading it via syslinux) # mv /mnt/usb/memtest86 /mnt/usb/memtest
You can now unmount the ISO image:
# umount /mnt/cdrom
Adjust the syslinux configuration file using
# sed -i \
-e "s:cdroot:cdroot slowusb:" \
-e "s:kernel memtest86:kernel memtest:" \
/mnt/usb/syslinux.cfg
Make sure you unmount the USB flash drive before installing the bootloader:
# umount /mnt/usb
Finally install the
# syslinux /dev/sdc1
Insert the USB flash drive and turn on the computer, making sure the BIOS is set to boot from USB. If all goes well you should be presented with a standard syslinux prompt.
You should be able to follow the generic installation instructions found in the