| 1 |
<?xml version='1.0' encoding="UTF-8"?> |
| 2 |
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/gentoo-x86-quickinstall.xml,v 1.27 2005/01/22 20:14:48 swift Exp $ --> |
| 3 |
|
| 4 |
<!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> |
| 5 |
|
| 6 |
<guide link="/doc/en/gentoo-x86-quickinstall.xml"> |
| 7 |
<title>Gentoo Linux Install Reference</title> |
| 8 |
<author title="Author">Steven Wagner</author> |
| 9 |
<author title="Editor"> |
| 10 |
<mail link="swift@gentoo.org">Sven Vermeulen</mail> |
| 11 |
</author> |
| 12 |
|
| 13 |
<abstract> |
| 14 |
The Quick install reference covers all details of the install process in a |
| 15 |
non-verbose manner. Users should already have prior experience with |
| 16 |
installing Gentoo Linux if they want to follow this guide. |
| 17 |
</abstract> |
| 18 |
|
| 19 |
<license/> |
| 20 |
|
| 21 |
<version>1.23</version> |
| 22 |
<date>2005-01-22</date> |
| 23 |
|
| 24 |
<chapter> |
| 25 |
<title>Quick Install Reference</title> |
| 26 |
<section> |
| 27 |
<body> |
| 28 |
|
| 29 |
<p> |
| 30 |
The installation ISOs are on the <uri link= |
| 31 |
"http://www.gentoo.org/main/en/mirrors.xml">Gentoo |
| 32 |
Mirrors</uri>. Detailed descriptions of the different CDs are |
| 33 |
available in the <uri link="http://store.gentoo.org">Gentoo |
| 34 |
Store</uri>. A universal CD contains everything you need to install Gentoo Linux |
| 35 |
quickly and without a connection to the Internet. A Package CD is optional and |
| 36 |
contains pre-compiled packages such as KDE, GNOME, OpenOffice, |
| 37 |
Mozilla, Evolution and more. |
| 38 |
</p> |
| 39 |
|
| 40 |
<p> |
| 41 |
Boot from the Universal CD. Press <F1> and/or <F2> to |
| 42 |
see what boot options are available. Press <ENTER> at the bootscreen to |
| 43 |
continue with the default kernel. You'll eventually receive a prompt. |
| 44 |
</p> |
| 45 |
|
| 46 |
<pre caption="Beginning settings"> |
| 47 |
# <i>date</i> (Make sure your time and date is correct. If wrong, set it with <i>date MMDDhhmmCCYY</i> ) |
| 48 |
# <i>modprobe module_name</i> (Optional - Load any necessary modules) |
| 49 |
# <i>net-setup eth0</i> (Configure the network) |
| 50 |
# <i>fdisk /dev/hda</i> (Partition your drive) |
| 51 |
</pre> |
| 52 |
|
| 53 |
<p> |
| 54 |
The recommended setup is a 64 meg boot volume with ext2, a swap partition |
| 55 |
twice the size of your available RAM, and the rest for your root partition |
| 56 |
using ReiserFS. |
| 57 |
</p> |
| 58 |
|
| 59 |
<p> |
| 60 |
Initialise your partitions using <c>mke2fs</c> (Ext2), <c>mke2fs |
| 61 |
-j</c> (Ext3), <c>mkreiserfs</c> (ReiserFS), <c>mkfs.xfs</c> (XFS), |
| 62 |
<c>mkfs.jfs</c> (JFS) and <c>mkswap</c> (swap partition). For instance: |
| 63 |
<c>mke2fs -j /dev/hda3</c>. |
| 64 |
</p> |
| 65 |
|
| 66 |
<p> |
| 67 |
Continue by mounting the partitions and extracting the appropriate stage |
| 68 |
file. |
| 69 |
</p> |
| 70 |
|
| 71 |
<pre caption="Preparing the Installation"> |
| 72 |
(Activate the swap partition) # <i>swapon /dev/hdax</i> |
| 73 |
(Mount the root partition) # <i>mount /dev/hdax /mnt/gentoo</i> |
| 74 |
(Create the boot mountpoint) # <i>mkdir /mnt/gentoo/boot</i> |
| 75 |
(Mount the boot partition) # <i>mount /dev/hdax /mnt/gentoo/boot</i> |
| 76 |
(Go to the mountpoint) # <i>cd /mnt/gentoo</i> |
| 77 |
(Extract a stage tarball...) # <i>tar -xvjpf /mnt/cdrom/stages/stage<your stage>.tar.bz2</i> |
| 78 |
(<comment>or</comment> download the latest tarball...) |
| 79 |
# <i>links http://www.gentoo.org/main/en/mirrors.xml</i> |
| 80 |
( ... and extract) # <i>tar -xvjpf stage<your stage>.tar.bz2</i> |
| 81 |
(Optional: unpack a portage tree)# <i>tar -xvjf /mnt/cdrom/snapshots/portage-*.tar.bz2 \ |
| 82 |
-C /mnt/gentoo/usr</i> |
| 83 |
(Optional: copy over distfiles) # <i>cd /mnt/gentoo/usr/portage; mkdir distfiles;</i> |
| 84 |
# <i>cp /mnt/cdrom/distfiles/* distfiles/</i> |
| 85 |
(Select a mirror) # <i>mirrorselect -a -s4 -o | grep 'GENTOO_MIRRORS=' \ |
| 86 |
>> /mnt/gentoo/etc/make.conf</i> |
| 87 |
(Copy over nameserver information) |
| 88 |
# <i>cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</i> |
| 89 |
(Mount the proc filesystem) # <i>mount -t proc none /mnt/gentoo/proc</i> |
| 90 |
(Chroot into the new environment)# <i>chroot /mnt/gentoo /bin/bash</i> |
| 91 |
(Load the necessary variables) # <i>env-update; source /etc/profile</i> |
| 92 |
(Network-only, non-GRP: update Portage) |
| 93 |
# <i>emerge --sync</i> |
| 94 |
</pre> |
| 95 |
|
| 96 |
<p> |
| 97 |
Now we install Gentoo: |
| 98 |
</p> |
| 99 |
|
| 100 |
<pre caption = "Installing Gentoo"> |
| 101 |
(Change USE, CFLAGS and CXXFLAGS. Stage1 can also change CHOST) |
| 102 |
# <i>nano -w /etc/make.conf</i> |
| 103 |
(Stage1 only: bootstrap system) # <i>cd /usr/portage; scripts/bootstrap.sh</i> |
| 104 |
(Stage1, Stage2 only: install base system) |
| 105 |
# <i>emerge system</i> |
| 106 |
</pre> |
| 107 |
|
| 108 |
<p> |
| 109 |
Next we set up the necessary information: |
| 110 |
</p> |
| 111 |
|
| 112 |
<pre caption = "Setting up Configuration Files"> |
| 113 |
(Set timezone information) # <i>ln -sf /usr/share/zoneinfo/<comment><path to time zone file></comment> /etc/localtime</i> |
| 114 |
(Edit fstab file) # <i>nano -w /etc/fstab</i> |
| 115 |
</pre> |
| 116 |
|
| 117 |
<p> |
| 118 |
Use the following as a <e>template</e> (don't copy verbatim) for |
| 119 |
<path>/etc/fstab</path>: |
| 120 |
</p> |
| 121 |
|
| 122 |
<pre caption="/etc/fstab"> |
| 123 |
# <fs> <mountpoint> <type> <opts> <dump/pass> |
| 124 |
/dev/hdax /boot ext2 defaults,noatime 1 2 |
| 125 |
/dev/hdax none swap sw 0 0 |
| 126 |
/dev/hdax / reiserfs noatime 0 1 |
| 127 |
/dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0 |
| 128 |
none /proc proc defaults 0 0 |
| 129 |
none /dev/shm tmpfs nodev,nosuid,noexec 0 0 |
| 130 |
</pre> |
| 131 |
|
| 132 |
<p> |
| 133 |
Continue by installing the Linux kernel: |
| 134 |
</p> |
| 135 |
|
| 136 |
<pre caption="Installing the Kernel"> |
| 137 |
(Install the kernel sources) # <i>emerge <comment><kernel-package-here></comment></i> |
| 138 |
(Configure your kernel using genkernel...) |
| 139 |
# <i>emerge genkernel; genkernel --menuconfig all</i> |
| 140 |
(<comment>or</comment> (1) manually build your kernel) |
| 141 |
# <i>cd /usr/src/linux; make menuconfig;</i> |
| 142 |
( (2) Include VM fs, /proc fs, /dev fs, /dev fs auto mount at boot) |
| 143 |
( (3) Compile your kernel) |
| 144 |
(for a 2.4 kernel) # <i>make dep && make clean bzImage modules modules_install</i> |
| 145 |
(for a 2.6 kernel) # <i>make && make modules_install</i> |
| 146 |
( (4) Copy over the kernel) # <i>cp arch/i386/boot/bzImage /boot; cp System.map /boot</i> |
| 147 |
</pre> |
| 148 |
|
| 149 |
<p> |
| 150 |
Now install other tools you might want: |
| 151 |
</p> |
| 152 |
|
| 153 |
<pre caption = "Install important system tools"> |
| 154 |
(Install system logger; choice: sysklogd, metalog, msyslog, syslog-ng) |
| 155 |
# <i>emerge syslog-ng </i> |
| 156 |
(Have the systemlogger automatically started at boot) |
| 157 |
# <i>rc-update add syslog-ng default</i> |
| 158 |
(Install cron daemon; choice: vixie-cron, dcron, fcron) |
| 159 |
# <i>emerge vixie-cron</i> |
| 160 |
(Have the cron daemon automatically started at boot) |
| 161 |
# <i>rc-update add vixie-cron default</i> |
| 162 |
(genkernel users only: install hotplug) # <i>emerge hotplug</i> |
| 163 |
(genkernel users only: have hotplug automatically started at boot) |
| 164 |
# <i>rc-update add hotplug default</i> |
| 165 |
(Non-ext2,ext3 users only; choice: reiserfsprogs, xfsprogs, jfsutils) |
| 166 |
# <i>emerge reiserfsprogs</i> |
| 167 |
(Optional: install DHCP client) # <i>emerge dhcpcd</i> |
| 168 |
(Domain name init script) # <i>rc-update add domainname default</i> |
| 169 |
</pre> |
| 170 |
|
| 171 |
<p> |
| 172 |
If you need specialised kernel ebuilds, now is a good time to install them: |
| 173 |
</p> |
| 174 |
|
| 175 |
<pre caption = "Install Specialised Kernel Ebuilds"> |
| 176 |
# <i>emerge pcmcia-cs</i> (or <i>nforce-net</i>, <i>nforce-audio</i>, <i>e100</i>, <i>e1000</i>, <i>ati-drivers</i>, <i>rp-pppoe</i>) |
| 177 |
# <i>VIDEO_CARDS="yourcard" emerge x11-drm</i> (for ATI Radeon up to 9200, Rage128, |
| 178 |
Matrox, Voodoo and other cards) |
| 179 |
</pre> |
| 180 |
|
| 181 |
<p> |
| 182 |
Finalise the settings for your Gentoo system: |
| 183 |
</p> |
| 184 |
|
| 185 |
<pre caption = "Finalise the Configuration Settings"> |
| 186 |
(Set root password) # <i>passwd</i> |
| 187 |
(Create a user) # <i>useradd your_user -m -G users,wheel,audio -s /bin/bash</i> |
| 188 |
(Set password for that user) # <i>passwd your_user</i> |
| 189 |
(Set the system hostname) # <i>echo mymachine > /etc/hostname</i> |
| 190 |
(Set the system domainname) # <i>echo mydomain.com > /etc/dnsdomainname</i> |
| 191 |
(Set the hostsfile, ex:"127.0.0.1 localhost mymachine") |
| 192 |
# <i>nano -w /etc/hosts</i> |
| 193 |
(Configure basic system settings; follow comments) |
| 194 |
# <i>nano -w /etc/rc.conf</i> |
| 195 |
</pre> |
| 196 |
|
| 197 |
<pre caption = "Set up Networking"> |
| 198 |
(Setup networking; dhcp-users should set iface_eth0="dhcp") |
| 199 |
# <i>nano -w /etc/conf.d/net</i> |
| 200 |
(List modules to be loaded at startup) |
| 201 |
# <i>nano -w /etc/modules.autoload.d/kernel-<comment><version></comment></i> |
| 202 |
(Non-PCMCIA only: start networking automatically at boot) |
| 203 |
# <i>rc-update add net.eth0 default</i> |
| 204 |
(Only if you have multiple network interfaces:) |
| 205 |
(1) Create initscripts for each interface) |
| 206 |
# <i>ln -s /etc/init.d/net.eth0 /etc/init.d/net.ethx</i> |
| 207 |
(2) Automatically start at boot if no PCMCIA) |
| 208 |
# <i>rc-update add net.ethx default</i> |
| 209 |
(PCMCIA only: verify /etc/conf.d/pcmcia and load PCMCIA at boot) |
| 210 |
# <i>rc-update add pcmcia default</i> |
| 211 |
</pre> |
| 212 |
|
| 213 |
<p> |
| 214 |
Now install a bootloader. |
| 215 |
</p> |
| 216 |
|
| 217 |
<pre caption="Install and configure GRUB"> |
| 218 |
# <i>emerge grub</i> |
| 219 |
# <i>grub</i> |
| 220 |
grub> <i>root (hd0,0)</i> |
| 221 |
grub> <i>setup (hd0)</i> |
| 222 |
grub> <i>quit</i> |
| 223 |
# <i>nano -w /boot/grub/grub.conf</i> |
| 224 |
default 0 |
| 225 |
timeout 15 |
| 226 |
splashimage=(hd0,0)/grub/splash.xpm.gz |
| 227 |
|
| 228 |
title=Gentoo Linux |
| 229 |
root (hd0,0) |
| 230 |
<comment># genkernel users:</comment> |
| 231 |
kernel /kernel-<comment><kernel version></comment> root=/dev/ram0 init=/linuxrc real_root=/dev/hda3 ramdisk=8192 |
| 232 |
initrd /initrd-<comment><kernel version></comment> |
| 233 |
<comment># non-genkernel users:</comment> |
| 234 |
kernel /kernel-<comment><kernel version></comment> root=/dev/hda3 |
| 235 |
</pre> |
| 236 |
|
| 237 |
<pre caption="Install and configure LILO"> |
| 238 |
# <i>emerge lilo</i> |
| 239 |
# <i>nano -w /etc/lilo.conf</i> |
| 240 |
boot=/dev/hda |
| 241 |
prompt |
| 242 |
timeout=50 |
| 243 |
default=gentoo |
| 244 |
|
| 245 |
image=/boot/kernel-<comment><kernel version></comment> |
| 246 |
label=gentoo |
| 247 |
read-only |
| 248 |
<comment># genkernel users:</comment> |
| 249 |
append="init=/linuxrc real_root=/dev/hda3 ramdisk=8192" |
| 250 |
root=/dev/ram0 |
| 251 |
initrd=/boot/initrd-<comment><kernel version></comment> |
| 252 |
<comment># non-genkernel users:</comment> |
| 253 |
root=/dev/hda3 |
| 254 |
|
| 255 |
# <i>/sbin/lilo</i> |
| 256 |
</pre> |
| 257 |
|
| 258 |
<p> |
| 259 |
Now unmount all partitions and reboot into your new system: |
| 260 |
</p> |
| 261 |
|
| 262 |
<pre caption="Finishing off and installing GUI"> |
| 263 |
(Exiting the chroot) # <i>exit; cd /</i> |
| 264 |
(Unmounting partitions) # <i>umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo</i> |
| 265 |
(Reboot; Remove the universal CD from the tray) |
| 266 |
# <i>reboot</i> |
| 267 |
(After booting:) |
| 268 |
(ADSL-users only) # <i>adsl-setup</i> |
| 269 |
(GRP-users only) |
| 270 |
(1) Mount Package CD # <i>mount /dev/cdrom /mnt/cdrom</i> |
| 271 |
(2) Copy over packages # <i>mkdir /usr/portage/packages</i> |
| 272 |
# <i>cp -a /mnt/cdrom/* /usr/portage/packages/</i> |
| 273 |
(3) Install extra software# <i>USE="bindist" emerge -k xfree gnome kde mozilla openoffice-bin</i> |
| 274 |
(4) Configure your Xserver# <i>/usr/X11R6/bin/xf86config</i> |
| 275 |
</pre> |
| 276 |
|
| 277 |
<p> |
| 278 |
You can get more information from the <uri |
| 279 |
link="http://www.gentoo.org/doc/en/index.xml">Gentoo |
| 280 |
Documentation</uri>. |
| 281 |
</p> |
| 282 |
</body> |
| 283 |
</section> |
| 284 |
</chapter> |
| 285 |
</guide> |