Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 13305 Details for
Bug 10878
sparc install guide clarifications
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Sparc install guide
gentoo-sparc-install.xml (text/xml), 79.58 KB, created by
Joe Kallar (RETIRED)
on 2003-06-15 07:55:51 UTC
(
hide
)
Description:
Sparc install guide
Filename:
MIME Type:
Creator:
Joe Kallar (RETIRED)
Created:
2003-06-15 07:55:51 UTC
Size:
79.58 KB
patch
obsolete
><?xml version="1.0" encoding="UTF-8"?> ><!DOCTYPE guide SYSTEM "/dtd/guide.dtd"> ><guide link="/doc/en/gentoo-sparc-install.xml"> > <title>Gentoo SPARC/SPARC64 Linux Installation Guide</title> > <author > title="Editor"> > <mail > link="jmorgan@gentoo.org">Jack Morgan</mail> > </author> > <author > title="Maintainer"> > <mail > link="blademan@gentoo.org">Joe Kallar</mail> > </author> > > > <abstract>This is a guide for installing Gentoo Linux on a Sun SPARC based machine. If you find errors or omissions please email the maintainer or an editor.</abstract> > > <version>0.4.2</version> > > <date>11 June 2002</date> > > <chapter> > <title>About the Install</title> > > <section> > > > <body> > <p>Gentoo Linux can be installed using one of three "stage" tarball files. The one you choose depends on how much of the system you want to compile yourself. The stage1 tarball is used when you want to bootstrap and build the entire system from scratch. The stage2 tarball is used for building the entire system from a bootstrapped state. The stage3 tarball already contains a basic Gentoo Linux system.</p> > > <p> > <b>So, should you choose to start from a stage1, stage2, or stage3 tarball?</b> > > Starting from a stage1 allows you to have total control over the optimization settings and optional build-time functionality that is initially enabled on your system. This makes stage1 installs good for power users who know what they are doing. Stage2 installs allow you to skip the bootstrap process, and doing this is fine if you are happy with the optimization settings that we chose for your particular stage2 tarball. Choosing to go with a stage3 allows for the fastest install of Gentoo Linux, but also means that your base system will have the optimization settings that we chose for you. > <b>If you're installing Gentoo Linux for the first time, consider using a stage3 tarball for installation.</b> > </p> > > <impo>If you encounter a problem with any part of the install and wish to report it as a bug, report it to > <uri>http://bugs.gentoo.org</uri> > > . If the bug needs to be sent upstream to the original software developers (eg the KDE team) the > <e>Gentoo Linux developers</e> > > will take care of that for you.</impo> > > <p>Now, let us quickly review the install process. First, we will boot a LiveCD. After getting a root prompt, we will create partitions, create our filesystems, and extract either a stage1, stage2 or stage3 tarball. If we are using a stage1 or stage2 tarball, we will take the appropriate steps to get our system to stage3. Once our system is at stage3, we can configure it (customize configuration files, install a boot loader, etc) and boot it and have a fully-functional Gentoo Linux system. Depending on what stage of the build process you're starting from, here is what is required for installation:</p> > > <table> > <tr> > <th>stage tarball</th> > > <th>requirements for installation</th> > </tr> > > <tr> > <ti>1</ti> > > <ti>bootstrap, + stage 2 steps</ti> > </tr> > > <tr> > <ti>2</ti> > > <ti>emerge system, emerge kernel sources, + stage 3 steps</ti> > </tr> > > <tr> > <ti>3</ti> > > <ti>partition/filesystem setup, emerge sync, final configuration</ti> > </tr> > </table> > </body> > </section> > </chapter> > > <chapter> > <title>Supported Hardware</title> > > <section> > <body> > <p>Gentoo SPARC supports most of the hardware supported by the UltraLinux project > <uri>http://www.ultralinux.org/faq.html#s_2</uri> > > . Boot images typically have SMP disabled in order to reduce the kernel size.</p> > > <p>Warning: Most of these platforms have not been tested. Development is done by a handful of people. Reports of (non-)working installations/platforms are welcome on our mailing lists.</p> > </body> > </section> > > <section> > <title>Sun Open Boot Prom (OBP)</title> > > <body> > <warn>It is <e>highly</e> reccommended that Sun Blade 100 users do <e>not</e> upgrade their OBP to any version above 4.5.9, as this will lead to unexpected behavior with the Linux Kernel and most likely will not boot.</warn> > <impo>The Sun Blade 150, out of the box, has an incompatible OBP. The Sun Blade 150 cannot downgrade the OBP, and therefore is not supported by Linux at this time. Attempting to downgrade the OBP will result in a dead board.</impo> > <p>Sun OBP must be version 4.5.9 or below. Linux is not supported on versions 4.6.0 and higher.</p> > </body> > </section> > > <section> > <title>Space Requirements</title> > > <body> > <p>A typical install of Gentoo SPARC uses about 500-1000 MB. Gentoo SPARC itself uses about 450 MB for a complete bootstrap. This is reduced to about 150 MB after building is complete. You probably don't want to make your root partition smaller than 1 Gigabyte if you use only one partition.</p> > </body> > </section> > > <section> > <title>Kernel</title> > > <body> > <p>Always use a 64 bit kernels on a 64 bit machine. This includes Ultra 1, 2, 5, 10, 30, 60, and 80, the SunBlade series, E250/E450, E4*00, E6*00, E10K and StarFire platforms. The > <c>uname -m</c> > > output of these machines is "sparc64" or "sun4u".</p> > > <p>Always use 32 bit kernels on 32 bit platforms (sun4c, sun4d or sun4m (sun4 is currently unsupported)). These include the IPC/IPX, SPARCStations, etc. The "uname -m" output should be one of the following: "sparc", "sun4c", "sun4d" or "sun4m".</p> > > <p>Currently we use the ARCH environment variable specified in /etc/make.profile/make.defaults to determine the kernel architecture to build. This is subject to change. It will probably change to a USE switch such as > <c>arch=sparc64</c>.</p> ><!-- > <p>Stage 1 builds that are made on 64 bit machines should work fine on SPARC32 machines. The same goes for stage2 I think (not tested). I'll try it out.</p> >--> > <note>SPARC32 support is extremely limited and not entirely supported at this time.</note> > > <note>Some kernels have trouble booting with large amounts of memory. Try removing some memory, or try a more recent image.</note> > </body> > </section> > </chapter> > > <chapter> > <title>Booting</title> > > <section> > <title>Existing Linux system</title> > > <body> > <p>Using an existing Linux system already on the machine's hard drive is the easiest method. This will jumpstart you with a complete Unix environment and a working network connection. In this case, boot into your Linux system as normal, and then mount the destination partition at > <path>/mnt/gentoo</path> > > and skip to > <uri > link="#doc_chap9">Stage tarballs and chroot</uri> > > .</p> > </body> > </section> > > <section> > <title>Existing SILO</title> > > <body> > <p>You can use your previously-installed SILO to boot (press TAB once the SILO: appears). Of course this means you won't be able to load kernel modules but that might not be a problem as the default SPARC kernel configs enable most SPARC hardware drivers by default. You could use your already installed Linux SPARC machine to compile a kernel with all your drivers compiled in statically.</p> > ><pre caption="SILO Boot Prompt"> >ok <i>boot</i> >SILO: <codenote>Press TAB here.</codenote> boot: >linux >boot: <i>vmlinux root=/dev/hda4</i> ></pre> > > <p>or this will boot the 4th partition on the first disk:</p> > ><pre caption="Booting the 4th partition"> >boot: <i>4/vmlinux root=/dev/hda4</i> ></pre> > </body> > </section> > > <section> > <title>CDROM</title> > > <body> > <note>Booting from CDROM is the easiest and preferred method.</note> > > <p>Please be kind and use a download > <uri > link="http://www.gentoo.org/main/en/mirrors.xml">mirror.</uri> > > ISO images are extremely big. The latest Gentoo SPARC32 ISO is > <uri>http://cvs.gentoo.org/~weeve/iso/1.4_rc4/gentoo-sparc-1.4_rc4.iso.bz2</uri> > > and > <uri > link="http://cvs.gentoo.org/~weeve/iso/1.4_rc4/md5sum">md5sum</uri> > > . The latest Gentoo SPARC64 ISO is > <uri>http://cvs.gentoo.org/~jmorgan/iso/gentoo-sparc64-1.4_rc4A.iso.bz2</uri> > > and > <uri > link="http://cvs.gentoo.org/~jmorgan/iso/md5sumA">md5sum</uri> > > . Boot the CD from the ok prompt and choose the "gentoo" option:</p> > ><pre caption="SILO Boot CDROM"> >ok <i>boot cdrom</i> >SILO: >... >boot: <i>gentoo</i> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Load Kernel Modules</title> > > <section> > <body> > <p>First step is to insert any needed modules. You may not need this as most of the standard SPARC hardware is built into the kernel.To view a list of all available network card modules, type > <c>ls /lib/modules/*/kernel/drivers/net/*</c> > > . To load a particular module, type:</p> > ><pre caption="PCI Modules Configuration"> ># <i>modprobe pcnet32</i> ><comment>(replace pcnet32 with your NIC module)</comment> ></pre> > > <p>Now, if you want to be able to access any SCSI hardware that wasn't detected during the PCI autodetection process, you'll need to load the appropriate modules from /lib/modules, again using > <c>modprobe</c> > > :</p> > ><pre caption="Loading SCSI Modules"> ># <i>modprobe aic7xxx</i> ><comment>(replace aic7xxx with your SCSI adapter module)</comment> ># <i>modprobe sr_mod</i> ><comment>(sd_mod is the module for SCSI CD-ROM support)</comment> ># <i>modprobe sd_mod</i> ><comment>(sd_mod is the module for SCSI disk support)</comment> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Configure installation networking</title> > > <section> > <body> > <p>The Gentoo install lets you configure a working network, allowing you to use > <c>ssh</c> > > , > <c>scp</c> > > or > <c>wget</c> > > as needed before even beginning the installation process. Even if you don't need to do these things now, you should go ahead and set up networking now. Once set up, Portage will be able to use your configured network once you are inside the chroot environment (required for installing Gentoo Linux).</p> > </body> > </section> > > <section> > <title>DHCP configuration</title> > > <body> > <p>Network configuration is simple with DHCP; If your ISP is not using DHCP, skip down to the static configuration section below.</p> > ><pre caption="Network configuration with DHCP"> ># <i>dhcpcd eth0</i> ></pre> > > <note>Some ISPs require you to provide a hostname. To do that, add a > <c>-h myhostname</c> > > flag to the dhcpcd command line above.</note> > > <p>If you receive > <i>dhcpConfig</i> > > warnings, don't panic; the errors are most likely cosmetic. Skip down to Network Testing below.</p> > </body> > </section> > > <section> > <title>Manual Static configuration</title> > > <body> > <p>We need to setup just enough networking so that we can download sources for the system build, as well as the required localhost interface. Type in the following commands, replacing $IFACE with your network interface (typically > <c>eth0</c> > > ), $IPNUM with your IP address, $BCAST with your broadcast address, and $NMASK with your network mask. For the > <c>route</c> > > command, replace $GTWAY with your default gateway.</p> > ><pre caption="Static network configuration"> ># <i>/sbin/ifconfig $IFACE $IPNUM broadcast $BCAST netmask $NMASK</i> ># <i>/sbin/route add -net default gw $GTWAY netmask 0.0.0.0 metric 1</i> ></pre> > > <p>Now, it's time to create the > <path>/etc/resolv.conf</path> > file so that name resolution (finding Web/FTP sites by name, rather than just by IP address) will work.</p> > > <note>At the moment the only editors installed by default are > <c>nano</c>, a small and very easy-to-use visual editor, and the traditional > <c>vi</c> > . Use > <c>nano</c> > with the > <c>-w</c> > option to turn off automatic line-wrapping.</note> > > <p>Here's a template to follow for creating your /etc/resolv.conf file:</p> > ><pre caption="/etc/resolv.conf template"> >domain mydomain.com >nameserver 10.0.0.1 >nameserver 10.0.0.2 ></pre> > > <p>Replace > <c>10.0.0.1</c> > > and > <c>10.0.0.2</c> > > with the IP addresses of your primary and secondary DNS servers respectively.</p> > </body> > </section> > > <section> > <title>Proxy Configuration</title> > > <body> > <p>If you are behind a proxy, it is necessary to configure your proxy before you continue. We will export some variables to set up the proxy accordingly.</p> > ><pre caption="Proxy configuration"> ># <i>export http_proxy="machine.company.com:1234" </i> ># <i>export ftp_proxy="$http_proxy" </i> ># <i>export RSYNC_PROXY="$http_proxy" </i> ></pre> > </body> > </section> > > <section> > <title>Network testing</title> > > <body> > <p>Now that your network has been configured, the > <c>/sbin/ifconfig -a</c> > > command should show (hopefully!) that your network card is working (look for > <e>UP</e> > > and > <e>RUNNING</e> > > in the output).</p> > ><pre > caption="/sbin/ifconfig for a working network card"> >eth0 Link encap:Ethernet HWaddr 00:50:BA:8F:61:7A > inet addr:192.168.0.2 Bcast:192.168.0.255 Mask:255.255.255.0 > inet6 addr: fe80::50:ba8f:617a/10 Scope:Link > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:1498792 errors:0 dropped:0 overruns:0 frame:0 > TX packets:1284980 errors:0 dropped:0 overruns:0 carrier:0 > collisions:1984 txqueuelen:100 > RX bytes:485691215 (463.1 Mb) TX bytes:123951388 (118.2 Mb) > Interrupt:11 ></pre> > > <p>You may want to also try pinging your ISP's DNS server (found in > <path>/etc/resolv.conf</path> > > ), and a Web site of choice, just to make sure that your packets are reaching the net, DNS name resolution is working correctly, etc.</p> > ><pre > caption="Further Network Testing"> ># <c>ping -c 3 www.yahoo.com </c> ></pre> > </body> > </section> > > <section> > <title>Networking is go!</title> > > <body> > <p>Networking should now be configured and usable. You should be able to use the included > <c>ssh</c> > > , > <c>scp</c> > > and > <c>wget</c> > > commands to connect to other machines on your LAN or the Internet.</p> > </body> > </section> > > <section> > <title>I don't have networking!</title> > > <body>If you don't have networking there is some help in the > <uri > link="http://forums.gentoo.org/">Gentoo Forums</uri> > > . Some useful links can be found at > <uri>http://forums.gentoo.org/viewforum.php?f=27</uri> > > .</body> > </section> > </chapter> > > <chapter> > <title>Setting your system's date and time</title> > > <section> > <body> > <p>Now you need to set your system's date and time. You can do this using the > <c>date</c> > > command.</p> > ><pre caption="Setting your system's date"> ># <c>date</c> >Thu Feb 27 09:04:42 CST 2003 ><comment>(If your date is wrong, set your date with this next command)</comment> ># <c>date 022709042003</c> ><comment>(date MMDDhhmmCCYY)</comment> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Filesystems, partitions and block devices</title> > > <section> > <title>Introduction to block devices</title> > > <body> > <p>In this section, 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 install.</p> > > <p>To begin, I'll introduce "block devices". The most famous block device is probably the one that represents the first IDE drive in a Linux system:</p> > ><pre > caption="/dev/hda, the block device representing the primary master IDE drive in your system"> >/dev/hda ></pre> > > <p>If your system uses SCSI drives, then your first hard drive will be:</p> > ><pre > caption="/dev/sda, the block device representing the first logical SCSI drive in your system"> >/dev/sda ></pre> > > <p>The block devices above represent an > <i>abstract</i> > > interface to the disk. User programs can use these block devices to interact with your disk without worrying about whether your drivers 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> > </section> > > <section> > <title>Partitions and fdisk</title> > > <body> > <p>Under Linux, we create filesystems by using a special command called > <c>mkfs</c> > > (or > <c>mke2fs</c> > > , > <c>mkreiserfs</c> > > , etc,) specifying a particular block device as a command-line argument.</p> > > <p>However, although it is theoretically possible to use a "whole disk" block device (one that represents the > <i>entire</i> > > disk) like > <c>/dev/hda</c> > > or > <c>/dev/sda</c> > > to house a single filesystem, this is almost never done in practice. Instead, full disk block devices are split up into smaller, more manageable block devices called "partitions". Partitions are created using a tool called > <c>fdisk</c> > > , which is used to create and edit the partition table that's stored on each disk. The partition table defines exactly how to split up the full disk.</p> > > <p>We can take a look at a disk's partition table by running > <c>fdisk</c> > > , specifying a block device that represents a full disk as an argument:</p> > > <note>Alternate interfaces to the disk's partition table include > <c>cfdisk</c> > > , > <c>parted</c> > > and > <c>partimage</c> > > . We recommend > <c>fdisk</c> > > becuase it's more powerfull and well known in the Unix/Linux world.</note> > ><pre > caption="Starting up fdisk"> ># fdisk /dev/hda ></pre> > > <p>or</p> > ><pre > caption="Starting up fdisk to look at the partition table on /dev/sda"> ># fdisk /dev/sda ></pre> > > <impo> > <b>Note that you should > <i>not</i> > > save or make any changes to a disk's partition table if any of its partitions contain filesystems that are in use or contain important data. Doing so will generally cause data on the disk to be lost.</b> > </impo> > > <p>Once in fdisk, you'll be greeted with a prompt that looks like this:</p> > ><pre > caption="The 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): p > >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 > >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> > > <p>Notice the name of the corresponding partition block devices on the left hand side, starting with > <c>/dev/hda1</c> > > and going up to > <c>/dev/hda3</c> > > . Also, notice that each partition has an "Id", also called a "partition type". Whenever you create a new partition, you should ensure that the partition type is set correctly. '83' is the correct partition type for partitions that will be housing Linux filesystems, '82' is the correct partition type for Linux swap partitions and 'fd' is the recommended partition type for Software RAID partitions. You set the partition type using the > <c>t</c> > > option in > <c>fdisk</c> > > . The Linux kernel uses the partition type setting to auto-detect filesystems and swap devices on the disk at boot-time.</p> > </body> > </section> > > <section> > <title>Using fdisk to set up partitions</title> > > <body> > <p>Now that you've had your introduction to the way disk partitioning is done under Linux, it's time to walk you through the process of setting up disk partitions for your Gentoo Linux installation. After we walk you through the process of creating partitions on your disk, your partition configuration will look like this:</p> > ><pre > caption="The partition configuration that you will have after following these steps"> >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 > >Command (m for help): ></pre> > > <p>In our suggested "newbie" partition configuration, we have three partitions. The first one ( > <c>/dev/hda1</c>) at the beginning of the disk is a small partition called a boot partition. The boot partition's purpose is to hold all the critical data related to booting -- boot loader information as well as your Linux kernel(s). The boot partition gives us a safe place to store everything related to booting Linux. During normal day-to-day Gentoo Linux use, your boot partition should remain <e>unmounted</e> for safety. If you are setting up a SCSI system, your boot partition will likely end up being <c>/dev/sda1</c>.</p> > > <p><warn>The boot partition that SILO will use to boot <e>must be</e> ext2 or ext3. SILO will not read any other type of filesystem. If you make a separate /boot partition, then this applies only to /boot, all other partitions can be of any type of your choosing. If you do <e>not</e> make a separate /boot, then your / or root filesystem much be of type ext2 or ext3. If the boot partition is not ext2 or ext3, your system <e>will not boot</e> after installation.</warn> </p> > > <p>It's recommended to have boot partitions (containing everything necessary for the boot loader to work) at the beginning of the disk. While not necessarily required anymore, it is a useful tradition from the days when the lilo boot loader wasn't able to load kernels from filesystems that extended beyond disk cylinder 1024.</p> > > <p>The second partition ( > <c>/dev/hda2</c> > > ) is used to for swap space. The kernel uses swap space as virtual memory when RAM becomes low. This partition, relatively speaking, isn't very big either, typically somewhere around 512MB. If you're setting up a SCSI system, this partition will likely end up being called > <c>/dev/sda2</c> > > .</p> > > <p>The third partition ( > <c>/dev/hda3</c> > > ) is quite large and takes up the rest of the disk. This partition is called our "root" partition and will be used to store your main filesystem that houses Gentoo Linux itself. On a SCSI system, this partition would likely end up being > <c>/dev/sda3</c> > > .</p> > > <p>Before we partition the disk, here's a quick technical overview of the suggested partition and filesystem configuration to use when installing Gentoo Linux:</p> > > <table> > <tr> > <th>Partition</th> > > <th>Size</th> > > <th>Type</th> > > <th>example device</th> > </tr> > > <tr> > <ti>boot partition, containing kernel(s) and boot information</ti> > > <ti>32 Megabytes</ti> > > <ti>ext2 or ext3 manditory. SILO, the bootloadeder for SPARC will only read ext2 and ext3, other filesystems are not supported. If you will be using ext3, you must add the size of the journal to the partitionsize; in this case 64MB is recommended</ti> > > <ti>/dev/hda1</ti> > </tr> > > <tr> > <ti>swap partition (no longer a 128 Megabyte limit, now 2GB)</ti> > > <ti>Generally, configure a swap area that twice (2x) the size of the physical RAM in your system.</ti> > > </tr> > > <tr> > <ti>root partition, containing main filesystem (/usr, /home, etc)</ti> > > <ti>>=1.5 Gigabytes</ti> > > <ti>ReiserFS, ext3 recommended; ext2 ok</ti> > > <ti>/dev/hda3</ti> > </tr> > </table> > > <p>OK, now to create the partitions as in the example and table above. First, enter fdisk by typing > <c>fdisk /dev/hda</c> > > or > <c>fdisk /dev/sda</c> > > , depending on whether you're using IDE or SCSI. Then, type > <c>p</c> > > to view your current partition configuration. Is there anything on the disk that you need to keep? If so, > <b>stop now</b> > > . If you continue with these directions, > <b>all existing data on your disk will be erased.</b> > </p> > > <impo>Following these instructions below will cause all prior data on your disk to > <b>be erased</b> > > ! If there is anything on your drive, please be sure that it is non-critical information that you don't mind losing. Also make sure that you > <b>have selected the correct drive</b> > > so that you don't mistakenly wipe data from the wrong drive.</impo> > > <p>Now, it's time to delete any existing partitions. To do this, type > <c>d</c> > > and hit Enter. You will then be prompted for the partition number you would like to delete. To delete a pre-existing > <c>/dev/hda1</c> > > , you would type:</p> > ><pre > caption="Deleting a partition"> >Command (m for help): d >Partition number (1-4): 1 ></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> > ><!-- NOTE: THis is not sufficient documentation to cover ATA Raid and I just >find it confusing, so I'm commenting it out (drobbins) ><note>If you are using RAID your partitions will be a little different. You >will have the partitions like this: <path>/dev/ataraid/discX/partY</path> X are >the arrays you have made, so if you only have made 1 array, then it will be >disc0.Y is the partition number as in <path>/dev/hdaY</path> </note> >--> > <p>Assuming that you want to wipe out all the partitions on your system, 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. Repeat the process and 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 a boot partition. To do this, type > <c>n</c> > > to create a new partition, then type > <c>1</c> > > to create the first partition. When prompted for the first cylinder, hit enter. When prompted for the last cylinder, type > <c>+32M</c> > > to create a partition 32MB in size. You can see output from these steps below:</p> > > <note>Journaled filesystems require extra space for their journal. Default settings require about 33 Megabytes of space. Therefor, if you are using a journaled filesystem for > <path>/boot</path> > > , you should type > <c>+64M</c> > > when prompted for the last cylinder.</note> > ><pre > caption="Steps to create our boot partition"> >Command (m for help): n >Command action > e extended > p primary partition (1-4) >p >Partition number (1-4): 1 >First cylinder (1-3876, default 1): >Using default value 1 >Last cylinder or +size or +sizeM or +sizeK (1-3876, default 3876): +32M ></pre> > > <p>Now, when you type > <c>p</c> > > , you should see the following partition printout:</p> > ><pre > caption="Our first partition has been created"> >Command (m for help): p > >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>Next, let's create the swap partition. To do this, type > <c>n</c> > > to create a new partition, then > <c>2</c> > > to create the second partition, > <c>/dev/hda2</c> > > 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, 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="Our swap partition has been created"> >Command (m for help): p > >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> > > <p>Finally, let's create the root partition. To do this, type > <c>n</c> > > to create a new partition, then type > <c>3</c> > > to create the third partition, > <c>/dev/hda3</c> > > 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="Our root partition has been created"> >Command (m for help): p > >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> > > <p>Finally, we need to set the "bootable" flag on our boot partition and then write our changes to disk. To tag > <c>/dev/hda1</c> > > as a "bootable" partition, type > <c>a</c> > > at the menu and then type in > <c>1</c> > > for the partition number. If you type > <c>p</c> > > now, you'll now see that > <c>/dev/hda1</c> > > has a > <c>*</c> > > in the "Boot" column. Now, let's write our changes to disk. To do this, type > <c>w</c> > > and hit enter. Your disk partitions are now properly configured for a Gentoo Linux install.</p> > > <note>If > <c>fdisk</c> > > or > <c>cfdisk</c> > > instruct you to do so, please reboot to allow your system to detect the new partition configuration.</note> > </body> > </section> > > <section> > <title>Creating filesystems</title> > > <body> > <p>Now that the partitions have been created, it's time to set up filesystems on the boot and root partitions so that they can be mounted and used to store data. We will also configure the swap partition to serve as swap storage.</p> > > <p>Gentoo Linux supports a variety of different types of filesystems; each type has its strengths and weaknesses and its own set of performance characteristics. Currently, we support the creation of ext2, ext3, XFS, JFS and ReiserFS filesystems.</p> > > <p>ext2 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 > <i>journaled</i> > > 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 > <i>inconsistent</i> > > state.</p> > > <p>ext3 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 offers generally decent performance under most conditions. Because it does not extensively employ the use of "trees" in its internal design, it doesn't scale very well, meaning that it is not an ideal choice for very large filesystems, or situations where you will be handling very large files or large quantities of files in a single directory. But when used within its design parameters, ext3 is an excellent filesystem.</p> > > <p>ReiserFS 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 now rock-solid and highly recommended for use both as a 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. ReiserFS is the filesystem we recommend by default for all non-boot partitions.</p> > > <p>XFS is a filesystem with metadata journaling that is fully supported under Gentoo Linux's > <path>xfs-sources</path> > > kernel. It 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 a 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>JFS is IBM's own high performance journaling filesystem. It has recently become production-ready, and there hasn't been a sufficient track record to comment either positively nor negatively on its general stability at this point.</p> > > <p>If you're looking for the most rugged journaling filesystem, use ext3. If you're looking for a good general-purpose high-performance filesystem with journaling support, use ReiserFS; both ext3 and ReiserFS are mature, refined and recommended for general use.</p> > ><!-- Corner case, confusing > <p>But before creating filesystems, you may want to initialize the > beginning of your partition using <c>dd</c> if you are using a pre-existing partition that has been used before. > This is particularly helpful when you're going to create a new XFS filesystem on a partition that previously contained > a ReiserFS filesystem. Doing this will ensure that your new filesystem > will not be mis-identified by Linux's filesystem auto-detection code. > This can be done as follows: > </p> ><pre caption="Initializing first 1024 bytes of your partition"> ># <c>dd if=/dev/zero of=/dev/hda3 bs=1k count=1</c> ><comment>(Replace /dev/hda3 with the partition you wish to "clean.")</comment> ></pre> > <warn>The command above will destroy all data from <path>/dev/hda3</path>. > Be careful and check twice which partition you specify for zeroing. > If you make a mistake it might result in a loss of data. > </warn> >--> > <p>Based on our example above, we will use the following commands to initialize all our partitions for use:</p> > ><pre > caption="Initializing our partitions (example)"> ># mke2fs -j /dev/hda1 ># mkswap /dev/hda2 ># mkreiserfs /dev/hda3 ></pre> > > <p>We choose ext3 for our > <c>/dev/hda1</c> > > boot partition because it is a robust journaling filesystem supported by all major boot loaders. We used > <c>mkswap</c> > > for our > <c>/dev/hda2</c> > > swap partition -- the choice is obvious here. And for our main root filesystem on > <c>/dev/hda3</c> > > we choose ReiserFS, since it is a solid journaling filesystem offering excellent performance. Now, go ahead and initialize your partitions.</p> > > <p>For your reference, here are the various > <c>mkfs</c> > > -like commands available during the installation process:</p> > > <p> > <c>mkswap</c> > > is the command that is used to initialize swap partitions:</p> > ><pre caption="Initializing Swap"> ># <c>mkswap /dev/hda2</c> ></pre> > > <p>You can use the > <c>mke2fs</c> > > command to create ext2 filesystems:</p> > ><pre caption="Creating an ext2 Filesystem"> ># <i>mke2fs /dev/hda1</i> ></pre> > > <p>If you would like to use ext3, you can create ext3 filesystems using > <c>mke2fs -j</c> > > :</p> > ><pre caption="Creating an ext3 Filesystem"> ># <c>mke2fs -j /dev/hda3</c> ></pre> > > <note>You can find out more about using ext3 under Linux 2.4 at > <uri>http://www.zip.com.au/~akpm/linux/ext3/ext3-usage.html</uri> > > .</note> > > <p>To create ReiserFS filesystems, use the > <c>mkreiserfs</c> > > command:</p> > ><pre > caption="Creating a ReiserFS Filesystem"> ># <c>mkreiserfs /dev/hda3</c> ></pre> > > <p>To create an XFS filesystem, use the > <c>mkfs.xfs</c> > > command:</p> > ><pre > caption="Creating a XFS Filesystem"> ># <c>mkfs.xfs /dev/hda3</c> ></pre> > > <note>You may want to add a couple of additional flags to the > <c>mkfs.xfs</c> > > command: > <c>-d agcount=3 -l size=32m</c> > > . The > <c>-d agcount=3</c> > > command will lower the number of allocation groups. XFS will insist on using at least 1 allocation group per 4 GB of your partition, so, for example, if you have a 20 GB partition you will need a minimum agcount of 5. The > <c>-l size=32m</c> > > command increases the journal size to 32 Mb, increasing performance.</note> > > <p>To create JFS filesystems, use the > <c>mkfs.jfs</c> > > command:</p> > ><pre > caption="Creating a JFS Filesystem"> ># <c>mkfs.jfs /dev/hda3</c> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Mount Partitions</title> > > <section> > <body> > <p>Now, we will activate our newly-initialized swap volume, since we may need the additional virtual memory that it provides later:</p> > ><pre > caption="Activating Swap"> ># <c>swapon /dev/hda2</c> ></pre> > > <p>Next, we will create the > <path>/mnt/gentoo</path> > > and > <path>/mnt/gentoo/boot</path> > > mount points, and we will mount our filesystems to these mount points. Once our boot and root filesystems are mounted, any files we copy or create inside > <path>/mnt/gentoo</path> > > will be placed on our new filesystems. Note that if you are setting up Gentoo Linux with separate > <path>/usr</path> > > or > <path>/var</path> > > filesystems, these would get mounted to > <path>/mnt/gentoo/usr</path> > > and > <path>/mnt/gentoo/var</path> > > respectively.</p> > > <impo>If your > <e>boot</e> > > partition (the one holding the kernel) is ReiserFS, be sure to mount it with the > <c>-o notail</c> > > option so GRUB gets properly installed. Make sure that > <c>notail</c> > > ends up in your new > <path>/etc/fstab</path> > > boot partition entry, too. We will get to that in a bit. If you are going to use LILO with ReiserFS, then the > <c>-o notail</c> > > is not needed. It's always safe to specify the > <c>-o notail</c> > > option with ReiserFS if you're not sure what to do.</impo> > ><pre > caption="Creating Mount Points"> ># <c>mount /dev/hda3 /mnt/gentoo</c> ># <c>mkdir /mnt/gentoo/boot</c> ># <c>mount /dev/hda1 /mnt/gentoo/boot</c> ></pre> > > <impo>If you are having problems mounting your boot partition with ext2, try using > <c>mount /dev/hXX /mnt/gentoo/boot -t ext2</c> > </impo> > </body> > </section> > </chapter> > > <chapter> > <title>Stage tarballs and chroot</title> > > <section> > <title>Selecting the desired stage tarball</title> > > <body> > <p>Now, you need to decide which one you would like to use as a basis for the install if you haven't already.</p> > > <p>If you are using the "from scratch, build everything" install method, you will want to use the stage1 image. If you're using one of our bigger CDs like the "3stages" ISO, you will also have a choice of a stage2 and stage3 image. These images allow you to save time at the expense of configurability (we've already chosen compiler optimizations and default USE variables for you.) The stages on the CD are accessible at > <path>/mnt/cdrom/gentoo</path>, and you can type > <c>ls /mnt/cdrom/gentoo</c> to see what's available on your CD.</p> > > <p>If you were able to boot from a CDROM, you can skip this section and move on >to "Extracting the stage tarball" below.</p> > > <p>If you need to perform an install using a stage tarball <i>without access</i> >to a CD, you will need to download the stage using the following instructions.</p> > ><pre caption="Downloading Required Stages"> ># <c>cd /mnt/gentoo</c> ><comment>Use lynx to get the URL for your tarball:</comment> ><comment>For 32-bit SPARC:</comment> ># <c>lynx http://distro.ibiblio.org/pub/linux/distributions/gentoo/releases/1.4_rc4/sparc/sparc32/</c> ><comment>For 64-bit SPARC:</comment> ># <c>lynx http://distro.ibiblio.org/pub/linux/distributions/gentoo/releases/1.4_rc4/sparc/sparc64/</c> ><comment>This is just an example. Please use a <uri link="http://www.gentoo.org/main/en/mirrors.xml">mirror</uri> near you.</comment> ><comment></comment> ><comment>Once in the directory, use <c>Up</c> and <c>Down</c> arrows keys (or the <c>TAB</c> key) to move through the page. Use <c>Left</c> and <c>Right</c> arrows keys to go back and forward/select through a page. >Highlight the appropriate stage you want to download. >Press <c>d</c> or <c>Right</c> arrow which will initiate the download. >When the file download is complete, you will be asked to save the file and then press <c>q</c> to quit the browser > ><b>OR</b> use wget from the command line:</comment> ># <c>wget <comment>insert URL from above to the required stage tarball here.</comment> ></c> ></pre> > </body> > </section> > > <section> > <title>Extracting the stage tarball</title> > > <body> > <p>Now it is time to extract the compressed stage tarball of your choice to > <path>/mnt/gentoo/</path>. Remember, you only need to unpack > <b>only one</b> stage tarball, <b>either</b> a stage1, stage2 > <b>or</b> stage3. So, if you wanted to perform a stage3 install of Gentoo, then you would just unpack the stage3 tarball. Unpack the stage tarball as follows:</p> > > <impo>Be sure to use the <c>p</c> option with <c>tar</c>. Forgetting to do this will cause certain files to have incorrect permissions.</impo> > ><pre > caption="Unpacking the Stages"> ><comment>Confirm that you are in the right directory</comment> ># <c>cd /mnt/gentoo</c> ><comment></comment> ><comment>Change "stage3" to "stage2" or "stage1" if you want to start from these stages instead.</comment> ># <c>tar -xvjpf /mnt/cdrom/gentoo/stage3-*.tar.bz2</c> ><comment></comment> ><comment>If you downloaded your stage tarball, use the following (assuming you downloaded the stage to the current directory.</comment> ># <c>tar -xvjpf stage3-*.tar.bz2</c> ></pre> > > <p>If you downloaded your stage tarball to > <path>/mnt/gentoo</path>, you can now delete it by typing > <c>rm /mnt/gentoo/stage*.tar.bz2</c> > > .</p> > </body> > </section> > > <section> > <title>Entering the chroot</title> > > <body> > <p>Next, we will > <c>chroot</c> > > over to the new Gentoo Linux build installation to "enter" the new Gentoo Linux system.</p> > > <note>You may receive a notice during > <c>env-update</c> > > telling you that > <path>/etc/make.profile/make.defaults</path> > > isn't available: ignore it. We are going to issue > <c>emerge sync</c> > > later on in this document which will resolve the problem.</note> > ><pre > caption="Prepping and entering the chroot environment"> ># <c>mount -t proc proc /mnt/gentoo/proc</c> ># <c>cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf</c> ># <c>chroot /mnt/gentoo /bin/bash</c> ># <c>env-update</c> >Regenerating /etc/ld.so.cache... ># <c>source /etc/profile</c> ><comment>(The above points your shell to the new paths and updated binaries.)</comment> ></pre> > > <p>After you execute these commands, you will be "inside" your new Gentoo Linux environment in > <path>/mnt/gentoo</path> > > . We can perform the rest of the installation process inside the chroot.</p> > </body> > </section> > </chapter> > > <chapter> > <title>Getting the Current Portage Tree using sync</title> > > <section> > <body> > <p>Now, you will need to run > <c>emerge sync</c> > > . This command tells Portage to download the most recent copy of the Gentoo Linux Portage tree. The Portage tree contains all the scripts (called ebuilds) used to build every package under Gentoo Linux. Currently, we have ebuild scripts for close to 4000 packages. Once > <c>emerge sync</c> > > completes, you will have a complete Portage tree in > <path>/usr/portage</path> > > .</p> > ><pre > caption="Updating Using sync"> ># <c>emerge sync</c> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Setting Gentoo optimizations (make.conf)</title> > > <section> > <body> > <p>Now that you have a working copy of the Portage tree, it is time to customize the optimization and optional build-time settings to use on your Gentoo Linux system. Portage will use these settings when compiling any programs for you. To do this, edit the file > <path>/etc/make.conf</path> > > . In this file, you should set your > <c>USE</c> > > flags, which specify optional functionality that you would like to be built into packages if available; generally, the defaults (an > <e>empty</e> > > or unset > <c>USE</c> > > variable) are fine. More information on > <c>USE</c> > > flags can be found > <uri > link="http://www.gentoo.org/doc/en/use-howto.xml">here</uri> > > . A complete list of current USE flags can be found > <uri > link="http://www.gentoo.org/dyn/use-index.xml">here</uri> > > .</p> > > <p>You also should set appropriate > <c>CHOST</c> > > , > <c>CFLAGS</c> > > and > <c>CXXFLAGS</c> > > settings for the kind of system that you are creating (commented examples can be found further down in the file.) These settings will be used to tell the C and C++ compiler how to optimize the code that is generated on your system. It is common for users with UltraSPARC processors to specify a "-mcpu=ultrasparc" setting in their CFLAGS and CXXFLAGS settings so that all packages built will be optimized for the instruction set and performance characteristics of their CPU, for example. The <path>/etc/make.conf</path> file contains a general guide for the proper settings of CFLAGS and CXXFLAGS. For SuperSPARCs, the suggested CFLAGS and CXXFLAGS are "-O2 -pipe." For UltraSPARC, the suggested CFLAGS and CXXFLAGS are "-mcpu=ultrasparc -O3 -pipe." Please note that these are conservative settings and that "-O2" and "-O3" are "O"ptimize and not Zero(0).</p> > <p>If necessary, you can also set proxy information here if you are behind a firewall. Use the following command to edit <path>/etc/make.conf</path> using <c>nano</c>, a simple visual editor.</p> > ><pre > caption="Setting make.conf Options"> ># <c>nano -w /etc/make.conf</c> ><comment>(Edit USE, CHOST, CFLAGS, MAKEOPTS and any necessary proxy settings)</comment> ></pre> > > <note>People who need to substantially customize the build process should take a look at the <path>/etc/make.globals</path>file. This file comprises gentoo defaults and should never be touched. If the defaults do not suffice, then new values should be put in <path>/etc/make.conf</path>, as entries in <path>make.conf</path> <comment>override</comment> > the entries in <path>make.globals</path>. If you're interested in customizing USE settings, look in <path>/etc/make.profile/make.defaults</path>. If you want to turn off any USE settings found here, add an appropriate <c>USE="-foo"</c> in <path>/etc/make.conf</path> to turn off any <c>foo</c> USE setting enabled by default in <path>/etc/make.globals</path> or <path>/etc/make.profile/make.defaults</path>.</note> > > <note>Using the following: <c>USE="-java"</c> can reduce your compile time by 30%.</note> > </body> > </section> > </chapter> > > <chapter> > <title>Starting from Stage1</title> > > <section> > <body> > <note>If you are not starting from a stage1 tarball, skip this section.</note> > > <p>The stage1 tarball is for complete customization and optimization. If you have picked this tarball, you are most likely looking to have an uber-optimized and up-to-date system. Have fun, because optimization is what Gentoo Linux is all about! Installing from a stage1 takes a lot of time, but the result is a system that has been optimized from the ground up for your specific machine and needs.</p> > > <p>Now, it is time to start the "bootstrap" process. This process takes about two hours on my 1200MHz AMD Athlon system. During this time, the GNU C library, compiler suite and other key system programs will be built. Start the bootstrap as follows:</p> > ><pre > caption="Bootstrapping"> ># <c>cd /usr/portage</c> ># <c>scripts/bootstrap.sh</c> ></pre> > > <p>The "bootstrap" process will now begin.</p> > > <note>Portage by default uses > <c>/var/tmp</c> > > during package building, often using several hundred megabytes of temporary storage. If you would like to change where Portage stores these temporary files, set a new PORTAGE_TMPDIR > <e>before</e> > > starting the bootstrap process, as follows:</note> > ><pre > caption="Changing Portage's Storage Path"> ># <c>export PORTAGE_TMPDIR="/otherdir/tmp"</c> ></pre> > > <p> > <c>bootstrap.sh</c> > > will build > <c>binutils</c> > > , > <c>gcc</c> > > , > <c>gettext</c> > > , and > <c>glibc</c> > > , rebuilding > <c>binutils</c> > > , > <c>gcc</c> > > , and > <c>gettext</c> > > after > <c>glibc</c> > > . Needless to say, this process takes a while. Once this process completes, your system will be equivalent to a "stage2" system, which means you can now move on to the stage2 instructions.</p> > </body> > </section> > </chapter> > > <chapter> > <title>Starting from Stage2 (or continuing from Stage1)</title> > > <section> > <body> > <note>This section is for those continuing a stage1 install or starting at stage2. If this is not you (ie. you're using a stage3,) then skip this section.</note> > > <p>The stage2 tarball already has the bootstrapping done for you. All that you have to do is install the rest of the system.</p> > > <note>If you are starting from a pre-built stage2 and want to ensure that your compiler toolchain is fully up-to-date, add the > <c>-u</c> > > option to the commands below. If you don't know what this means, it's safe to skip this suggestion.</note> > ><pre > caption="Installing the Rest of the System"> ># <c>emerge -p system</c> ><comment>(lists the packages to be installed)</comment> ># <c>emerge system</c> ></pre> > > <p>It is going to take a while to finish building the entire base system. Your reward is that it will be thoroughly optimized for your system. The drawback is that you have to find a way to keep yourself occupied for some time to come. The author suggests "Star Wars - Super Bombad Racing" for the PS2.</p> > > <p>Building is now complete. Go ahead and skip down to the "Setting your time zone" section.</p> > </body> > </section> > </chapter> > > <chapter> > <title>Starting from Stage3</title> > > <section> > <body> > <note>This section is for those > <b>starting</b> > > with stage3. Stage1 and stage2 systems > <b>should skip</b> > > this section.</note> > > <p>The stage3 tarball provides a fully-functional basic Gentoo system, so no building is required. However, since the stage3 tarball is pre-built, it may be slightly out-of-date. If this is a concern for you, you can automatically update your existing stage3 to contain the most up-to-date versions of all system packages by performing the following steps. Note that this could take a long time if your stage3 is very old; otherwise, this process will generally be quick and will allow you to benefit from the very latest Gentoo updates and fixes. In any case, feel free to skip these steps and proceed to the next section if you like.</p> > ><pre > caption="Getting up-to-date"> ># <c>export CONFIG_PROTECT="-* /etc/make.conf"</c> ># <c>emerge -up system</c> ><comment>(lists the packages that would be installed)</comment> ># <c>emerge -u system</c> ><comment>(actually merges the packages)</comment> ># <c>unset CONFIG_PROTECT</c> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Setting your time zone</title> > > <section> > <body> > <p>Now you need to set your time zone.</p> > > <p>Look for your time zone (or GMT if you are using Greenwich Mean Time) in > <path>/usr/share/zoneinfo</path> > > . Then, make a symbolic link to /etc/localtime by typing:</p> > ><pre > caption="Creating a symbolic link for time zone"> ># <c>ln -sf /usr/share/zoneinfo/path/to/timezonefile /etc/localtime</c> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Installing the kernel and a System Logger</title> > > <section> > <body> > <note>If you haven't done so, please edit > <path>/etc/make.conf</path> > > to your flavor.</note> > > <warn>If you are configuring your own kernel, be careful with the > <i>grsecurity</i> > > option. Being too aggressive with your security settings can cause certain programs (such as X) to not run properly. If in doubt, leave it out.</warn> > > <p>Merge the kernel as follows:</p> > ><pre > caption="Emerging Kernel Sources"> ># <c>emerge sys-kernel/sparc-sources</c> ></pre> > > <p>Once you have a Linux kernel source tree available, it is time to compile your own custom kernel.</p> > > <p>Please note that > <path>/usr/src/linux</path> > > is a symlink to your current emerged kernel source package, and is set automatically by Portage at emerge time. If you have multiple kernel source packages, it is necessary to set the > <path>/usr/src/linux</path> > > symlink to the correct one before proceeding.</p> > ><pre > caption="Configuring the Linux Kernel"> ># <c>cd /usr/src/linux</c> ># <c>make menuconfig</c> ></pre> > > <warn>For your kernel to function properly, there are several options that you will need to ensure are in the kernel proper -- that is, they should > <i>be enabled and not compiled as modules</i> > > . Be sure to enable "ReiserFS" if you have any ReiserFS partitions; the same goes for "Ext3". If you're using XFS, enable the "SGI XFS filesystem support" option. It's always a good idea to leave ext2 enabled whether you are using it or not. Below are some common options that you will need:</warn> > ><pre > caption="make menuconfig options"> >Code maturity level options ---> > [*] Prompt for development and/or incomplete code/drivers" ><comment>(You need this to enable some of the options below.)</comment> > ... >File systems ---> > <*> Reiserfs support ><comment>(Only needed if you are using reiserfs.)</comment> > ... > <*> Ext3 journalling file system support ><comment>(Only needed if you are using ext3.)</comment> > ... > [*] Virtual memory file system support (former shm fs) ><comment>(Required for Gentoo Linux.)</comment> > ... > <*> JFS filesystem support ><comment>(Only needed if you are using JFS.)</comment> > ... > [*] /proc file system support ><comment>(Required for Gentoo Linux.)</comment> > [*] /dev file system support (EXPERIMENTAL) ><comment>(Required for Gentoo Linux.)</comment> > [*] Automatically mount at boot ><comment>(Required for Gentoo Linux.)</comment> > [ ] /dev/pts file system for Unix98 PTYs ><comment>(Uncheck this, it is NOT needed.)</comment> > ... > <*> Second extended fs support ><comment>(Only needed if you are using ext2.)</comment> > ... > <*> XFS filesystem support ><comment>(Only needed if you are using XFS.)</comment> ></pre> > > <p>If you are using hardware RAID you will need to enable a couple more options in the kernel: For Highpoint RAID controllers select hpt366 chipset support, support for IDE RAID controllers and Highpoint 370 software RAID.For Promise RAID controllers select PROMISE PDC202{46|62|65|67|68|69|70} support, support for IDE RAID controllers and Support Promise software RAID (Fasttrak(tm))</p> > > <p>If you use PPPoE to connect to Internet, you will need the following options in the kernel (built-in or as preferably as modules) : "PPP (point-to-point protocol) support", "PPP support for async serial ports", "PPP support for sync tty ports". The two compression options won't harm but are not definitely needed, neither does the "PPP over Ethernet" option, that might only be used by > <i>rp-pppoe</i> > > when configured to do kernel mode PPPoE.</p> > > <p>If you have an IDE cd burner, then you need to enable SCSI emulation in the kernel. Turn on "ATA/IDE/MFM/RLL support" ---> "IDE, ATA and ATAPI Block devices" ---> "SCSI emulation support" (I usually make it a module), then under "SCSI support" enable "SCSI support", "SCSI CD-ROM support" and "SCSI generic support" (again, I usually compile them as modules). If you also choose to use modules, then > <c>echo -e "ide-scsi\nsg\nsr_mod" >> /etc/modules.autoload</c> > > to have them automatically added at boot time.</p> > > <note>For those who prefer it, it is now possible to install Gentoo Linux with a 2.2 kernel. However, doing this comes at a price: you will lose many of the nifty features that are new to the 2.4 series kernels (such as XFS and tmpfs filesystems, iptables, and more), although the 2.2 kernel sources can be patched with ReiserFS and devfs support. Gentoo linux boot scripts require either tmpfs or ramdisk support in the kernel, so 2.2 kernel users need to make sure that ramdisk support is compiled in (ie, not a module). It is > <comment>vital</comment> > > that a > <e>gentoo=notmpfs</e> > > flag be added to the kernel line in > <path>/boot/grub/grub.conf</path> > > or to the append line in > <path>/etc/lilo.conf</path> > > for the 2.2 kernel so that a ramdisk is mounted for the boot scripts instead of tmpfs. If you choose not to use devfs, then > <e>gentoo=notmpfs,nodevfs</e> > > should be used instead.</note> > ><pre caption="Compiling and Installing the kernel"> ># <c>make dep && make clean vmlinux modules modules_install</c> ># <c>cp /usr/src/linux/vmlinux /boot</c> ></pre> > > <p>The kernel has to be smaller than 3.6 megabytes to "fit" in the memory space SILO (the SPARC bootloader) uses:</p> > ><pre caption="Checking vmlinux's size"> ># <i>ls -al vmlinux</i> >-rwxr-xr-x 1 root root 3503075 Apr 20 21:42 vmlinux ></pre> > > <p>We need a straight GZIP for SILO.</p> > ><pre caption="Compressing, moving, and making a symlink for vmlinux"> ># <i>gzip -9 vmlinux</i> ># <i>cp vmlinux.gz /boot/vmlinuz-2.4.18</i> ># <i>ln /boot/vmlinuz-2.4.18 /vmlinuz</i> ></pre> > > <p>Your new custom kernel (and modules) are now installed. Now you need to choose a system logger that you would like to install. We offer sysklogd, which is the traditional set of system logging daemons. We also have msyslog and syslog-ng as well as metalog. Power users seem to gravitate away from sysklogd (not very good performance) and towards the newer alternatives. If in doubt, you may want to try metalog, since it seems to be quite popular. To merge your logger of choice, type > <e>one</e> > > of the next four lines:</p> > ><pre > caption="Emerging System Logger of Choice"> ># <c>emerge app-admin/sysklogd</c> ># <c>rc-update add sysklogd default</c> ><comment>or</comment> ># <c>emerge app-admin/syslog-ng</c> ># <c>rc-update add syslog-ng default</c> ><comment>or</comment> ># <c>emerge app-admin/metalog</c> ># <c>rc-update add metalog default</c> ><comment>or</comment> ># <c>emerge app-admin/msyslog</c> ># <c>rc-update add msyslog default</c> ></pre> > > <impo>Metalog flushes output to the disk in blocks, so messages aren't immediately recorded into the system logs. If you are trying to debug a daemon, this performance-enhancing behavior is less than helpful. When your Gentoo Linux system is up and running, you can send metalog a USR1 signal to temporarily turn off this message buffering (meaning that > <i>tail -f > <path>/var/log/everything/current</path> > </i> > > will now work in real time, as expected), and a USR2 signal to turn buffering back on again. If you want to disable buffering permanently, you can change METALOG_OPTS="-B" to METALOG_OPTS="-B -s" in > <path>/etc/conf.d/metalog</path> > > .</impo> > ><pre > caption="Turning metalog buffering on/off"> ><codenote>To turn the buffering off:</codenote> ># <c>killall -USR1 metalog</c> ><codenote>To turn the buffering back on:</codenote> ># <c>killall -USR2 metalog</c> ></pre> > > <p>Now, you may optionally choose a cron package that you would like to use. Right now, we offer dcron, fcron and vcron. If you do not know which one to choose, you might as well grab vcron. They can be installed as follows:</p> > ><pre > caption="Choosing a CRON Daemon"> ># <c>emerge sys-apps/dcron</c> ># <c>rc-update add dcron default</c> ># <c>crontab /etc/crontab</c> ><comment>or</comment> ># <c>emerge sys-apps/fcron</c> ># <c>rc-update add fcron default</c> ># <c>crontab /etc/crontab</c> ><comment>or</comment> ># <c>emerge sys-apps/vcron</c> ># <c>rc-update add vcron default</c> ><comment>You do not need to run <c>crontab /etc/crontab</c> if using vcron.</comment> ></pre> > > <p>For more information on starting programs and daemons at startup, see the > <uri > link="/doc/en/rc-scripts.xml">rc-script guide</uri> > > .</p> > </body> > </section> > </chapter> > > <chapter> > <title>Installing miscellaneous necessary packages</title> > > <section> > <body> > <p>If you need rp-pppoe to connect to the net, be aware that at this point it has not been installed. It would be the good time to do it.</p> > ><pre > caption="Installing rp-pppoe"> ># <c>USE="-X" emerge rp-pppoe</c> ></pre> > > <note>The > <i>USE="-X"</i> > > prevents pppoe from installing its optional X interface, which is a good thing, because X and its dependencies would also be emerged. You can always recompile > <i>rp-pppoe</i> > > with X support later.</note> > > <note>Please note that the rp-pppoe is built but not configured. You will have to do it again using > <c>adsl-setup</c> > > when you boot into your Gentoo system for the first time.</note> > > <p>You may need to install some additional packages in the Portage tree if you are using any optional features like XFS, ReiserFS or LVM. If you're using XFS, you should emerge the > <c>xfsprogs</c> > > package:</p> > ><pre > caption="Emerging Filesystem Tools"> ># <c>emerge sys-apps/xfsprogs</c> ><comment>If you would like to use ReiserFS, you should emerge the ReiserFS tools: </comment> ># <c>emerge sys-apps/reiserfsprogs</c> ><comment>If you would like to use JFS, you should emerge the JFS tools: </comment> ># <c>emerge jfsutils</c> ><comment>If you're using LVM, you should emerge the <c>lvm-user</c> package: </comment> ># <c>emerge sys-apps/lvm-user</c> ></pre> > > <p>If you're a laptop user and wish to use your PCMCIA slots on your first real reboot, you will want to make sure you install the > <i>pcmcia-cs</i> > > package.</p> > ><pre > caption="Emerging PCMCIA-cs"> ># <c>emerge sys-apps/pcmcia-cs</c> ></pre> > > <warn>You will have to re-emerge > <i>pcmcia-cs</i> > > after installation to get PCMCIA to work.</warn> > </body> > </section> > </chapter> > > <chapter> > <title>Modifying /etc/fstab for your machine</title> > > <section> > <body> > <p>Your Gentoo Linux system is almost ready for use. All we need to do now is configure a few important system files and install the boot loader. The first file we need to configure is > <path>/etc/fstab</path> > > . Remember that you should use the > <c>notail</c> > > option for your boot partition if you chose to create a ReiserFS filesystem on it. Remember to specify > <c>ext2</c> > > , > <c>ext3</c> > > or > <c>reiserfs</c> > > filesystem types as appropriate.</p> > > <p>Use something like the > <path>/etc/fstab</path> > > listed below, but of course be sure to replace "BOOT", "ROOT" and "SWAP" with the actual block devices you are using (such as > <c>hda1</c> > > , etc.)</p> > ><pre > caption="Editing fstab"> ><comment># /etc/fstab: static file system information. ># ># noatime turns off atimes for increased performance (atimes normally aren't ># needed; notail increases performance of ReiserFS (at the expense of storage ># efficiency). It is safe to drop the noatime options if you want and to ># switch between notail and tail freely. > ># <fs> <mount point> <type> <opts> <dump/pass> > ># NOTE: If your BOOT partition is ReiserFS, add the notail option to opts. ></comment> >/dev/BOOT /boot ext2 noauto,noatime 1 2 >/dev/ROOT / ext3 noatime 0 1 >/dev/SWAP none swap sw 0 0 >/dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 >proc /proc proc defaults 0 0 ></pre> > > <p>A more detailed explanation of fstab can be found at <uri link="http://www.oreilly.com/catalog/debian/chapter/book/ch07_02.html">O'Reilly.com.</uri></p> > > <p>The Dump flag specifies whether the dump command will create a backup of the filesystem. Filesystems with no value or a value of zero will not be dumped.</p> > > <p>The Pass number specifies the <e>order</e> in which filesystems are checked at boot time. No value or a value of zero specifies that the filesystem will not be checked.</p> > > > <warn>Please notice that > <i>/boot</i> > > is NOT mounted at boot time. This is to protect the data in > <i>/boot</i> > > from corruption. If you need to access > <i>/boot</i> > > , please mount it!</warn> > </body> > </section> > </chapter> > > <chapter> > <title>Setting the Root Password</title> > > <section> > <body> > <p>Before you forget, set the root password by typing:</p> > ><pre > caption="Setting the root Password"> ># <c>passwd</c> ></pre> > > <p>You will also want to add a non-root user for everyday use. Please consult the > <uri > link="http://www.gentoo.org/doc/en/faq.xml">Gentoo FAQ</uri> > > .</p> > </body> > </section> > </chapter> > > <chapter> > <title>Setting your Hostname</title> > > <section> > <body> > <p>Edit > <path>/etc/hostname</path> > > so that it contains your hostname on a single line, i.e. > <c>mymachine</c> > > .</p> > ><pre > caption="Configuring Hostname"> ># <i>echo mymachine > /etc/hostname</i> ></pre> > > <p>Then edit > <path>/etc/dnsdomainname</path> > > so that it contains your DNS domainname, i.e. > <c>mydomain.com</c> > > .</p> > ><pre > caption="Configuring Domainname"> ># <i>echo mydomain.com > /etc/dnsdomainname</i> ></pre> > > <p>If you have a NIS domain, you should set it in > <path>/etc/nisdomainname</path> > > .</p> > ><pre > caption="Configuring NIS Domainname"> ># <i>echo nis.mydomain.com > /etc/nisdomainname</i> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Modifying /etc/hosts</title> > > <section> > <body> > <p>This file contains a list of IP addresses and their associated hostnames. It is used by the system to resolve the IP addresses of any hostnames that may not be in your nameservers. Here is a template for this file:</p> > ><pre > caption="Hosts Template"> >127.0.0.1 localhost ><comment># the next line contains your IP for your local LAN, and your associated machine name</comment> >192.168.1.1 mymachine.mydomain.com mymachine ></pre> > > <note>If you are on a DHCP network, it might be helpful to set > <i>localhost</i> > > to your machine's actual hostname. This will help GNOME and many other programs in name resolution.</note> > </body> > </section> > </chapter> > > <chapter> > <title>Final Network Configuration</title> > > <section> > <body> > <p>Add the names of any modules that are necessary for the proper functioning of your system to > <path>/etc/modules.autoload</path> > > file (you can also add any options you need to the same line.) When Gentoo Linux boots, these modules will be automatically loaded. Of particular importance is your ethernet card module, if you happened to compile it as a module:</p> > ><pre > caption="/etc/modules.autoload"> ><comment>This is assuming that you are using a 3com card. >Check ><path>/lib/modules/`uname -r`/kernel/drivers/net</path> > for your card. </comment> >3c59x ></pre> > > <p>Edit the > <path>/etc/conf.d/net</path> > > script to get your network configured for your first boot:</p> > ><pre > caption="Boot time Network Configuration"> ># <c>nano -w /etc/conf.d/net</c> ># <c>rc-update add net.eth0 default</c> ></pre> > > <p>If you have multiple network cards or tokenring interfaces, you need to create additional > <path>net.eth > <comment>x</comment> > </path> > > or > <path>net.tr > <comment>x</comment> > </path> > > scripts respectively for each one ( > <comment>x</comment> > > = 1, 2, ...):</p> > ><pre > caption="Multiple Network Interfaces"> ># <c>cd /etc/init.d</c> ># <c>cp net.eth0 net.eth <comment>x</comment></c> ># <c>rc-update add net.eth<comment>x</comment> default</c> ></pre> > > <p>If you have a PCMCIA card installed, have a quick look into > <path>/etc/init.d/pcmcia</path> > > to verify that things seem all right for your setup, then add this line to the top of > <path>/etc/init.d/net.ethx</path> > > :</p> > ><pre > caption="PCMCIA depend in /etc/init.d/net.ethx"> >depend() { > need pcmcia >} ></pre> > > <p>This makes sure that the PCMCIA drivers are autoloaded whenever your network is loaded.</p> > </body> > </section> > </chapter> > > <chapter> > <title>Final steps: Configure Basic Settings (including the international keymap setting)</title> > > <section> > <body> ><pre > caption="Basic Configuration"> ># <c>nano -w /etc/rc.conf</c> ></pre> > > <p>Follow the directions in the file to configure the basic settings. All users will want to make sure that > <c>CLOCK</c> > > is set to his/her liking. International keyboard users will want to set the > <c>KEYMAP</c> > > variable (browse > <path>/usr/share/keymaps</path> > > to see the various possibilities).</p> > </body> > </section> > </chapter> > > <chapter> > <title>Configure SILO Bootloader</title> > > <section> > <body> > <p>If you haven't setup SILO on this disk and you want to boot from it:</p> > ><pre caption="Emerge and configure SILO"> ># <i>emerge silo</i> ># <i>nano /etc/silo.conf</i> ># <i>silo</i> ></pre> > </body> > </section> > </chapter> > > <chapter> > <title>Installation Complete!</title> > > <section> > <body> > <p>Now, Gentoo Linux is installed. The only remaining step is to update necessary configuration files, exit the chrooted shell, safely unmount your partitions and reboot the system:</p> > ><pre caption="Rebooting the System"> ># <c>etc-update</c> ># <c>exit</c> ><comment>(This exits the chrooted shell; you can also type <c>^D</c>)</comment> ># <c>cd / </c> ># <c>umount /mnt/gentoo/boot</c> ># <c>umount /mnt/gentoo/proc</c> ># <c>umount /mnt/gentoo</c> ># <c>reboot</c> ></pre> > > <note>After rebooting, it is a good idea to run the > <c>update-modules</c> > > command to create the > <path>/etc/modules.conf</path> > > file. Instead of modifying this file directly, you should generally make changes to the files in > <path>/etc/modules.d</path> > > .</note> > > <impo>Remember if you are running hardware RAID, you must use the bootdisk for the first reboot. then go back and install grub the way everyone else did the first time. You are done -- congratulations!</impo> > > <p>If you have any questions or would like to get involved with Gentoo Linux development, consider joining our gentoo-user and gentoo-dev mailing lists (more information on our > <uri > link="http://www.gentoo.org/main/en/lists.xml">mailing lists</uri> > > page). We also have a handy > <uri > link="http://www.gentoo.org/doc/en/desktop.xml">Desktop configuration guide</uri> > > that will help you to continue configuring your new Gentoo Linux system, and a useful > <uri > link="http://www.gentoo.org/doc/en/portage-user.xml">Portage user guide</uri> > to help familiarize you with Portage basics. You can find the rest of the Gentoo Documentation > <uri link="http://www.gentoo.org/main/en/docs.xml">here</uri>. If you have any other questions involving installation or anything for that matter, please check the Gentoo Linux > <uri > link="http://www.gentoo.org/doc/en/faq.xml">FAQ</uri>. Enjoy and welcome to Gentoo Linux!</p> > </body> > </section> > </chapter> ></guide> >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 10878
:
13305
|
13311
|
13372
|
13606
|
13775
|
13963
|
13966
|
14050