Search:  
Gentoo Wiki

Live_USB_stick

Merge-arrows.gifIt has been suggested that this article be Merged into one article with Live USB stick using GRUB.    (Discuss)

Contents

Introduction

This guide describes a lazy man's way of creating a Gentoo USB install medium from existing Gentoo install ISOs. This currently only handles x86 and AMD64 (x86_64) platforms.

Handling live data can be dangerous:

Prerequisites

Install

Preparing the stick

Nothing much to prepare, really, you can leave the fs it has, provided you can write to it from your PC and grub is able to read it later. (The USB-Stick default vfat fs is fine).

You don't even have to wipe the stick, just make sure there is enough space for the files we put on later.

Mount the stick somewhere in your Filesystem. This guide will assume /dev/sde for the stick and /mnt/usb for the mountpoint

mount /dev/sde1 /mnt/usb

Preparing the source

Note: Be sure to use a 2008 one, there have been issues with "boot medium not found" errors with the kernels used on the 2007 disks.

mount your CD or iso (don't forget to use -o loop if mounting an iso file)

# mount /dev/cdrom /mnt/cdrom
-- or in case of an iso:
# mount -o loop /path/to/install-x86-minimal-2008.0.iso /mnt/cdrom

Copy the data to the stick

copy all the files recursively from the CD or ISO to your USB Stick.

cp -rv /mnt/cdrom/* /mnt/usb

now mount your /boot partition (if you are running this on a gentoo PC and followed the installation guide you almost certainly have one) and copy the grub stages to the stick's boot/ directory

mount /boot
cp /boot/grub/stage* /mnt/usb/boot/grub
Warning: make sure both grub directories exist, especially if you didn't use a 2008.0 bootcd

Now you can safely umount your CD/ISO and the stick

umount /mnt/cdrom /mnt/usb

Install GRUB

Now you only need to install grub on the stick, and you're done!

Warning: You need to make sure the stick is really hd6, usually (but not always) it will be the last one in the grub list.

You can find out which number your USB should be by tabbing after you type the root (hd part, usually it's the last number if you plugged it in after your PC booted completely.

# grub --no-floppy
> root (hd6,0)
> setup (hd6)
> quit
Warning: don't unplug your stick before it has finished writing!

See also

Retrieved from "http://www.gentoo-wiki.info/Live_USB_stick"

Last modified: Thu, 02 Oct 2008 11:17:00 +0000 Hits: 1,975