* [gentoo-doc-cvs] cvs commit: hb-install-about.xml hb-install-x86+amd64-bootloader.xml hb-install-x86+amd64-disk.xml hb-install-x86+amd64-kernel.xml hb-install-x86+amd64-medium.xml
@ 2006-08-13 8:43 Josh Saddler
0 siblings, 0 replies; only message in thread
From: Josh Saddler @ 2006-08-13 8:43 UTC (permalink / raw
To: gentoo-doc-cvs
nightmorph 06/08/13 08:43:00
Added: hb-install-about.xml
hb-install-x86+amd64-bootloader.xml
hb-install-x86+amd64-disk.xml
hb-install-x86+amd64-kernel.xml
hb-install-x86+amd64-medium.xml
Log:
Added some x86/amd64 files to the networked /draft/ dir in prep for the release, updated too
Revision Changes Path
1.29 xml/htdocs/doc/en/handbook/draft/hb-install-about.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-about.xml?rev=1.29&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-about.xml?rev=1.29&content-type=text/plain
diff : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-about.xml?r1=1.28&r2=1.29
1.1 xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml?rev=1.1&content-type=text/plain
Index: hb-install-x86+amd64-bootloader.xml
===================================================================
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-bootloader.xml,v 1.1 2006/08/13 08:43:00 nightmorph Exp $ -->
<sections>
<version>3.0</version>
<date>2006-08-13</date>
<section>
<title>Making your Choice</title>
<subsection>
<title>Introduction</title>
<body>
<p>
Now that your kernel is configured and compiled and the necessary system
configuration files are filled in correctly, it is time to install a
program that will fire up your kernel when you start the system. Such a
program is called a <e>bootloader</e>.
</p>
<p test="func:keyval('arch')='x86'">
For x86, Gentoo Linux provides <uri
link="#grub">GRUB</uri> and <uri link="#lilo">LILO</uri>.
</p>
<p>
But before we install the bootloader, we inform you how to configure
framebuffer (assuming you want it of course). With framebuffer you can run the
Linux command line with (limited) graphical features (such as using the nice
bootsplash image Gentoo provides).
</p>
</body>
</subsection>
<subsection>
<title>Optional: Framebuffer</title>
<body>
<p>
<e>If</e> you have configured your kernel with framebuffer support (or you used
<c>genkernel</c> default kernel configuration), you can activate it by adding a
<c>vga</c> and/or a <c>video</c> statement to your bootloader configuration
file.
</p>
<p test="func:keyval('arch')='x86'">
First of all, you need to know what type of framebuffer device you're using. If
you use a Gentoo patched kernel tree (such as <c>gentoo-sources</c>) you will
have had the possibility of selecting <c>vesafb-tng</c> as the <e>VESA driver
type</e> (which is default for these kernel sources). If this is the case, you
are using <c>vesafb-tng</c> and <e>do not need</e> to set a <c>vga</c>
statement. Otherwise you are using the <c>vesafb</c> driver and <e>need</e> to
set the <c>vga</c> statement.
</p>
<p test="func:keyval('arch')='AMD64'">
64-bit systems must use the the <c>vesafb</c> driver, and need the <c>vga</c>
statement.
</p>
<p>
The <c>vga</c> statement controls the resolution and color depth of your
framebuffer screen for <c>vesafb</c>. As stated in
<path>/usr/src/linux/Documentation/fb/vesafb.txt</path> (which gets installed
when you install a kernel source package), you need to pass the VESA number
corresponding to the requested resolution and color depth to it.
</p>
<p>
The following table lists the available resolutions and color depths and
matches those against the value that you need to pass on to the <c>vga</c>
statement.
</p>
<table>
<tr>
<ti></ti>
<th>640x480</th>
<th>800x600</th>
<th>1024x768</th>
<th>1280x1024</th>
</tr>
<tr>
<th>256</th>
<ti>0x301</ti>
<ti>0x303</ti>
<ti>0x305</ti>
<ti>0x307</ti>
</tr>
<tr>
<th>32k</th>
<ti>0x310</ti>
<ti>0x313</ti>
<ti>0x316</ti>
<ti>0x319</ti>
</tr>
<tr>
<th>64k</th>
<ti>0x311</ti>
<ti>0x314</ti>
<ti>0x317</ti>
<ti>0x31A</ti>
</tr>
<tr>
<th>16M</th>
<ti>0x312</ti>
<ti>0x315</ti>
<ti>0x318</ti>
<ti>0x31B</ti>
</tr>
</table>
<p>
The <c>video</c> statement controls framebuffer display options. It needs to be
given the framebuffer driver (<c>vesafb</c> for 2.6 kernels, or <c>vesa</c> for
2.4 kernels) followed by the control statements you wish to enable. All
variables are listed in
<path>/usr/src/linux/Documentation/fb/vesafb.txt</path>. The most-used options
are:
</p>
<table>
<tr>
<th>Control</th>
<th>Description</th>
</tr>
<tr>
<ti>ywrap</ti>
<ti>
Assume that the graphical card can wrap around its memory (i.e. continue at
the beginning when it has approached the end)
</ti>
</tr>
<tr>
<ti>mtrr:n</ti>
<ti>
Setup MTRR registers. <c>n</c> can be:<br/>
0 - disabled<br/>
1 - uncachable<br/>
2 - write-back<br/>
3 - write-combining<br/>
4 - write-through
</ti>
</tr>
<tr test="func:keyval('arch')='x86'">
<ti><c>mode</c></ti>
<ti>
(<c>vesafb-tng</c> only)<br/>
Set up the resolution, color depth and refresh rate. For instance,
<c>1024x768-32@85</c> for a resolution of 1024x768, 32 bit color depth and a
refresh rate of 85 Hz.
</ti>
</tr>
</table>
</body>
<body test="func:keyval('arch')='AMD64'">
<p>
The result of those two statements could be something like <c>vga=0x318
video=vesafb:mtrr:3,ywrap</c>. Write this setting down; you will need it
shortly.
</p>
<p>
While LILO does work on AMD64, Gentoo only supports using GRUB. Now continue by
its <uri link="#grub">installation</uri>.
</p>
</body>
<body test="func:keyval('arch')='x86'">
<p>
The result of those two statements could be something like <c>vga=0x318
video=vesafb:mtrr:3,ywrap</c> or
<c>video=vesafb:mtrr:3,ywrap,1024x768-32@85</c>. Write this setting down; you
will need it shortly.
</p>
<p>
Now continue by installing <uri link="#grub">GRUB</uri> <e>or</e> <uri
link="#lilo">LILO</uri>.
</p>
</body>
</subsection>
</section>
<section id="grub">
<title>Default: Using GRUB</title>
<subsection>
<title>Understanding GRUB's terminology</title>
<body>
<p>
The most critical part of understanding GRUB is getting comfortable with how
GRUB refers to hard drives and partitions. Your Linux partition
<path>/dev/hda1</path> (for IDE drives) or <path>/dev/sda1</path> (for
SATA/SCSI drives) will most likely be called <path>(hd0,0)</path> under GRUB.
Notice the parentheses around the <path>hd0,0</path> - they are required.
</p>
<p>
Hard drives count from zero rather than "a" and partitions start at zero
rather than one. Be aware too that with the hd devices, only hard drives are
counted, not atapi-ide devices such as cdrom players and burners. Also, the
same construct is used with SCSI drives. (Normally they get higher numbers
than IDE drives except when the BIOS is configured to boot from SCSI devices.)
When you ask the BIOS to boot from a different hard disk (for instance your
primary slave), <e>that</e> harddisk is seen as <path>hd0</path>.
</p>
<p>
Assuming you have a hard drive on <path>/dev/hda</path>, a cdrom player on
<path>/dev/hdb</path>, a burner on <path>/dev/hdc</path>, a second hard drive
on <path>/dev/hdd</path> and no SCSI hard drive, <path>/dev/hdd7</path> gets
translated to <path>(hd1,6)</path>. It might sound tricky and tricky it is
indeed, but as we will see, GRUB offers a tab completion mechanism
that comes handy for those of you having a lot of hard drives and
partitions and who are a little lost in the GRUB numbering scheme.
</p>
<p>
Having gotten the feel for that, it is time to install GRUB.
</p>
</body>
</subsection>
<subsection>
<title>Installing GRUB</title>
<body>
<p>
To install GRUB, let's first emerge it:
</p>
<pre caption="Installing GRUB">
# <i>emerge grub</i>
</pre>
<p>
Although GRUB is now installed, we still need to write up a
configuration file for it and place GRUB in our MBR so that GRUB automatically
boots your newly created kernel. Create <path>/boot/grub/grub.conf</path> with
<c>nano</c> (or, if applicable, another editor):
</p>
<pre caption="Creating /boot/grub/grub.conf">
# <i>nano -w /boot/grub/grub.conf</i>
</pre>
<p>
Now we are going to write up a <path>grub.conf</path>. Below you'll find two
possible <path>grub.conf</path> for the partitioning example we use in this
guide. We've only extensively commented the first <path>grub.conf</path>. Make
sure you use <e>your</e> kernel image filename and, if appropriate, <e>your</e>
initrd image filename.
</p>
<ul>
<li>
The first <path>grub.conf</path> is for people who have not used
<c>genkernel</c> to build their kernel
</li>
<li>
The second <path>grub.conf</path> is for people who have used
<c>genkernel</c> to build their kernel
</li>
</ul>
<note>
If your root filesystem is JFS, you <e>must</e> add " ro" to the <c>kernel</c>
line since JFS needs to replay its log before it allows read-write mounting.
</note>
<pre caption="grub.conf for non-genkernel users">
<comment># Which listing to boot as default. 0 is the first, 1 the second etc.</comment>
default 0
<comment># How many seconds to wait before the default listing is booted.</comment>
timeout 30
<comment># Nice, fat splash-image to spice things up :)
# Comment out if you don't have a graphics card installed</comment>
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux <keyval id="kernel-version"/>
<comment># Partition where the kernel image (or operating system) is located</comment>
root (hd0,0)
kernel /boot/<keyval id="kernel-name"/> root=/dev/hda3
<comment># The next four lines are only if you dualboot with a Windows system.</comment>
<comment># In this case, Windows is hosted on /dev/hda6.</comment>
title=Windows XP
rootnoverify (hd0,5)
makeactive
chainloader +1
</pre>
<pre caption="grub.conf for genkernel users">
default 0
timeout 30
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title=Gentoo Linux <keyval id="kernel-version"/>
root (hd0,0)
kernel /boot/<keyval id="genkernel-name"/> root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev
initrd /boot/<keyval id="genkernel-initrd"/>
<comment># Only in case you want to dual-boot</comment>
title=Windows XP
rootnoverify (hd0,5)
makeactive
chainloader +1
</pre>
<note>
The <c>udev</c> mentioned at the end of the kernel line is needed to work around
a bug in some genkernel versions <e>if</e> you use udev in the first place
(which is the default behaviour).
</note>
<p>
If you used a different partitioning scheme and/or kernel image, adjust
accordingly. However, make sure that anything that follows a GRUB-device (such
as <path>(hd0,0)</path>) is relative to the mountpoint, not the root. In other
words, <path>(hd0,0)/grub/splash.xpm.gz</path> is in reality
<path>/boot/grub/splash.xpm.gz</path> since <path>(hd0,0)</path> is
<path>/boot</path>.
</p>
<p>
Besides, if you chose to use a different partitioning scheme and did not put
<path>/boot</path> in a separate partition, the <path>/boot</path> prefix used
in the above code samples is really <e>required</e>. If you followed our
suggested partitioning plan, the <path>/boot</path> prefix it not required, but
a <path>boot</path> symlink makes it work. In short, the above examples should
work whether you defined a separate <path>/boot</path> partition or not.
</p>
<p>
If you need to pass any additional options to the kernel, simply add
them to the end of the kernel command. We're already passing one option
(<c>root=/dev/hda3</c> or <c>real_root=/dev/hda3</c>), but you can pass others
as well, such as the <c>video</c> and/or <c>vga</c> statements for framebuffer
as we discussed previously.
</p>
<p>
If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
because the BIOS can't handle large harddrives you'll need to append
<c>hdx=stroke</c>.
</p>
<p>
<c>genkernel</c> users should know that their kernels use the same boot options
as is used for the Installation CD. For instance, if you have SCSI devices, you
should add <c>doscsi</c> as kernel option.
</p>
<p>
Now save the <path>grub.conf</path> file and exit. You still need to install
GRUB in the MBR (Master Boot Record) so that GRUB is automatically executed when
you boot your system.
</p>
<p>
The GRUB developers recommend the use of <c>grub-install</c>. However, if for
some reason <c>grub-install</c> fails to work correctly you still have the
option to manually install GRUB.
</p>
<p>
Continue with <uri link="#grub-install-auto">Default: Setting up GRUB using
grub-install</uri> or <uri link="#grub-install-manual">Alternative: Setting up
GRUB using manual instructions</uri>.
</p>
</body>
</subsection>
<subsection id="grub-install-auto">
<title>Default: Setting up GRUB using grub-install</title>
<body>
<p>
To install GRUB you will need to issue the <c>grub-install</c> command.
However, <c>grub-install</c> won't work off-the-shelf since we are inside a
chrooted environment. We need to create <path>/etc/mtab</path> which lists all
mounted filesystems. Fortunately, there is an easy way to accomplish this -
just copy over <path>/proc/mounts</path> to <path>/etc/mtab</path>, excluding
the <c>rootfs</c> line if you haven't created a separate boot partition. The
following command will work in both cases:
</p>
<pre caption="Creating /etc/mtab">
# <i>grep -v rootfs /proc/mounts > /etc/mtab</i>
</pre>
<p>
Now we can install GRUB using <c>grub-install</c>:
</p>
<pre caption="Running grub-install">
# <i>grub-install /dev/hda</i>
</pre>
<p>
If you have more questions regarding GRUB, please consult the <uri
link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the
<uri link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>.
</p>
<p>
Continue with <uri link="#reboot">Rebooting the System</uri>.
</p>
</body>
</subsection>
<subsection id="grub-install-manual">
<title>Alternative: Setting up GRUB using manual instructions</title>
<body>
<p>
To start configuring GRUB, you type in <c>grub</c>. You'll be presented
with the <path>grub></path> grub command-line prompt. Now, you need to type
in the right commands to install the GRUB boot record onto your hard drive.
</p>
<pre caption="Starting the GRUB shell">
# <i>grub</i>
</pre>
<note>
If your system does not have any floppy drives, add the <c>--no-floppy</c>
option to the above command to prevent grub from probing the (non-existing)
floppy drives.
</note>
<p>
In the example configuration we want to install GRUB so that it reads its
information from the boot partition <path><keyval id="/boot"/></path>, and
installs the GRUB boot record on the hard drive's MBR (master boot record) so
that the first thing we see when we turn on the computer is the GRUB prompt. Of
course, if you haven't followed the example configuration during the
installation, change the commands accordingly.
</p>
<p>
The tab completion mechanism of GRUB can be used from within GRUB.
For instance, if you type in "<c>root (</c>" followed by a TAB, you will
be presented with a list of devices (such as <path>hd0</path>). If you
type in "<c>root (hd0,</c>" followed by a TAB, you will receive a list
of available partitions to choose from (such as <path>hd0,0</path>).
</p>
<p>
By using the tab completion, setting up GRUB should be not that hard.
Now go on, configure GRUB, shall we? :-)
</p>
<pre caption="Installing GRUB in the MBR">
grub> <i>root (hd0,0)</i> <comment>(Specify where your /boot partition resides)</comment>
grub> <i>setup (hd0)</i> <comment>(Install GRUB in the MBR)</comment>
grub> <i>quit</i> <comment>(Exit the GRUB shell)</comment>
</pre>
<note>
If you want to install GRUB in a certain partition instead of the MBR,
you have to alter the <c>setup</c> command so it points to the right
partition. For instance, if you want GRUB installed in
<path>/dev/hda3</path>, then the command becomes <c>setup (hd0,2)</c>.
Few users however want to do this.
</note>
<p>
If you have more questions regarding GRUB, please consult the <uri
link="http://www.gnu.org/software/grub/grub-faq.html">GRUB FAQ</uri> or the <uri
link="http://www.gnu.org/software/grub/manual/">GRUB Manual</uri>.
</p>
<p>
Continue with <uri link="#reboot">Rebooting the System</uri>.
</p>
</body>
</subsection>
</section>
<section id="lilo" test="func:keyval('arch')='x86'">
<title>Alternative: Using LILO</title>
<subsection>
<title>Installing LILO</title>
<body>
<p>
LILO, the LInuxLOader, is the tried and true workhorse of Linux
bootloaders. However, it lacks some features that GRUB has (which is
also the reason why GRUB is currently gaining popularity). The reason
why LILO is still used is that, on some systems, GRUB doesn't work and
LILO does. Of course, it is also used because some people know LILO and
want to stick with it. Either way, Gentoo supports both, and apparently
you have chosen to use LILO.
</p>
<p>
Installing LILO is a breeze; just use <c>emerge</c>.
</p>
<pre caption="Installing LILO">
# <i>emerge lilo</i>
</pre>
</body>
</subsection>
<subsection>
<title>Configuring LILO</title>
<body>
<p>
To configure LILO, you must create <path>/etc/lilo.conf</path>. Fire up
your favorite editor (in this handbook we use <c>nano</c> for
consistency) and create the file.
</p>
<pre caption="Creating /etc/lilo.conf">
# <i>nano -w /etc/lilo.conf</i>
</pre>
<p>
Some sections ago we have asked you to remember the kernel-image name
you have created. In the next example <path>lilo.conf</path> we use the
example partitioning scheme. There are two separate parts:
</p>
<ul>
<li>
One for those who have not used <c>genkernel</c> to build their kernel
</li>
<li>
One for those who have used <c>genkernel</c> to build their kernel
</li>
</ul>
<p>
Make sure you use <e>your</e> kernel image filename and, if appropriate,
<e>your</e> initrd image filename.
</p>
<note>
If your root filesystem is JFS, you <e>must</e> add a <c>append="ro"</c>
line after each boot item since JFS needs to replay its log before it allows
read-write mounting.
</note>
<pre caption="Example /etc/lilo.conf">
boot=/dev/hda <comment># Install LILO in the MBR</comment>
prompt <comment># Give the user the chance to select another section</comment>
timeout=50 <comment># Wait 5 (five) seconds before booting the default section</comment>
default=gentoo <comment># When the timeout has passed, boot the "gentoo" section</comment>
<comment># For non-genkernel users</comment>
image=/boot/<keyval id="kernel-name"/>
label=gentoo <comment># Name we give to this section</comment>
read-only <comment># Start with a read-only root. Do not alter!</comment>
root=/dev/hda3 <comment># Location of the root filesystem</comment>
<comment># For genkernel users</comment>
image=/boot/<keyval id="genkernel-name"/>
label=gentoo
read-only
root=/dev/ram0
append="init=/linuxrc ramdisk=8192 real_root=/dev/hda3 udev"
initrd=/boot/<keyval id="genkernel-initrd"/>
<comment># The next two lines are only if you dualboot with a Windows system.</comment>
<comment># In this case, Windows is hosted on /dev/hda6.</comment>
other=/dev/hda6
label=windows
</pre>
<note>
The <c>udev</c> mentioned at the end of the append line is needed to work around
a bug in some genkernel versions <e>if</e> you use udev in the first place
(which is the default behaviour).
</note>
<note>
If you use a different partitioning scheme and/or kernel image, adjust
accordingly.
</note>
<p>
If you need to pass any additional options to the kernel, add an
<c>append</c> statement to the section. As an example, we add the
<c>video</c> statement to enable framebuffer:
</p>
<pre caption="Using append to add kernel options">
image=/boot/<keyval id="kernel-name"/>
label=gentoo
read-only
root=/dev/hda3
<i>append="video=vesafb:mtrr,ywrap,1024x768-32@85"</i>
</pre>
<p>
If you're using a 2.6.7 or higher kernel and you jumpered your harddrive
because the BIOS can't handle large harddrives you'll need to append
<c>hdx=stroke</c>.
</p>
<p>
<c>genkernel</c> users should know that their kernels use the same boot options
as is used for the Installation CD. For instance, if you have SCSI devices, you
should add <c>doscsi</c> as kernel option.
</p>
<p>
Now save the file and exit. To finish up, you have to run <c>/sbin/lilo</c> so
LILO can apply the <path>/etc/lilo.conf</path> to your system (i.e. install
itself on the disk). Keep in mind that you'll also have to run
<c>/sbin/lilo</c> every time you install a new kernel or make any changes to
the menu.
</p>
<pre caption="Finishing the LILO installation">
# <i>/sbin/lilo</i>
</pre>
<p>
If you have more questions regarding LILO, please consult its <uri
link="http://en.wikipedia.org/wiki/LILO_(boot_loader)">wikipedia page</uri>.
</p>
<p>
You can now continue with <uri link="#reboot">Rebooting the System</uri>.
</p>
</body>
</subsection>
</section>
<section id="reboot">
<title>Rebooting the System</title>
<subsection>
<body>
<p>
Exit the chrooted environment and unmount all mounted partitions. Then type in
that one magical command you have been waiting for: <c>reboot</c>.
</p>
<pre caption="Unmounting all partitions and rebooting">
# <i>exit</i>
cdimage ~# <i>cd</i>
cdimage ~# <i>umount /mnt/gentoo/boot /mnt/gentoo/dev /mnt/gentoo/proc /mnt/gentoo</i>
cdimage ~# <i>reboot</i>
</pre>
<p>
Of course, don't forget to remove the bootable CD, otherwise the CD will be
booted again instead of your new Gentoo system.
</p>
<p>
Once rebooted in your Gentoo installation, finish up with <uri
link="?part=1&chap=11">Finalizing your Gentoo Installation</uri>.
</p>
</body>
</subsection>
</section>
</sections>
1.1 xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-disk.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-disk.xml?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-disk.xml?rev=1.1&content-type=text/plain
Index: hb-install-x86+amd64-disk.xml
===================================================================
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-disk.xml,v 1.1 2006/08/13 08:43:00 nightmorph Exp $ -->
<sections>
<version>2.6</version>
<date>2006-08-13</date>
<section>
<title>Introduction to Block Devices</title>
<subsection>
<title>Block Devices</title>
<body>
<p>
We'll take a good look at disk-oriented aspects of Gentoo Linux
and Linux in general, including Linux filesystems, partitions and block devices.
Then, once you're familiar with the ins and outs of disks and filesystems,
you'll be guided through the process of setting up partitions and filesystems
for your Gentoo Linux installation.
</p>
<p>
To begin, we'll introduce <e>block devices</e>. The most famous block device is
probably the one that represents the first IDE drive in a Linux system, namely
<path>/dev/hda</path>. If your system uses SCSI or SATA drives, then your
first hard drive would be <path>/dev/sda</path>.
</p>
<p>
The block devices above represent an abstract interface to the disk. User
programs can use these block devices to interact with your disk without worrying
about whether your drives are IDE, SCSI or something else. The program can
simply address the storage on the disk as a bunch of contiguous,
randomly-accessible 512-byte blocks.
</p>
</body>
</subsection>
<subsection>
<title>Partitions</title>
<body>
<p>
Although it is theoretically possible to use a full disk to house your Linux
system, this is almost never done in practice. Instead, full disk block devices
are split up in smaller, more manageable block devices. On <keyval id="arch"/>
systems, these are called <e>partitions</e>.
</p>
<p>
Partitions are divided in three types:
<e>primary</e>, <e>extended</e> and <e>logical</e>.
</p>
<p>
A <e>primary</e> partition is a partition which has its information stored in
the MBR (master boot record). As an MBR is very small (512 bytes) only four
primary partitions can be defined (for instance, <path>/dev/hda1</path> to
<path>/dev/hda4</path>).
</p>
<p>
An <e>extended</e> partition is a special primary partition (meaning the
extended partition must be one of the four possible primary partitions) which
contains more partitions. Such a partition didn't exist originally, but as
four partitions were too few, it was brought to life to extend the formatting
scheme without losing backward compatibility.
</p>
<p>
A <e>logical</e> partition is a partition inside the extended partition. Their
definitions aren't placed inside the MBR, but are declared inside the extended
partition.
</p>
</body>
</subsection>
<subsection>
<title>Advanced Storage</title>
<body>
<p>
The <keyval id="arch"/> Installation CDs provide support for EVMS and LVM2.
EVMS and LVM2 increase the flexibility offered by your partitioning setup.
During the installation instructions, we will focus on "regular" partitions,
but it is still good to know EVMS and LVM2 are supported as well.
</p>
</body>
</subsection>
</section>
<section>
<title>Designing a Partitioning Scheme</title>
<subsection>
<title>Default Partitioning Scheme</title>
<body>
<p>
If you are not interested in drawing up a partitioning scheme for your system,
you can use the partitioning scheme we use throughout this book:
</p>
<table>
<tr>
<th>Partition</th>
<th>Filesystem</th>
<th>Size</th>
<th>Description</th>
</tr>
<tr>
<ti><path>/dev/hda1</path></ti>
<ti>ext2</ti>
<ti>32M</ti>
<ti>Boot partition</ti>
</tr>
<tr>
<ti><path>/dev/hda2</path></ti>
<ti>(swap)</ti>
<ti>512M</ti>
<ti>Swap partition</ti>
</tr>
<tr>
<ti><path>/dev/hda3</path></ti>
<ti>ext3</ti>
<ti>Rest of the disk</ti>
<ti>Root partition</ti>
</tr>
</table>
<p>
If you are interested in knowing how big a partition should be, or even how
many partitions you need, read on. Otherwise continue now with partitioning
your disk by reading <uri link="#fdisk">Using fdisk to Partition your
Disk</uri>.
</p>
</body>
</subsection>
<subsection>
<title>How Many and How Big?</title>
<body>
<p>
The number of partitions is highly dependent on your environment. For instance,
if you have lots of users, you will most likely want to have your
<path>/home</path> separate as it increases security and makes backups easier.
If you are installing Gentoo to perform as a mailserver, your
<path>/var</path> should be separate as all mails are stored inside
<path>/var</path>. A good choice of filesystem will then maximise your
performance. Gameservers will have a separate <path>/opt</path> as most gaming
servers are installed there. The reason is similar for <path>/home</path>:
security and backups. You will definitely want to keep <path>/usr</path> big:
not only will it contain the majority of applications, the Portage tree alone
takes around 500 Mbyte excluding the various sources that are stored in it.
</p>
<p>
As you can see, it very much depends on what you want to achieve. Separate
partitions or volumes have the following advantages:
</p>
<ul>
<li>
You can choose the best performing filesystem for each partition or volume
</li>
<li>
Your entire system cannot run out of free space if one defunct tool is
continuously writing files to a partition or volume
</li>
<li>
If necessary, file system checks are reduced in time, as multiple checks can
be done in parallel (although this advantage is more with multiple disks than
it is with multiple partitions)
</li>
<li>
Security can be enhanced by mounting some partitions or volumes read-only,
nosuid (setuid bits are ignored), noexec (executable bits are ignored) etc.
</li>
</ul>
<p>
However, multiple partitions have one big disadvantage: if not configured
properly, you might result in having a system with lots of free space on one
partition and none on another. There is also a 15-partition limit for SCSI and
SATA.
</p>
<p>
As an example partitioning, we show you one for a 20GB disk, used as a
demonstration laptop (containing webserver, mailserver, gnome, ...):
</p>
<pre caption="Filesystem usage example">
$ <i>df -h</i>
Filesystem Type Size Used Avail Use% Mounted on
/dev/hda5 ext3 509M 132M 351M 28% /
/dev/hda2 ext3 5.0G 3.0G 1.8G 63% /home
/dev/hda7 ext3 7.9G 6.2G 1.3G 83% /usr
/dev/hda8 ext3 1011M 483M 477M 51% /opt
/dev/hda9 ext3 2.0G 607M 1.3G 32% /var
/dev/hda1 ext2 51M 17M 31M 36% /boot
/dev/hda6 swap 516M 12M 504M 2% <not mounted>
<comment>(Unpartitioned space for future usage: 2 GB)</comment>
</pre>
<p>
<path>/usr</path> is rather full (83% used) here, but once
all software is installed, <path>/usr</path> doesn't tend to grow that much.
Although allocating a few gigabytes of disk space for <path>/var</path> may
seem excessive, remember that Portage uses this partition by default for
compiling packages. If you want to keep <path>/var</path> at a more reasonable
size, such as 1GB, you will need to alter your <c>PORTAGE_TMPDIR</c> variable
in <path>/etc/make.conf</path> to point to the partition with enough free space
for compiling extremely large packages such as OpenOffice.
</p>
</body>
</subsection>
</section>
<section id="fdisk">
<title>Using fdisk to Partition your Disk</title>
<subsection>
<body>
<p>
The following parts explain how to create the example partition layout
described previously, namely:
</p>
<table>
<tr>
<th>Partition</th>
<th>Description</th>
</tr>
<tr>
<ti><path>/dev/hda1</path></ti>
<ti>Boot partition</ti>
</tr>
<tr>
<ti><path>/dev/hda2</path></ti>
<ti>Swap partition</ti>
</tr>
<tr>
<ti><path>/dev/hda3</path></ti>
<ti>Root partition</ti>
</tr>
</table>
<p>
Change your partition layout according to your own preference.
</p>
</body>
</subsection>
<subsection>
<title>Viewing the Current Partition Layout</title>
<body>
<p>
<c>fdisk</c> is a popular and powerful tool to split your disk into partitions.
Fire up <c>fdisk</c> on your disk (in our example, we use
<path>/dev/hda</path>):
</p>
<pre caption="Starting fdisk">
# <i>fdisk /dev/hda</i>
</pre>
<p>
Once in <c>fdisk</c>, you'll be greeted with a prompt that looks like this:
</p>
<pre caption="fdisk prompt">
Command (m for help):
</pre>
<p>
Type <c>p</c> to display your disk's current partition configuration:
</p>
<pre caption="An example partition configuration">
Command (m for help): <i>p</i>
Disk /dev/hda: 240 heads, 63 sectors, 2184 cylinders
Units = cylinders of 15120 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 14 105808+ 83 Linux
/dev/hda2 15 49 264600 82 Linux swap
/dev/hda3 50 70 158760 83 Linux
/dev/hda4 71 2184 15981840 5 Extended
/dev/hda5 71 209 1050808+ 83 Linux
/dev/hda6 210 348 1050808+ 83 Linux
/dev/hda7 349 626 2101648+ 83 Linux
/dev/hda8 627 904 2101648+ 83 Linux
/dev/hda9 905 2184 9676768+ 83 Linux
Command (m for help):
</pre>
<p>
This particular disk is configured to house seven Linux filesystems (each with
a corresponding partition listed as "Linux") as well as a swap partition
(listed as "Linux swap").
</p>
</body>
</subsection>
<subsection>
<title>Removing all Partitions</title>
<body>
<p>
We will first remove all existing partitions from the disk. Type <c>d</c> to
delete a partition. For instance, to delete an existing <path>/dev/hda1</path>:
</p>
<pre caption="Deleting a partition">
Command (m for help): <i>d</i>
Partition number (1-4): <i>1</i>
</pre>
<p>
The partition has been scheduled for deletion. It will no longer show up if you
type <c>p</c>, but it will not be erased until your changes have been saved. If
you made a mistake and want to abort without saving your changes, type <c>q</c>
immediately and hit enter and your partition will not be deleted.
</p>
<p>
Now, assuming that you do indeed want to wipe out all the partitions on your
system, repeatedly type <c>p</c> to print out a partition listing and then type
<c>d</c> and the number of the partition to delete it. Eventually, you'll end
up with a partition table with nothing in it:
</p>
<pre caption="An empty partition table">
Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Device Boot Start End Blocks Id System
Command (m for help):
</pre>
<p>
Now that the in-memory partition table is empty, we're ready to create the
partitions. We will use a default partitioning scheme as discussed previously.
Of course, don't follow these instructions to the letter if you don't want the
same partitioning scheme!
</p>
</body>
</subsection>
<subsection>
<title>Creating the Boot Partition</title>
<body>
<p>
We first create a small boot partition. Type <c>n</c> to create a new partition,
then <c>p</c> to select a primary partition, followed by <c>1</c> to select the
first primary partition. When prompted for the first cylinder, hit enter. When
prompted for the last cylinder, type <c>+32M</c> to create a partition 32 Mbyte
in size:
</p>
<pre caption="Creating the boot partition">
Command (m for help): <i>n</i>
Command action
e extended
p primary partition (1-4)
<i>p</i>
Partition number (1-4): <i>1</i>
First cylinder (1-3876, default 1): <comment>(Hit Enter)</comment>
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): <i>+32M</i>
</pre>
<p>
Now, when you type <c>p</c>, you should see the following partition printout:
</p>
<pre caption="Created boot partition">
Command (m for help): <i>p</i>
Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 14 105808+ 83 Linux
</pre>
<p>
We need to make this partition bootable. Type <c>a</c> to toggle the bootable
flag on a partition and select <c>1</c>. If you press <c>p</c> again, you will
notice that an <path>*</path> is placed in the "Boot" column.
</p>
</body>
</subsection>
<subsection>
<title>Creating the Swap Partition</title>
<body>
<p>
Let's now create the swap partition. To do this, type <c>n</c> to create a new
partition, then <c>p</c> to tell fdisk that you want a primary partition. Then
type <c>2</c> to create the second primary partition, <path>/dev/hda2</path> in
our case. When prompted for the first cylinder, hit enter. When prompted for
the last cylinder, type <c>+512M</c> to create a partition 512MB in size. After
you've done this, type <c>t</c> to set the partition type, <c>2</c> to select
the partition you just created and then type in <c>82</c> to set the partition
type to "Linux Swap". After completing these steps, typing <c>p</c> should
display a partition table that looks similar to this:
</p>
<pre caption="Partition listing after creating a swap partition">
Command (m for help): <i>p</i>
Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 14 105808+ 83 Linux
/dev/hda2 15 81 506520 82 Linux swap
</pre>
</body>
</subsection>
<subsection>
<title>Creating the Root Partition</title>
<body>
<p>
Finally, let's create the root partition. To do this, type <c>n</c> to create a
new partition, then <c>p</c> to tell fdisk that you want a primary partition.
Then type <c>3</c> to create the third primary partition, <path>/dev/hda3</path>
in our case. When prompted for the first cylinder, hit enter. When prompted for
the last cylinder, hit enter to create a partition that takes up the rest of the
remaining space on your disk. After completing these steps, typing <c>p</c>
should display a partition table that looks similar to this:
</p>
<pre caption="Partition listing after creating the root partition">
Command (m for help): <i>p</i>
Disk /dev/hda: 30.0 GB, 30005821440 bytes
240 heads, 63 sectors/track, 3876 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 14 105808+ 83 Linux
/dev/hda2 15 81 506520 82 Linux swap
/dev/hda3 82 3876 28690200 83 Linux
</pre>
</body>
</subsection>
<subsection>
<title>Saving the Partition Layout</title>
<body>
<p>
To save the partition layout and exit <c>fdisk</c>, type <c>w</c>.
</p>
<pre caption="Save and exit fdisk">
Command (m for help): <i>w</i>
</pre>
<p>
Now that your partitions are created, you can now continue with <uri
link="#filesystems">Creating Filesystems</uri>.
</p>
</body>
</subsection>
</section>
<section id="filesystems">
<title>Creating Filesystems</title>
<subsection>
<title>Introduction</title>
<body>
<p>
Now that your partitions are created, it is time to place a filesystem on them.
If you don't care about what filesystem to choose and are happy with what we use
as default in this handbook, continue with <uri
link="#filesystems-apply">Applying a Filesystem to a Partition</uri>.
Otherwise read on to learn about the available filesystems...
</p>
</body>
</subsection>
<subsection>
<title>Filesystems?</title>
<body>
<p test="func:keyval('arch')='x86'">
The Linux kernel supports various filesystems. We'll explain ext2, ext3,
ReiserFS, XFS and JFS as these are the most commonly used filesystems on Linux
systems.
</p>
<p test="func:keyval('arch')='AMD64'">
Several filesystems are available. Some of them are found stable on the amd64
architecture, others aren't. The following filesystems are found to be stable:
ext2 and ext3. jfs and reiserfs may work but need more testing. If you're
really adventurous you can try the unsupported filesystems.
</p>
<p>
<b>ext2</b> is the tried and true Linux filesystem but doesn't have metadata
journaling, which means that routine ext2 filesystem checks at startup time can
be quite time-consuming. There is now quite a selection of newer-generation
journaled filesystems that can be checked for consistency very quickly and are
thus generally preferred over their non-journaled counterparts. Journaled
filesystems prevent long delays when you boot your system and your filesystem
happens to be in an inconsistent state.
</p>
<p>
<b>ext3</b> is the journaled version of the ext2 filesystem, providing metadata
journaling for fast recovery in addition to other enhanced journaling modes like
full data and ordered data journaling. ext3 is a very good and reliable
filesystem. It has an additional hashed b-tree indexing option that enables
high performance in almost all situations. You can enable this indexing by
adding <c>-O dir_index</c> to the <c>mke2fs</c> command. In short, ext3 is an
excellent filesystem.
</p>
<p>
<b>ReiserFS</b> is a B*-tree based filesystem that has very good overall
performance and greatly outperforms both ext2 and ext3 when dealing with small
files (files less than 4k), often by a factor of 10x-15x. ReiserFS also scales
extremely well and has metadata journaling. As of kernel 2.4.18+, ReiserFS is
solid and usable as both general-purpose filesystem and for extreme cases such
as the creation of large filesystems, the use of many small files, very large
files and directories containing tens of thousands of files.
</p>
<p>
<b>XFS</b> is a filesystem with metadata journaling which comes with a robust
feature-set and is optimized for scalability. We only recommend using this
filesystem on Linux systems with high-end SCSI and/or fibre channel storage and
an uninterruptible power supply. Because XFS aggressively caches in-transit data
in RAM, improperly designed programs (those that don't take proper precautions
when writing files to disk and there are quite a few of them) can lose a good
deal of data if the system goes down unexpectedly.
</p>
<p>
<b>JFS</b> is IBM's high-performance journaling filesystem. It has recently
become production-ready and there hasn't been a sufficient track record to
comment positively nor negatively on its general stability at this point.
</p>
</body>
</subsection>
<subsection id="filesystems-apply">
<title>Applying a Filesystem to a Partition</title>
<body>
<p>
To create a filesystem on a partition or volume, there are tools available for
each possible filesystem:
</p>
<table>
<tr>
<th>Filesystem</th>
<th>Creation Command</th>
</tr>
<tr>
<ti>ext2</ti>
<ti><c>mke2fs</c></ti>
</tr>
<tr>
<ti>ext3</ti>
<ti><c>mke2fs -j -O dir_index</c></ti>
</tr>
<tr>
<ti>reiserfs</ti>
<ti><c>mkreiserfs</c></ti>
</tr>
<tr>
<ti>xfs</ti>
<ti><c>mkfs.xfs</c></ti>
</tr>
<tr>
<ti>jfs</ti>
<ti><c>mkfs.jfs</c></ti>
</tr>
</table>
<p>
For instance, to have the boot partition (<path>/dev/hda1</path> in our
example) in ext2 and the root partition (<path>/dev/hda3</path> in our example)
in ext3 (as in our example), you would use:
</p>
<pre caption="Applying a filesystem on a partition">
# <i>mke2fs /dev/hda1</i>
# <i>mke2fs -j -O dir_index /dev/hda3</i>
</pre>
<p>
Now create the filesystems on your newly created partitions (or logical
volumes).
</p>
</body>
</subsection>
<subsection>
<title>Activating the Swap Partition</title>
<body>
<p>
<c>mkswap</c> is the command that is used to initialize swap partitions:
</p>
<pre caption="Creating a Swap signature">
# <i>mkswap /dev/hda2</i>
</pre>
<p>
To activate the swap partition, use <c>swapon</c>:
</p>
<pre caption="Activating the swap partition">
# <i>swapon /dev/hda2</i>
</pre>
<p>
Create and activate the swap with the commands mentioned above.
</p>
</body>
</subsection>
</section>
<section>
<title>Mounting</title>
<body>
<p>
Now that your partitions are initialized and are housing a filesystem, it is
time to mount those partitions. Use the <c>mount</c> command. Don't forget to
create the necessary mount directories for every partition you created. As an
example we mount the root and boot partition:
</p>
<pre caption="Mounting partitions">
# <i>mount /dev/hda3 /mnt/gentoo</i>
# <i>mkdir /mnt/gentoo/boot</i>
# <i>mount /dev/hda1 /mnt/gentoo/boot</i>
</pre>
<note>
If you want your <path>/tmp</path> to reside on a separate partition, be sure to
change its permissions after mounting: <c>chmod 1777 /mnt/gentoo/tmp</c>. This
also holds for <path>/var/tmp</path>.
</note>
<p>
We will also have to mount the proc filesystem (a virtual interface with the
kernel) on <path>/proc</path>. But first we will need to place our files on the partitions.
</p>
<p>
Continue with <uri link="?part=1&chap=5">Installing the Gentoo
Installation Files</uri>.
</p>
</body>
</section>
</sections>
1.1 xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-kernel.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-kernel.xml?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-kernel.xml?rev=1.1&content-type=text/plain
Index: hb-install-x86+amd64-kernel.xml
===================================================================
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-kernel.xml,v 1.1 2006/08/13 08:43:00 nightmorph Exp $ -->
<sections>
<version>3.14</version>
<date>2006-08-13</date>
<section>
<title>Timezone</title>
<body>
<p>
You first need to select your timezone so that your system knows where it is
located. Look for your timezone in <path>/usr/share/zoneinfo</path>, then copy
it to <path>/etc/localtime</path>. Please avoid the
<path>/usr/share/zoneinfo/Etc/GMT*</path> timezones as their names do not
indicate the expected zones. For instance, <path>GMT-8</path> is in fact GMT+8.
</p>
<pre caption="Setting the timezone information">
# <i>ls /usr/share/zoneinfo</i>
<comment>(Suppose you want to use GMT)</comment>
# <i>cp /usr/share/zoneinfo/GMT /etc/localtime</i>
</pre>
</body>
</section>
<section>
<title>Installing the Sources</title>
<subsection>
<title>Choosing a Kernel</title>
<body>
<p>
The core around which all distributions are built is the Linux kernel. It is the
layer between the user programs and your system hardware. Gentoo provides its
users several possible kernel sources. A full listing with description is
available at the <uri link="/doc/en/gentoo-kernel.xml">Gentoo Kernel
Guide</uri>.
</p>
<p test="func:keyval('arch')='x86'">
For x86-based systems we have, amongst other kernels, <c>vanilla-sources</c>
(the default kernel source as developed by the linux-kernel developers),
<c>gentoo-sources</c> (kernel source patched with performance-enhancing
features), ...
</p>
<p test="func:keyval('arch')='AMD64'">
For AMD64-based systems we have <c>gentoo-sources</c> (kernel v2.6 source
patched with amd64 specific fixes for stability, performance and hardware
support).
</p>
<p>
Choose your kernel source and install it using <c>emerge</c>. The
<c>USE="-doc"</c> is necessary to avoid installing xorg-x11 or other
dependencies at this point. <c>USE="symlink"</c> is not necessary for a new
install, but ensures proper creation of the <path>/usr/src/linux</path>
symlink.
</p>
<pre caption="Installing a kernel source">
# <i>USE="-doc symlink" emerge gentoo-sources</i>
</pre>
<p>
When you take a look in <path>/usr/src</path> you should see a symlink called
<path>linux</path> pointing to your kernel source. In this case, the installed
kernel source points to <c>gentoo-sources-<keyval id="kernel-version"/></c>.
Your version may be different, so keep this in mind.
</p>
<pre caption="Viewing the kernel source symlink">
# <i>ls -l /usr/src/linux</i>
lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-<keyval id="kernel-version"/>
</pre>
<p>
Now it is time to configure and compile your kernel source. You can use
<c>genkernel</c> for this, which will build a generic kernel as used by the
Installation CD. We explain the "manual" configuration first though, as it is
the best way to optimize your environment.
</p>
<p>
If you want to manually configure your kernel, continue now with <uri
link="#manual">Default: Manual Configuration</uri>. If you want to use
<c>genkernel</c> you should read <uri link="#genkernel">Alternative: Using
genkernel</uri> instead.
</p>
</body>
</subsection>
</section>
<section id="manual">
<title>Default: Manual Configuration</title>
<subsection>
<title>Introduction</title>
<body>
<p>
Manually configuring a kernel is often seen as the most difficult procedure a
Linux user ever has to perform. Nothing is less true -- after configuring a
couple of kernels you don't even remember that it was difficult ;)
</p>
<p>
However, one thing <e>is</e> true: you must know your system when you start
configuring a kernel manually. Most information can be gathered by emerging
pciutils (<c>emerge pciutils</c>) which contains <c>lspci</c>. You will now
be able to use <c>lspci</c> within the chrooted environment. You may safely
ignore any <e>pcilib</e> warnings (like pcilib: cannot open
/sys/bus/pci/devices) that <c>lspci</c> throws out. Alternatively, you can run
<c>lspci</c> from a <e>non-chrooted</e> environment. The results are the same.
You can also run <c>lsmod</c> to see what kernel modules the Installation CD
uses (it might provide you with a nice hint on what to enable).
</p>
<p>
Now go to your kernel source directory and execute <c>make menuconfig</c>. This
will fire up an ncurses-based configuration menu.
</p>
<pre caption="Invoking menuconfig">
# <i>cd /usr/src/linux</i>
# <i>make menuconfig</i>
</pre>
<p>
You will be greeted with several configuration sections. We'll first list some
options you must activate (otherwise Gentoo will not function, or not function
properly without additional tweaks).
</p>
</body>
</subsection>
<subsection>
<title>Activating Required Options</title>
<body>
<p>
First of all, activate the use of development and experimental code/drivers.
You need this, otherwise some very important code/drivers won't show up:
</p>
<pre caption="Selecting experimental code/drivers">
Code maturity level options --->
[*] Prompt for development and/or incomplete code/drivers
</pre>
<p>
Make sure that every driver that is vital to the booting of your system (such as
SCSI controller, ...) is compiled <e>in</e> the kernel and not as a module,
otherwise your system will not be able to boot completely.
</p>
</body>
<body test="func:keyval('arch')='AMD64'">
<p>
We shall then select the exact processor type. The x86_64 kernel maintainer
strongly recommends users enable MCE features so that they are able to be
notified of any hardware problems. On x86_64, these errors are not printed to
<c>dmesg</c> like on other architectures, but to <path>/dev/mcelog</path>. This
requires the <c>app-admin/mcelog</c> package.
</p>
<pre caption="Selecting processor type and features">
Processor type and features --->
[ ] Intel MCE Features
[ ] AMD MCE Features
Processor family (AMD-Opteron/Athlon64) --->
( ) AMD-Opteron/Athlon64
( ) Intel EM64T
( ) Generic-x86-64
</pre>
</body>
<body test="func:keyval('arch')='x86'">
<p>
Now select the correct processor family:
</p>
<pre caption="Selecting correct processor family">
Processor type and features --->
<comment>(Change according to your system)</comment>
(<i>Athlon/Duron/K7</i>) Processor family
</pre>
</body>
<body>
<p>
Now go to <c>File Systems</c> and select support for the filesystems you use.
<e>Don't</e> compile them as modules, otherwise your Gentoo system will not be
able to mount your partitions. Also select <c>Virtual memory</c> and <c>/proc
file system</c>.
</p>
</body>
<body test="func:keyval('arch')='x86'">
<p>
If you are using a 2.4 kernel, you need to select <c>/dev file
system</c> as 2.4 kernels do not support <c>udev</c>.
</p>
<pre caption="Selecting necessary file systems">
<comment>(With a 2.4.x kernel)</comment>
File systems --->
[*] Virtual memory file system support (former shm fs)
[*] /proc file system support
[*] /dev file system support (EXPERIMENTAL)
[*] automatically mount /dev at boot
[ ] /dev/pts file system for Unix98 PTYs
<comment>(With a 2.6.x kernel)</comment>
File systems --->
Pseudo Filesystems --->
[*] /proc file system support
[*] Virtual memory file system support (former shm fs)
<comment>(Select one or more of the following options as needed by your system)</comment>
<*> Reiserfs support
<*> Ext3 journalling file system support
<*> JFS filesystem support
<*> Second extended fs support
<*> XFS filesystem support
</pre>
<p>
If your BIOS can't handle large hard drives and you jumpered the hard drive to
report a limited size you have to enable the following option to gain access to
your whole hard drive:
</p>
<pre caption="Selecting autogeometry resizing support">
<comment>(2.4.x kernel only)</comment>
ATA/IDE/MFM/RLL support --->
IDE, ATA and ATAPI Block devices --->
<*> Include IDE/ATA-2 DISK support
[ ] Use multi-mode by default
[*] Auto-Geometry Resizing support
</pre>
</body>
<body test="func:keyval('arch')='AMD64'">
<pre caption="Selecting necessary file systems">
File systems --->
Pseudo Filesystems --->
[*] /proc file system support
[*] Virtual memory file system support (former shm fs)
<comment>(Select one or more of the following options as needed by your system)</comment>
<*> Reiserfs support
<*> Ext3 journalling file system support
<*> JFS filesystem support
<*> Second extended fs support
<*> XFS filesystem support
</pre>
</body>
<body>
<p>
Do not forget to enable DMA for your drives:
</p>
<pre caption="Activating DMA">
Device Drivers --->
ATA/ATAPI/MFM/RLL support --->
[*] Generic PCI bus-master DMA support
[*] Use PCI DMA by default when available
</pre>
<p>
If you are using PPPoE to connect to the Internet or you are using a dial-up
modem, you will need the following options in the kernel:
</p>
<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='AMD64'">
Device Drivers --->
Networking Support --->
<*> PPP (point-to-point protocol) support
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
</pre>
<pre caption="Selecting PPPoE necessary drivers" test="func:keyval('arch')='x86'">
<comment>(With a 2.4.x kernel)</comment>
Network device support --->
<*> PPP (point-to-point protocol) support
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
<comment>(With a 2.6.x kernel)</comment>
Device Drivers --->
Networking support --->
<*> PPP (point-to-point protocol) support
<*> PPP support for async serial ports
<*> PPP support for sync tty ports
</pre>
<p>
The two compression options won't harm but are not definitely needed, neither
does the <c>PPP over Ethernet</c> option, that might only be used by
<c>rp-pppoe</c> when configured to do kernel mode PPPoE.
</p>
<p>
If you require it, don't forget to include support in the kernel for your
ethernet card.
</p>
<p test="func:keyval('arch')='x86'">
If you have an Intel CPU that supports HyperThreading (tm), or you have a
multi-CPU system, you should activate "Symmetric multi-processing support":
</p>
<p test="func:keyval('arch')='AMD64'">
If you have a multi-CPU Opteron or a multi-core (e.g. AMD64 X2) system, you
should activate "Symmetric multi-processing support":
</p>
<pre caption="Activating SMP support">
Processor type and features --->
[*] Symmetric multi-processing support
</pre>
<note>
In multi-core systems, each core counts as one processor.
</note>
<p>
If you use USB Input Devices (like Keyboard or Mouse) don't forget to enable
those as well:
</p>
<pre caption="Activating USB Support for Input Devices">
Device Drivers --->
USB Support --->
<*> USB Human Interface Device (full HID) support
</pre>
</body>
<body test="func:keyval('arch')='x86'">
<p>
Laptop-users who want PCMCIA support should <e>not</e> use the PCMCIA drivers if
they choose to use a 2.4 kernel. More recent drivers are available through the
<c>pcmcia-cs</c> package which will be installed later on. 2.6-kernel users
however should use the PCMCIA drivers from the kernel.
</p>
<p>
Besides compiling in PCMCIA support in the 2.6 kernel, don't forget to enable
support for the PCMCIA card bridge present in your system:
</p>
<pre caption="Enabling PCMCIA support for 2.6 kernels">
Bus options (PCI, PCMCIA, EISA, MCA, ISA) --->
PCCARD (PCMCIA/CardBus) support --->
<*> PCCard (PCMCIA/CardBus) support
<comment>(select 16 bit if you need support for older PCMCIA cards. Most people want this.)</comment>
<*> 16-bit PCMCIA support
[*] 32-bit CardBus support
<comment>(select the relevant bridges below)</comment>
--- PC-card bridges
<*> CardBus yenta-compatible bridge support (NEW)
<*> Cirrus PD6729 compatible bridge support (NEW)
<*> i82092 compatible bridge support (NEW)
<*> i82365 compatible bridge support (NEW)
<*> Databook TCIC host bridge support (NEW)
</pre>
<p>
When you've finished configuring the kernel, continue with <uri
link="#compiling">Compiling and Installing</uri>.
</p>
</body>
</subsection>
<subsection id="compiling">
<title>Compiling and Installing</title>
<body>
<p>
Now that your kernel is configured, it is time to compile and install it. Exit
the configuration and start the compilation process:
</p>
<pre caption="Compiling the kernel" test="func:keyval('arch')='x86'">
<comment>(For 2.4 kernel)</comment>
# <i>make dep && make bzImage modules modules_install</i>
<comment>(For 2.6 kernel)</comment>
# <i>make && make modules_install</i>
</pre>
<pre caption="Compiling the kernel" test="func:keyval('arch')='AMD64'">
# <i>make && make modules_install</i>
</pre>
<p>
When the kernel has finished compiling, copy the kernel image to
<path>/boot</path>. Use whatever name you feel is appropriate for your kernel
choice and remember it as you will need it later on when you configure your
bootloader. Remember to replace <c><keyval id="kernel-name"/></c> with the
name and version of your kernel.
</p>
<pre caption="Installing the kernel">
# <i>cp arch/<keyval id="arch-sub"/>/boot/bzImage /boot/<keyval id="kernel-name"/></i>
</pre>
<p>
Now continue with <uri link="#kernel_modules">Kernel Modules</uri>.
</p>
</body>
</subsection>
</section>
<section id="genkernel">
<title>Alternative: Using genkernel</title>
<body>
<p>
If you are reading this section, you have chosen to use our <c>genkernel</c>
script to configure your kernel for you.
</p>
<p>
Now that your kernel source tree is installed, it's now time to compile your
kernel by using our <c>genkernel</c> script to automatically build a kernel for
you. <c>genkernel</c> works by configuring a kernel nearly identically to the
way our Installation CD kernel is configured. This means that when you use
<c>genkernel</c> to build your kernel, your system will generally detect all
your hardware at boot-time, just like our Installation CD does. Because
genkernel doesn't require any manual kernel configuration, it is an ideal
solution for those users who may not be comfortable compiling their own kernels.
</p>
<p>
Now, let's see how to use genkernel. First, emerge the genkernel ebuild:
</p>
<pre caption="Emerging genkernel">
# <i>emerge genkernel</i>
</pre>
</body>
<body test="func:keyval('arch')='x86'">
<p>
Next, if you are going to configure a 2.6 kernel, copy over the kernel
configuration used by the Installation CD to the location where genkernel
looks for the default kernel configuration:
</p>
<pre caption="Copying over the Installation CD kernel config">
<comment>(Only do this if you are going to configure a 2.6 kernel)</comment>
# <i>zcat /proc/config.gz > /usr/share/genkernel/x86/kernel-config-2.6</i>
</pre>
</body>
<body>
<p>
Now, compile your kernel sources by running <c>genkernel all</c>. Be aware
though, as <c>genkernel</c> compiles a kernel that supports almost all
hardware, this compilation will take quite a while to finish!
</p>
<p>
Note that, if your boot partition doesn't use ext2 or ext3 as filesystem you
might need to manually configure your kernel using <c>genkernel --menuconfig
all</c> and add support for your filesystem <e>in</e> the kernel (i.e.
<e>not</e> as a module). Users of EVMS2 or LVM2 will probably want to add
<c>--evms2</c> or <c>--lvm2</c> as argument as well.
</p>
<pre caption="Running genkernel">
# <i>genkernel all</i>
</pre>
<p>
Once <c>genkernel</c> completes, a kernel, full set of modules and
<e>initial root disk</e> (initrd) will be created. We will use the kernel
and initrd when configuring a boot loader later in this document. Write
down the names of the kernel and initrd as you will need it when writing
the bootloader configuration file. The initrd will be started immediately after
booting to perform hardware autodetection (just like on the Installation CD)
before your "real" system starts up.
</p>
<pre caption="Checking the created kernel image name and initrd">
# <i>ls /boot/kernel* /boot/initramfs*</i>
</pre>
<p>
Now, let's perform one more step to get our system to be more like the
Installation CD -- let's emerge <c>coldplug</c>. While the initrd autodetects
hardware that is needed to boot your system, <c>coldplug</c> autodetects
everything else. To emerge and enable <c>coldplug</c>, type the following:
</p>
<pre caption="Emerging and enabling coldplug">
# <i>emerge coldplug</i>
# <i>rc-update add coldplug boot</i>
</pre>
</body>
</section>
<section id="kernel_modules">
<title>Kernel Modules</title>
<subsection>
<title>Configuring the Modules</title>
<body>
<note test="func:keyval('arch')='x86'">
If you chose a kernel 2.4, replace occurrences of <c>2.6</c> with <c>2.4</c> in
this section.
</note>
<p>
You should list the modules you want automatically loaded in
<path>/etc/modules.autoload.d/kernel-2.6</path>. You can add extra options to
the modules too if you want.
</p>
<p>
To view all available modules, run the following <c>find</c> command. Don't
forget to substitute <c><keyval id="kernel-version"/></c> with the version of
the kernel you just compiled:
</p>
<pre caption="Viewing all available modules">
# <i>find /lib/modules/<keyval id="kernel-version"/>/ -type f -iname '*.o' -or -iname '*.ko'</i>
</pre>
<p>
For instance, to automatically load the <c>3c59x.o</c> module, edit the
<path>kernel-2.6</path> file and enter the module name in it.
</p>
<pre caption="Editing /etc/modules.autoload.d/kernel-2.6">
# <i>nano -w /etc/modules.autoload.d/kernel-2.6</i>
</pre>
<pre caption="/etc/modules.autoload.d/kernel-2.6">
3c59x
</pre>
<p>
Continue the installation with <uri link="?part=1&chap=8">Configuring
your System</uri>.
</p>
</body>
</subsection>
</section>
</sections>
1.1 xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-medium.xml
file : http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-medium.xml?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewcvs.py/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-medium.xml?rev=1.1&content-type=text/plain
Index: hb-install-x86+amd64-medium.xml
===================================================================
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE sections SYSTEM "/dtd/book.dtd">
<!-- The content of this document is licensed under the CC-BY-SA license -->
<!-- See http://creativecommons.org/licenses/by-sa/2.5 -->
<!-- $Header: /var/cvsroot/gentoo/xml/htdocs/doc/en/handbook/draft/hb-install-x86+amd64-medium.xml,v 1.1 2006/08/13 08:43:00 nightmorph Exp $ -->
<sections>
<version>2.12</version>
<date>2006-08-13</date>
<section>
<title>Hardware Requirements</title>
<subsection>
<title>Introduction</title>
<body>
<p>
Before we start, we first list what hardware requirements you need to
successfully install Gentoo on your box.
</p>
</body>
</subsection>
<subsection>
<title>Hardware Requirements</title>
<body test="func:keyval('arch')='x86'">
<table>
<tr>
<ti/>
<th>Minimal CD</th>
<th>LiveCD</th>
</tr>
<tr>
<th>CPU</th>
<ti>i486 or later</ti>
<ti><b>i686</b> or later</ti>
</tr>
<tr>
<th>Memory</th>
<ti>64 MB</ti>
<ti>128 MB</ti>
</tr>
<tr>
<th>Diskspace</th>
<ti colspan="2">1.5 GB (excluding swap space)</ti>
</tr>
<tr>
<th>Swap space</th>
<ti colspan="2">At least 256 MB</ti>
</tr>
</table>
</body>
<body test="func:keyval('arch')='AMD64'">
<table>
<tr>
<th>CPU</th>
<ti>Any AMD64 CPU</ti>
</tr>
<tr>
<th>Memory</th>
<ti>64 MB</ti>
</tr>
<tr>
<th>Diskspace</th>
<ti>1.5 GB (excluding swap space)</ti>
</tr>
<tr>
<th>Swap space</th>
<ti>At least 256 MB</ti>
</tr>
</table>
<p>
You should check the <uri link="/proj/en/base/amd64/">Gentoo
AMD64 Project Page</uri> before proceeding.
</p>
</body>
</subsection>
</section>
<!-- This part can be propagated to the other architectures as well. -->
<!-- START -->
<section>
<title>The Gentoo Installation CDs</title>
<subsection>
<title>Introduction</title>
<body>
<p>
The <e>Gentoo Installation CDs</e> are bootable CDs which contain a
self-sustained Gentoo environment. They allow you to boot Linux from the CD.
During the boot process your hardware is detected and the appropriate drivers
are loaded. They are maintained by Gentoo developers.
</p>
<p>
All Installation CDs allow you to boot, set up networking, initialize your
partitions and start installing Gentoo from the Internet. We currently provide
two Installation CDs which are equaly suitable to install Gentoo from, as long
as you're planning on performing an Internet-based installation using the
latest version of the available packages.
</p>
<impo>
If you wish to install Gentoo without a working Internet connection, or would
like to use one of the provided installers, please use the installation
instructions described in the <uri link="2006.1/">Gentoo 2006.1
Handbooks</uri>.
</impo>
<p>
The Installation CDs that we currently provide are:
</p>
<ul>
<li>
The Gentoo <e>Minimal</e> Installation CD, a small, no-nonsense, bootable
CD which sole purpose is to boot the system, prepare the networking and
continue with the Gentoo installation.
</li>
<li>
The Gentoo <e>Installer LiveCD</e> contains everything you need to install
Gentoo. It provides a graphical environment, a graphical as well as console
based installer which automatically carries out the installation for you,
and of course, the installation instructions for your architecture.
</li>
</ul>
<p>
To help you decide which Installation CD you need, we have written down the
major advantages and disadvantages of each Installation CD.
</p>
</body>
</subsection>
<subsection>
<title>Gentoo Minimal Installation CD</title>
<body>
<p>
The Minimal Installation CD is called <c><keyval id="min-cd-name"/></c> and
takes up only <keyval id="min-cd-size"/> MB of diskspace. You can use this
Installation CD to install Gentoo, but <e>only</e> with a working Internet
connection.
</p>
<table>
<tr>
<th>Minimal Installation CD</th>
<th>Pros and Cons</th>
</tr>
<tr>
<th>+</th>
<ti>Smallest download</ti>
</tr>
<tr>
<th>-</th>
<ti>
Contains no stage3 tarball, no Portage snapshot, no prebuilt packages and
is therefore not suitable for networkless installation
</ti>
</tr>
</table>
</body>
</subsection>
<subsection>
<title>Gentoo Installer LiveCD</title>
<body>
<p>
The Installer LiveCD is called <c><keyval id="live-cd-name"/></c> and takes up
<keyval id="live-cd-size"/> MB. You can use this Installation CD to install
Gentoo, and you can even use it to install Gentoo without a working internet
connection, just in case you want to bring Gentoo to another PC than the one
you are currently installing Gentoo on.
</p>
<table>
<tr>
<th>Installer LiveCD</th>
<th>Pros and Cons</th>
</tr>
<tr>
<th>+</th>
<ti>
Contains everything you need. You can even install without a network
connection.
</ti>
</tr>
<tr>
<th>-</th>
<ti>Huge download</ti>
</tr>
</table>
</body>
</subsection>
<subsection>
<title>The Stage3 Tarball</title>
<body>
<p>
A stage3 tarball is an archive containing a minimal Gentoo environment,
suitable to continue the Gentoo installation using the instructions in this
manual. Previously, the Gentoo Handbook described the installation using one of
three stage tarballs. While Gentoo still offers stage1 and stage2 tarballs, the
official installation method uses the stage3 tarball. If you are interested in
performing a Gentoo installation using a stage1 or stage2 tarball, please read
the Gentoo FAQ on <uri link="/doc/en/faq.xml#stage12">How do I Install Gentoo
Using a Stage1 or Stage2 Tarball?</uri>
</p>
<p>
Stage3 tarballs can be downloaded from <path><keyval
id="release-dir"/>stages/</path> on any of the <uri
link="/main/en/mirrors.xml">Official Gentoo Mirrors</uri> and are not provided
on the LiveCD.
</p>
</body>
</subsection>
</section>
<!-- STOP -->
<section>
<title>Download, Burn and Boot a Gentoo Installation CD</title>
<subsection>
<title>Downloading and Burning the Installation CDs</title>
<body>
<p>
You have chosen to use a Gentoo Installation CD. We'll first start by
downloading and burning the chosen Installation CD. We previously discussed
the several available Installation CDs, but where can you find them?
</p>
<p>
You can download any of the Installation CDs from one of our <uri
link="/main/en/mirrors.xml">mirrors</uri>. The Installation CDs are located in
the <path><keyval id="release-dir"/>installcd/</path> directory.
</p>
<p>
Inside that directory you'll find ISO-files. Those are full CD images which you
can write on a CD-R.
</p>
<p>
In case you wonder if your downloaded file is corrupted or not, you can check
its MD5 checksum and compare it with the MD5 checksum we provide (such as
<path><keyval id="min-cd-name"/>.DIGESTS</path>). You can check the MD5
checksum with the <c>md5sum</c> tool under Linux/Unix or <uri
link="http://www.etree.org/md5com.html">md5sum</uri> for Windows.
</p>
<p>
Another way to check the validity of the downloaded file is to use GnuPG to
verify the cryptographic signature that we provide (the file ending with
<path>.asc</path>). Download the signature file and obtain the public key:
</p>
<pre caption="Obtaining the public key">
$ <i>gpg --keyserver subkeys.pgp.net --recv-keys 17072058</i>
</pre>
<p>
Now verify the signature:
</p>
<pre caption="Verify the cryptographic signature">
$ <i>gpg --verify <signature file> <downloaded iso></i>
</pre>
<p>
To burn the downloaded ISO(s), you have to select raw-burning. How you
do this is highly program-dependent. We will discuss <c>cdrecord</c> and
<c>K3B</c> here; more information can be found in our <uri
link="/doc/en/faq.xml#isoburning">Gentoo FAQ</uri>.
</p>
<ul>
<li>
With cdrecord, you simply type <c>cdrecord dev=/dev/hdc <downloaded iso
file></c> (replace <path>/dev/hdc</path> with your CD-RW drive's
device path).
</li>
<li>
With K3B, select <c>Tools</c> > <c>CD</c> > <c>Burn Image</c>. Then
you can locate your ISO file within the 'Image to Burn' area. Finally click
<c>Start</c>.
</li>
</ul>
</body>
</subsection>
<subsection>
<title>Booting the Installation CD</title>
<body>
<p>
Once you have burnt your installation CD, it is time to boot it.
Remove all CDs from your CD drives, reboot your system and enter the BIOS.
This is usually done by hitting DEL, F1 or ESC, depending on your BIOS. Inside
the BIOS, change the boot order so that the CD-ROM is tried before the hard
disk. This is often found under "CMOS Setup". If you don't do this, your system
will just reboot from the hard disk, ignoring the CD-ROM.
</p>
<p>
Now place the installation CD in the CD-ROM drive and reboot. You should see a
boot prompt. At this screen, you can hit Enter to begin the boot process with
the default boot options, or boot the Installation CD with custom boot options
by specifying a kernel followed by boot options and then hitting Enter.
</p>
<p>
Specifying a kernel? Yes, we provide several kernels on our Installation CDs.
The default one is <c>gentoo</c>. Other kernels are for specific hardware needs
and the <c>-nofb</c> variants which disable framebuffer.
</p>
<p>
Below you'll find a short overview on the available kernels:
</p>
</body>
<body test="func:keyval('arch')='x86'">
<table>
<tr>
<th>Kernel</th>
<th>Description</th>
</tr>
<tr>
<ti>gentoo</ti>
<ti>Default 2.6 kernel with support for multiple CPUs</ti>
</tr>
<tr>
<ti>gentoo-nofb</ti>
<ti>Same as <c>gentoo</c> but without framebuffer support</ti>
</tr>
<tr>
<ti>memtest86</ti>
<ti>Test your local RAM for errors</ti>
</tr>
</table>
</body>
<body test="func:keyval('arch')='AMD64'">
<table>
<tr>
<th>Kernel</th>
<th>Description</th>
</tr>
<tr>
<ti>gentoo</ti>
<ti>
Default kernel with support for K8 CPUS (including NUMA support) and EM64T
CPUs
</ti>
</tr>
<tr>
<ti>memtest86</ti>
<ti>Test your local RAM for errors</ti>
</tr>
</table>
</body>
<body>
<p>
You can also provide kernel options. They represent optional settings you can
(de)activate at will. The following list is the same as the one you receive
when you press F2 at the bootscreen.
</p>
<pre caption="Options available to pass to your kernel of choice">
- agpgart loads agpgart (use if you have graphic problems,lockups)
- acpi=on loads support for ACPI firmware
- ide=nodma force disabling of DMA for malfunctioning IDE devices
- doscsi scan for scsi devices (breaks some ethernet cards)
- dopcmcia starts pcmcia service for PCMCIA cdroms
- nofirewire disables firewire modules in initrd (for firewire cdroms,etc)
- nokeymap disables keymap selection for non-us keyboard layouts
- docache cache the entire runtime portion of cd in RAM, allows you
to umount /mnt/cdrom to mount another cdrom.
- nodetect causes hwsetup/kudzu and hotplug not to run
- nousb disables usb module load from initrd, disables hotplug
- nodhcp dhcp does not automatically start if nic detected
- nohotplug disables loading hotplug service
- noapic disable apic (try if having hardware problems nics,scsi,etc)
- noevms disable loading of EVMS2 modules
- nolvm2 disable loading of LVM2 modules
- hdx=stroke allows you to partition the whole harddrive even when your BIOS
can't handle large harddrives
- noload=module1,[module2,[...]]
disable loading of specific kernel modules
</pre>
<p>
Now boot your CD, select a kernel (if you are not happy with the default
<c>gentoo</c> kernel) and boot options. As an example, we show you how
to boot the <c>gentoo</c> kernel, with <c>dopcmcia</c> as kernel
parameters:
</p>
<pre caption="Booting an Installation CD">
boot: <i>gentoo dopcmcia</i>
</pre>
<p>
You will then be greeted with a boot screen and progress bar. If you are
installing Gentoo on a system with a non-US keyboard, make sure you immediately
press Alt-F1 to switch to verbose mode and follow the prompt. If no selection
is made in 10 seconds the default (US keyboard) will be accepted and the boot
process will continue. Once the boot process completes, you will be
automatically logged in to the "Live" Gentoo Linux as "root", the super user.
You should have a root ("#") prompt on the current console and can also switch
to other consoles by pressing Alt-F2, Alt-F3 and Alt-F4. Get back to the one
you started on by pressing Alt-F1.
</p>
<p>
Now continue with <uri link="#hardware">Extra Hardware Configuration</uri>.
</p>
</body>
</subsection>
<subsection id="hardware">
<title>Extra Hardware Configuration</title>
<body>
<p>
When the Installation CD boots, it tries to detect all your hardware devices
and loads the appropriate kernel modules to support your hardware. In the vast
majority of cases, it does a very good job. However, in some cases it may not
auto-load the kernel modules you need. If the PCI auto-detection missed some of
your system's hardware, you will have to load the appropriate kernel modules
manually.
</p>
<p>
In the next example we try to load the <c>8139too</c> module (support for
certain kinds of network interfaces):
</p>
<pre caption="Loading kernel modules">
# <i>modprobe 8139too</i>
</pre>
<p>
If you need PCMCIA support, you should start the <c>pcmcia</c> init script:
</p>
<pre caption="Starting the PCMCIA init script">
# <i>/etc/init.d/pcmcia start</i>
</pre>
</body>
</subsection>
<subsection>
<title>Optional: Tweaking Hard Disk Performance</title>
<body>
<p>
If you are an advanced user, you might want to tweak the IDE hard disk
performance using <c>hdparm</c>. With the <c>-tT</c> options you can
test the performance of your disk (execute it several times to get a
more precise impression):
</p>
<pre caption="Testing disk performance">
# <i>hdparm -tT /dev/hda</i>
</pre>
<p>
To tweak, you can use any of the following examples (or experiment
yourself) which use <path>/dev/hda</path> as disk (substitute with your
disk):
</p>
<pre caption="Tweaking hard disk performance">
<comment>(Activate DMA:)</comment>
# <i>hdparm -d 1 /dev/hda</i>
<comment>(Activate Safe Performance Options:)</comment>
# <i>hdparm -d 1 -A 1 -m 16 -u 1 -a 64 /dev/hda</i>
</pre>
</body>
</subsection>
<subsection id="useraccounts">
<title>Optional: User Accounts</title>
<body>
<p>
If you plan on giving other people access to your installation
environment or you want to chat using <c>irssi</c> without root privileges (for
security reasons), you need to create the necessary user accounts and change
the root password.
</p>
<p>
To change the root password, use the <c>passwd</c> utility:
</p>
<pre caption="Changing the root password">
# <i>passwd</i>
New password: <comment>(Enter your new password)</comment>
Re-enter password: <comment>(Re-enter your password)</comment>
</pre>
<p>
To create a user account, we first enter their credentials, followed by
its password. We use <c>useradd</c> and <c>passwd</c> for these tasks.
In the next example, we create a user called "john".
</p>
<pre caption="Creating a user account">
# <i>useradd -m -G users john</i>
# <i>passwd john</i>
New password: <comment>(Enter john's password)</comment>
Re-enter password: <comment>(Re-enter john's password)</comment>
</pre>
<p>
You can change your user id from root to the newly created user by using
<c>su</c>:
</p>
<pre caption="Changing user id">
# <i>su - john</i>
</pre>
</body>
</subsection>
<subsection>
<title>Optional: Viewing Documentation while Installing</title>
<body>
<p>
If you want to view the Gentoo Handbook (either from-CD or online) during the
installation, make sure you have created a user account (see <uri
link="#useraccounts">Optional: User Accounts</uri>). Then press <c>Alt-F2</c> to
go to a new terminal and log in.
</p>
<p>
If you want to view the documentation on the CD you can immediately run
<c>links</c> to read it:
</p>
<pre caption="Viewing the on-CD documentation">
# <i>links /mnt/cdrom/docs/html/index.html</i>
</pre>
<p>
However, it is preferred that you use the online Gentoo Handbook as it will be
more recent than the one provided on the CD. You can view it using <c>links</c>
as well, but only after having completed the <e>Configuring your Network</e>
chapter (otherwise you won't be able to go on the Internet to view the
document):
</p>
<pre caption="Viewing the Online Documentation">
# <i>links http://www.gentoo.org/doc/en/handbook/<keyval id="online-book"/></i>
</pre>
<p>
You can go back to your original terminal by pressing <c>Alt-F1</c>.
</p>
</body>
</subsection>
<subsection>
<title>Optional: Starting the SSH Daemon</title>
<body>
<p>
If you want to allow other users to access your computer during the
Gentoo installation (perhaps because those users are going to help you
install Gentoo, or even do it for you), you need to create a user
account for them and perhaps even provide them with your root password
(<e>only</e> do that <e>if</e> you <b>fully trust</b> that user).
</p>
<p>
To fire up the SSH daemon, execute the following command:
</p>
<pre caption="Starting the SSH daemon">
# <i>/etc/init.d/sshd start</i>
</pre>
<p>
To be able to use sshd, you first need to set up your networking. Continue with
the chapter on <uri link="?part=1&chap=3">Configuring your Network</uri>.
</p>
</body>
</subsection>
</section>
</sections>
--
gentoo-doc-cvs@gentoo.org mailing list
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-08-13 8:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-13 8:43 [gentoo-doc-cvs] cvs commit: hb-install-about.xml hb-install-x86+amd64-bootloader.xml hb-install-x86+amd64-disk.xml hb-install-x86+amd64-kernel.xml hb-install-x86+amd64-medium.xml Josh Saddler
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox