Gentoo Wiki


This article is part of the HOWTO series.
Installation Kernel & Hardware Networks Portage Software System X Server Gaming Non-x86 Emulators Misc



Many people have asked how to install Gentoo on a system without a CDROM drive. This HOWTO will describe what you need to complete this.


You need a means to boot your system. There are various methods of booting your system. For example; PXE, floppy, usbstick, zip drive, alternate hard drive, etc. But for the scope of this document we will use the most common; a boot floppy. I personally like RIP, but you could use just about any boot floppy. Your boot floppy will need:

  • The ability to access your harddrive(s). In other words, you will need the required drivers such as SCSI drivers, etc.
  • A means to get files onto the computer. Basically, you need network or internet access.
  • The following tools: fdisk,mk*fs,mount,tar,chroot, and a tool to transfer files to the computer like wget. (* is whatever filesystem you intend to use)
  • A sufficiently recent kernel, or `chroot /mnt/gentoo /bin/bash' will fail. (For example the 2.4 kernel used in Damn Small Linux won't allow the chroot to work for Gentoo 2006.1)
  • A kernel that can use a swap partition (look for a `swapon' command).

BG-Rescue Linux is a 2-floppy Linux distribution that seems adequate for CD-less installation work. BG-Rescue Linux runs in RAM so the floppy drive can be used to transfer (smallish) files between the outside world and the installation environment.

Note: In newer Gentoo versions you may run into trouble with BG-Rescue Linux as they need a 2.6 based kernel. ARLinux seems to be similar to BG-Rescue Linux and features a 2.6 kernel.

Red Hat Linux 6.2 is an old distribution that is not entirely sufficient (no `swapon' command, kernel probably too old for `chroot /mnt/gentoo /bin/bash'). However, the 1-floppy boot disk seems to boot successfully on a wide range of oldish hardware. Type `linux rescue' at the initial boot prompt. Among the boot choices will be NFS server, FTP server and HTTP server. The NFS alternative is useful. Start by downloading the Red Hat 6.2 ISO image to a nearby machine, loop-mount the .iso file and export the file tree so that the rescue floppy can boot from it. Once the rescue environment is up further NFS mounts can be done, thereby allowing download of files to the installation environment. Careful planning is needed: Use the Red Hat environment to load stage tarballs, portage snapshots, extra distfiles and such to the hard disk, then switch to e. g. BG-Rescue for the chroot work (such a strategy may work if BG-Rescue alone does not provide network connectivity).

Later versions of Red Hat Linux may work as well, but more RAM is needed. A 40 MB RAM machine seems to support the Red Hat Linux 6.2 rescue environment but fails to boot in the same way with Red Hat Linux 7.3.


You can use PXE booting with Knoppix easily if you have two machines. One will act as a server and needs to boot off the Knoppix CD. It will automatically self configure to allow your target machine to PXE boot Knoppix off it.

If you don't have a second machine, you can turn System Rescue CD into something PXE bootable (instructions). As a bonus it comes with various diagnostic utilities such as memory testers, hardware inventory, partition table editors, boot managers, NT password recovery etc. It is based on a recent version of Gentoo under the hood.


Boot your system into GNU/Linux, most of the time this should be a simple task. Once you have a command line, you can continue to the next step.

Prepare your harddrive

Partition your harddrive(s) with fdisk, and format them with mkfs*(Ex. mkswap,mke2fs,mkreiserfs). For more information, see chapter 4 of the Gentoo Handbook.

Transfer the required files to the system

This is the tricky part, you need to get files needed to install Gentoo onto the target system. The most common method will be over the network. These are the required files you will need, you can get them from a Gentoo Mirror:

Note: Stage1 installs are no longer supported in the handbook.


Get your network/internet connection working, chapter 3 may be of help. If you don't have an internet connection, you will need another computer that can serve files to the target system, via http,ftp,sftp,nfs,etc...

Once you are connected, you need to download the files onto the target computer. I suggest using wget or something similar. To get the stage tarball from the internet a command similar to "wget<date>.tar.bz2"

Other Methods

There are many ways to accomplish this task. Feel free to add them in this section. I could even imagine using floppies and the split tool, however time consuming that may be.

Boot from a Windows Partition

On a windows only machine, you may consider installing Grub for DOS, then extract the kernel image from a LiveCD, put it on a vfat partition, and boot from there: The Original Post at the Gentoo Forum

Follow the Handbook

You can basically pick up from here with chapter 5 of the Gentoo Handbook.

Alternate Method

There is another way that may be simpler. For this to work, you will need another system with GNU/Linux on it. Remove the harddrive from the system you want to put Gentoo onto, then connect the harddrive to the system with GNU/Linux on it.

Then you can follow the Handbook.

One caveat that you may want to consider is that the binaries you build for the new system should be able to run on both the target and host system. Remember this when setting your CFLAGS in make.conf.


This also requires two computers, you can run a tftp server on one computer with the initrd and kernel, while using grub (booted from a floppy drive) to do a network boot.

The best link to learn how to setup netboot,pxe etc. is

You can learn a lot from different parts of the LTSP guide on how to do this:

LTSP Client

LTSP Server

You can get a 'quick' LTSP Server by booting from the Ubuntu Alternate CD. Select 'install an LTSP server' from the CD boot menu.

To then boot the computer you are installing Gentoo to requires either a BIOS that supports network booting or an etherboot floppy. For the later find your network cards chipset in the NIC Database and download the Floppy Bootable Rom Image. Block copy this image to good floppy disk and boot your target machine from this floppy.

Useful commands for the above

lspci | grep Ethernet to find out your network card chipset

cat eb-5.4.3-yournic.zdsk > /dev/fd0 to copy the downloaded image to floppy

If successful etherboot will first correctly identify your network cards chipset, then poll for an IP address from the DHCP server running as part of the LTSP installation.

Knoppix includes a terminal server that requires minimum GUI setup, no need to setup tftp and dhcp servers as it is done automatically. This can be used to boot any machine that supports PXE boot to linux. Installation using Knoppix is nearly identical to installation from the Gentoo LiveCD. Some consider Knoppix to be even better for the task of installing linux than any other distro-specific livecd.

Retrieved from ""

Last modified: Tue, 06 May 2008 14:25:00 +0000 Hits: 42,252