Gentoo Wiki


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


Base Install

  1. What is Gentoo?
  2. About
  3. Preparation
  4. Partitioning
  5. Configuring
  6. Stage Progression
  7. Kernel
  8. Bootloader
  9. Test
  10. Converting from or to a non-Gentoo distribution
  11. Troubleshooting
  12. Maintaining


Base Extras



Other Articles



Making Your Box Bootable

Although you technically could boot your system after this section, that's not the reason it's placed here. This is here because there are some programs you can't compile without compiling the kernel first - and since we're compiling the kernel, we might as well prepare the system for bootability.

NOTE: If you plan on using InitNG you'll need to:

  1. skip the following upcoming steps
${INIT_UPDATE} add splash default # && ${INIT_UPDATE} del consolefont boot
${INIT_UPDATE} add domainname default
nano -w /etc/conf.d/net && ${INIT_UPDATE} add net.eth0 default
  1. reboot at the first available opportunity (with initng)
  2. run the skipped ${INIT_UPDATE}s
  3. continue, and possibly write some of your own initng scripts (be sure to post them)


Set up your fstab according to your drive setup. This one is based on the example used throughout this tutorial.

Note: if your filenames are in utf-8, or contain non-english characters, consider the utf8, iocharset options. See man mount for details for specific filesystems.

File: /etc/fstab
# /etc/fstab:
# device			mountpoint	fs		fs_opts		dump/fsck

/dev/${DISK}1		/boot		ext2		ro,noatime	1 1
/dev/${DISK}2		/		ext3		noatime		1 2
/dev/vg0/home		/home		reiserfs	noatime,notail	1 2
/dev/vg0/opt		/opt		reiserfs	noatime,notail	1 2
/dev/vg0/tmp		/tmp		reiserfs	noatime,notail	1 2
/dev/vg0/usr		/usr		reiserfs	noatime,notail	1 2
/dev/vg0/var		/var		reiserfs	noatime,notail	1 2
#/dev/vg1/backup	/mnt/backup	reiserfs	noatime,notail	1 2
/dev/${DISK}4		none		swap		sw		0 0

none			/proc		proc		defaults	0 0
none			/dev/shm	tmpfs		defaults	0 0
#none			/dev/???	usbfs		defaults	0 0

# MEDIA # This was added post-install by DBUS on my system
#/dev/hdd		/media/cdrecorder	auto	exec,user,noauto,managed 0 0
/dev/hdc		/media/cdrom		auto	exec,user,noauto,managed 0 0
/dev/floppy/0		/media/floppy		auto	exec,user,noauto,managed 0 0


Although many distros still use LILO, grub is now the standard.

# USE="netboot" will break grub
emerge grub

You'll need to mount the boot partition and then install grub onto it in one of two ways. Then you'll need to configure grub according to your kernel.

mount /dev/${DISK}1 /boot -o remount,rw
grub-install /dev/${DISK}


Code: Install GRUB to MBR
 > root (hd0,0)
 > setup (hd0) # if you have SATA and PATA drives, then check your BIOS to be sure which is hd0, hd1, etc
 > quit

In the example above for the kernel configuration we had made fbsplash (the nice screen you get on the LiveCD) available. We'll activate it in the grub configuration.

File: /boot/grub/grub.conf
timeout 5
default 0
#fallback 1


title GNU/Linux 2005.0 (2.6.11-gentoo-r6)
root (hd0,1)
# vesafb & vesafb-tng both use video=vesafb
# append init=/sbin/initng for initng, can't use with initrd???
kernel /kernel-2.6.11-gentoo-r6 root=/dev/ram0 real_root=/dev/${DISK}2 init=/linuxrc\
	video=vesafb:mtrr,ywrap,1280x1024-24@60 splash=silent,theme:emergence
initrd /initrd-2.6.11-gentoo-r6

NOTE: You could reboot right now if you. If you do want to reboot right now, be sure to read my note on the terrible things that happen with lvm2 when you reboot, which is below in the reboot section

Don't Forget

If you want things to work the way that you want them to work - like being able to log in, There are still a few things which need carried out on the target system.

# > secret
# > secret
useradd -g users -G wheel,cron,audio,video,games,cdrom,usb ${USER}
passwd ${USER}
# > secret
# > secret
rm /etc/localtime && ln -s /usr/share/zoneinfo/${TIMEZONE} /etc/localtime
echo vuhstech > /etc/hostname && echo "	vuhstech" >> /etc/hosts
echo > /etc/dnsdomainname && ${INIT_UPDATE} add domainname default
nano -w /etc/conf.d/net && ${INIT_UPDATE} add net.eth0 default
nano -w /etc/rc.conf
nano -w /etc/conf.d/clock
emerge dhcpcd
nano -w /etc/conf.d/net
${INIT_UPDATE} add sshd default
File: /etc/rc.conf
CLOCK="UTC" # If Windows is installed in the same machine, use CLOCK="local"

07/11/2005: Start-up warns CLOCK should not be set in '/etc/rc.conf' any more but should be in '/etc/conf.d/clock'. The same line applies in the new file... choose UTC, local or whatever.

File: /etc/conf.d/net
# I want a static IP, most people will want dhcp
iface_eth0=" broadcast netmask"
Retrieved from ""

Last modified: Fri, 05 Sep 2008 22:52:00 +0000 Hits: 10,779