Gentoo Minimal-Install-USB
To create a minimal-install medium on a USB-stick out of the Gentoo minimal-install-CD.
I've used these sources:
- Gentoo LiveUSB
- Booting a gentoo install-minimal iso from USB stick
- Problem with booting "LiveUSB"
This is the ext2 version using the 2007.0 install-cd.
Make sure you pick the proper device. In my case the stick is /dev/sda1.
Format the stick with fdisk and create a Linux partion. Use the "a" option
to mark it bootable.
Should look like this:
# fdisk -l /dev/sda
Disk /dev/sda: 1030 MB, 1030750208 bytes
32 heads, 62 sectors/track, 1014 cylinders
Units = cylinders of 1984 * 512 = 1015808 bytes
Disk identifier: 0xb5cb6b43
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1014 1005857 83 Linux
Now create an ext2 file system: mke2fs /dev/sda1
Install the MBR# dd if=/usr/lib/syslinux/mbr.bin of=/dev/sda
You need syslinux to perform that. If you haven't just "emerge syslinux".
Copy the files from the install-CDIf you already have an install-CD, just copy the files from /mnt/cdrom to your /mnt/usbstick directory.
Mount the USB-stick:
# mkdir /mnt/usbstick (or your directory here)
# mount /dev/sda1 /mnt/usbstick
# cp -r /mnt/cdrom/* /mnt/usbstick
# mv /mnt/usbstick/isolinux/* /mnt/usbstick
# mv /mnt/usbstick/isolinux.cfg /mnt/usb/syslinux.cfg
# rm -rf /mnt/usbstick/isolinux*
# mv /mnt/usbstick/memtest86 /mnt/usbstick/memtest
(rename memtest86 to memtest)
# sed -i \
-e "s:cdroot:cdroot slowusb:" \
-e "s:kernel memtest86:kernel memtest:" \
/mnt/usbstick/syslinux.cfg
# extlinux -i /dev/sda1
# mv /mnt/usbstick/syslinux.cfg /mnt/usbstick/extlinux.conf
Unmount the USB-stick and you're ready to reboot or test it with Qemu to save boot time. I also put a fresh stage3 tarball on the stick which to use when I have to go through a new installation. They are available at Funtoo.org by Daniel Robbins.