Gentoo Linux 1.4 Quick & Easy
Installation
Instructions
The 2-CD installation set is available on our mirrors. To
see what 2-CD set is right for you, read the detailed descriptions of
each product in the store. CD1
is a full bootable Gentoo Linux environment that can be used to install
the full Gentoo Linux on your machine. CD 1
contains everything you need to install Gentoo Linux quickly and
without a connection to the Internet. Several
pre-compiled packages are also included on CD 1, such as the XFree86 X
server. CD2 is optional and isn't bootable. It has pre-compiled
packages such as KDE, GNOME, OpenOffice,
Mozilla, Evolution and more.
(Start by booting your Live CD1. You should see a fancy boot screen with the Gentoo Linux logo on it.) (Hit <ENTER>. You would include dopcmcia or doataraid here. Hit F2-F3 if you have a RAID or PCMCIA laptop setup.) (You will now see an even fancier boot screen.) (Next you will see the root ("#") prompt on the console.) (Here we go.)
# date (To check if you date is correct.) # date 022709042003 (If date is wrong, set it with date MMDDhhmmCCYY )
(Optional, now is the time to load any network or scsi drivers using modprobe.) # modprobe aic7xxx (replace aic7xxx with your module)
(Check for network connectivity) # ping -c 3 www.yahoo.com
(If it didn't work you can use this utility, or visit the Optional Networking section of the full install guide.) # net-setup eth0 or # dhcpcd eth0
(Disk Paritioning) (Here was assume you know the basics about drive paritioning. If not, see the full install Disk Partitioning guide.) (Use fdisk, cfdisk, parted or partimage to partition your drive now. I recommend a 64 meg boot volume with ext3, a swap partition twice the size of your available RAM (2 Gig limit), and the rest for your root partition using ReiserFS.)
|
Important: Note that you should not
save or make
any changes to a disk's
partition table if any of its partitions contain filesystems that are
in use or
contain important data. Doing so will generally cause data on the disk
to be
lost.
|
(Initializing your partitions) (NOTE: Substitute in your proper parition numbers) # mkswap /dev/hdax (for making swap filesystems) # mke2fs /dev/hdax (for making ext2 filesystems) # mke2fs -j /dev/hdax (for making ext3 filesystems) # mkreiserfs /dev/hdax (for making reiserfs filesystems) # mkfs.xfs /dev/hdax (for making xfs filesystems) # mkfs.jfs /dev/hdax (for making jfs filesystems)
(Mount the partitions) # swapon /dev/hdax (substitute your swap partition here) # mount /dev/hdax /mnt/gentoo (substitute your root partition here) # mkdir /mnt/gentoo/boot # mount /dev/hdax /mnt/gentoo/boot (substitute your boot partition here)(mount with -o notail if reiserfs here)
(Unpacking files) # ls /mnt/cdrom/stages/ (to see what is available on your CD) # cd /mnt/gentoo
# tar -xvjpf /mnt/cdrom/stages/stage3-*.tar.bz2 (Change to the stage # you are using.)
(Copying packages off of CD1 that we will use later) # tar -xvjf /mnt/cdrom/snapshots/portage-yyyymmdd.tar.bz2 -C /mnt/gentoo/usr (Replace yyyymmdd with the actual filename.) # cp -R /mnt/cdrom/distfiles /mnt/gentoo/usr/portage/distfiles # cp -a /mnt/cdrom/packages /mnt/gentoo/usr/portage/packages
(Using mirrorselect) (Optional, can be skipped. Default config should work fine) # mirrorselect -a -s4 -o >> /mnt/gentoo/etc/make.conf (To select a mirror automatically) # mirrorselect -i -o >> /mnt/gentoo/etc/make.conf (To select a mirror interactively)
(Entering the chroot environment) # mount -t proc proc /mnt/gentoo/proc # cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf # chroot /mnt/gentoo /bin/bash # env-update # source /etc/profile
(Updating using sync) (Optional, can be skipped. Checks for updates on the files we already copied.) # emerge sync
(Stage 1 install only) (We highly recommend Stage 1 and 2 installs use the Full Instructions from the full install guide.) # nano -w /etc/make.conf # cd /usr/portage # scripts/bootstrap.sh (Bootstrapping, take long time.)
(Now Stage 2 only, stage 1 continued) # emerge system (Take long time.)
(Note: Advanced users: To bring your system inline with the latest updates and fixes.) # cp /etc/make.conf /etc/make.conf.backup (Backup your make.conf first) # CONFIG_PROTECT="-*" emerge -u system (This says its okay to overwrite files) # cp /etc/make.conf.backup /etc/make.conf (Restore the make.conf)
(Time zone configuration) (Look for your time zone in /usr/share/zoneinfo and then use that for the following command.) # ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime
(Setup your /etc/fstab) #nano -w /etc/fstab
|
# example /etc/fstab: static file system information. # noatime turns off atimes for increased performance (atimes normally aren't # needed; notail increases performance of ReiserFS (at the expense of storage # efficiency). It's safe to drop the noatime options if you want and to # switch between notail and tail freely. # <fs> <mountpoint> <type> <opts> <dump/pass> # NOTE: Be sure to set the block devices and the filesystem types correctly. # NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. /dev/hdax /boot ext3 noauto,noatime 1 2 /dev/hdax / reiserfs noatime 0 1 /dev/hdax none swap sw 0 0 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro,user 0 0 # NOTE: The next line is critical for boot! none /proc proc defaults 0 0 # glibc 2.2 and above expects tmpfs to be mounted at /dev/shm for none /dev/shm tmpfs defaults 0 0
#Example windows configs /dev/hdax /mnt/dosc ntfs ro,noatime,umask=0222 0 0 /dev/hdax /mnt/dosd vfat noatime 0 0
|
(Configuring your kernel using genkernel) (NOTE: Gentoo provides several kernel ebuilds; a list can be found here. We advise using gentoo-sources.) # emerge -k sys-kernel/gentoo-sources # emerge -k genkernel # genkernel ( Write down the names of the kernel and initrd that are given to you after its done. You will need it later.)
(OR manual kernel configuration) (since a manual kernel build has many more details, please see the Kernel Section of the full install guide.) # cd /usr/src/linux # make menuconfig ( A few things required for Gentoo are - Virtual memory file system support, /proc file system support, /dev file system support * /dev file system Automatically mount at boot. ) # make dep && make clean bzImage modules modules_install # cp /usr/src/linux/arch/i386/boot/bzImage /boot
(Finishing system install) # emerge -k app-admin/sysklogd (This is your System Logger. You can also use syslog-ng, metalog, or msyslog. See Full instructions.) # rc-update add sysklogd default (rc-update makes it load at boot) # emerge -k sys-apps/vcron (This is your CRON Daemon. You can also use dcron or fcron if you like. See Full instructions.) # rc-update add vcron default # emerge -k hotplug (This detects any hardware that initrd does not detect) # rc-update add hotplug default
# emerge -k reiserfsprogs (do this if you are going to use reiserfs.) # emerge -k xfsprogs (do this if you are using xfs) # emerge -k jfsutils (do this if you are going to use jfs.) # emerge -k lvm-user (do this if you are going to use lvm)
(Emerge ebuilds for any additional hardware that is on your system. Here is a list of kernel-related ebuilds that you could emerge:)
# emerge -k nvidia-kernel (Accelerated NVIDIA graphics for XFree86) # emerge nforce-net (On-board ethernet controller on NVIDIA NForce(2) motherboards) # emerge nforce-audio (On-board audio on NVIDIA NForce(2) motherboards) # emerge -k sys-apps/pcmcia-cs (This is for laptop users who need PCMCIA.) # emerge -K rp-pppoe (For PPPoE, but you still have to do adsl-setup after you boot your system the first time.) # emerge e100 (Intel e100 Fast Ethernet Adapters) # emerge e1000 (Intel e1000 Gigabit Ethernet Adapters) # emerge emu10k1 (Creative Sound Blaster Live!/Audigy support) # emerge ati-drivers (Accelerated ATI Radeon 8500+/FireGL graphics for XFree86) # VIDEO_CARDS="yourcard" emerge xfree-drm (Accelerated graphics for ATI Radeon up to 9200, Rage128, Matrox, Voodoo and other cards)
(Add the names of any modules you need to load after boot to /etc/modules.autoload.d/kernel-2.4 file) # nano -w /etc/modules.autoload.d/kernel-2.4 (Only needed if you had to modprobe earlier.)
(User Management) # passwd (Set the root password.) # useradd your_user -m -G users,wheel,audio -s /bin/bash (Now create your own user.) # passwd your_user (& set the password.)
# echo mymachine > /etc/hostname (substitute your hostname) # echo mydomain.com > /etc/dnsdomainname (substitute your domainname, or skip) # nano -w /etc/hosts (Add your actual hostname to /etc/hosts so GNOME doesn't complain) # nano -w /etc/conf.d/net (Don't skip this DHCP usersppen at boot.) # rc-update add net.eth0 default (Only for non-PCMCIA network cards.)
(Optional, use this code for adding additional network adapters) # ln -s /etc/init.d/net.eth0 /etc/init.d/net.ethx # rc-update add net.ethx default (Only for non-PCMCIA network cards.)
(Optional for laptops, have a quick look into /etc/init.d/pcmcia to verify that things seem all right.) # rc-update add pcmcia boot (This takes care of any PCMCIA cards and network starting for PCMCIA network cards.)
(Basic configuration) # nano -w /etc/rc.conf (Follow the directions in this file to configure basic settings.)
(Install your GRUB bootloader) (Use the Boot Loader section of the full install guide if you would like LILO.) (NOTE: GRUB counts hard drives from zero rather than "a" and partitions start at zero rather than one. Only hard drives are counted, not atapi-ide devices. So the syntax is first integer indicates the drive number, while the second integer indicates the partition number. Once again, please note that the partition numbers are counted from zero, not from one. Your Linux partition /dev/hda1 is called (hd0,0) under GRUB. Grub also has TAB completion)
# emerge -k grub # grub
(Install the GRUB boot record on to your hard drive's MBR (master boot record)) grub> root (hd0,0) (Tells GRUB the location of your boot boot partition. /dev/hda1 is used here) grub> setup (hd0) (Install grub onto your MBR) grub> quit
(for ATA RAID setups, you also need this commmand) grub> setup --stage2=/boot/grub/stage2 (hd0)
(Create the grub.conf file) # nano -w /boot/grub/grub.conf
|
# example grub.conf # (Here is where you use the output from genkernel that you wrote down earlier. # Sustitute it where is says KV. Also, (hd0,0) should point to your boot partition # which is /dev/hda1 in our example and /dev/hda3 should point to your root filesystem. # (hd0,5) contains the NT bootloader for windows users. # NOTE: The path to the kernel image is relative to the boot partition.
default 0 timeout 30 fallback 1 splashimage=(hd0,0)/grub/splash.xpm.gz
title=My example Gentoo Linux (genkernel) root (hd0,0) kernel (hd0,0)/kernel-KV root=/dev/hda3 initrd (hd0,0)/initrd-KV
# Below needed only for people who dual-boot
title=Windows XP
root (hd0,5)
chainloader (hd0,5)+1
# Below is an example for RAID setups title=Gentoo Linux on RAID root (hd0,0) kernel (hd0,0)/boot/bzImage root=/dev/ataraid/dXpY
|
# etc-update # exit # cd / # umount /mnt/gentoo/boot # umount /mnt/gentoo/proc # umount /mnt/gentoo # reboot (Don't forget to remove the bootable CD)
(Wait for system to come back up) (Optional, Load binary packages from CD2) # mount /dev/cdrom /mnt/cdrom # cp -a /mnt/cdrom/packages/* /usr/portage/packages/
# emerge -k xfree (XFree was copied off of CD1 earlier if you were wondering) # emerge -k kde or # emerge -k gnome
# /usr/X11R6/bin/xf86config (It is now recommend that you go onto the Desktop Configuration guide for additional info.)
|
Now go onto the Desktop configuration
guide that will help you to continue configuring your new Gentoo
Linux system.
Check out the Portage
user guide
to help familiarize you with Portage basics.
For more information on starting programs and daemons at startup, see
the rc-script guide.
If you have any other questions involving installation or anything for
that matter, please check the Gentoo Linux FAQ.
You can find the rest of the Gentoo Documentation here.
|