This HOWTO explains how to create a
Although the instructions found in this document aim at emulating a Gentoo Linux Installation CD using an 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 FAT32 partition on your USB flash drive and mark it bootable using
# fdisk -l /dev/sda Disk /dev/sda: 1048 MB, 1048313856 bytes 33 heads, 61 sectors/track, 1017 cylinders Units = cylinders of 2013 * 512 = 1030656 bytes Device Boot Start End Blocks Id System /dev/sda1 * 1 1017 1023580 b W95 FAT32
Create a FAT32 filesystem on the USB flash drive using
(Make sure you have sys-fs/dosfstools installed) # emerge -av sys-fs/dosfstools # mkdosfs -F 32 /dev/sda1 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/lib/syslinux/mbr.bin of=/dev/sda 0+1 records in 0+1 records out
Download the
(Create the /mnt/cdrom/ mount point if needed) # mkdir -p /mnt/cdrom # mount -o loop,ro -t iso9660 install-x86-minimal-2006.0.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/sda1 /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 dobladecenter:" \
-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/sda1
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