377Chapter 13Running Gentoo Linuxas /dev/hdaor (Web site traffic) /dev/sdafor your first
377Chapter 13Running Gentoo Linuxas /dev/hdaor /dev/sdafor your first IDE or SCSI hard disk, respectively). Then type hto display a list of commands. (See Chapter 7 for information aboutusing fdiskto partition your hard disk.) Repartitioning your disk will destroy existing data on your hard disk. Back up anydata you value before starting this procedure. Be sure not to delete or change anypartitions that have data on them that you want to keep. # fdisk /dev/hda8.Make file systems. To create the appropriate file systems on your disk parti- tions, use the mk2fsand mkswapcommands. For example, with an IDE harddrive that has the first partition as the boot partition (/dev/hda1), the secondas swap (/dev/hda2), and the third as the root (/) partition (/dev/hda3), you could type the following: # mke2fs /dev/hda1# mkswap /dev/hda2# mkreiserfs /dev/hda39.Turn on swap.Use the swaponcommand to turn on your swap partition. Forour example (with hda2 being the swap partition), you would type: # swapon /dev/hda210.Mount root (/) partition.You need to mount the root (/) partition temporarilyto begin installing Gentoo to it. In this example (with the root file system on/dev/hda3), you would type: # mount /dev/hda3 /mnt/gentoo11.Mount the /boot partition.Next, mount the boot partition to install to it: # mkdir /mnt/gentoo/boot# mount /dev/hda1 /mnt/gentoo/boot12.Get the stage1 tarball. Assuming that you have the minimal Gentoo installationCD, you need to download the stage1 tarball. Find a mirror site near where youare (as described earlier). Then make a directory on your hard disk to copy itto and download the tarball using a tool such as wget. Here is an example: If you are using the universal CD, the stage1 tarball is available there. Instead ofdownloading it, jump to the next step and extract the tarball from /mnt/cdrom/ stages/stage1*.tar.bz2. # mkdir /mnt/gentoo/tmp2# cd /mnt/gentoo/tmp2# wget -c http://gentoo.osuosl.org/releases/x86/2004.2/ stages/x86/stage1-x86-2004.2.tar.bz2The wgetcommand, which appears on two lines here, should all be typed on oneline. (There s no space between the slash at the end of the first line and the word stages at the beginning of the next.) If the download should stop in the middle, you can restart it by running the same command again in the same directory. NoteNoteCaution20_