<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Juju: Installing Gentoo x86_64</title>
    <link>http://juju.org/articles/2005/01/09/installing-gentoo-x86_64</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Sufficiently Advanced Technology</description>
    <item>
      <title>Installing Gentoo x86_64</title>
      <description>&lt;p&gt;I just spent the better part of the weekend trying to get Gentoo installed on my new-ish computer.  I wanted to try out a good 64bit OS.  (WindowsXP64 beta being a nightmare)  I primarily use Mandrake at work, but I read Mandrake wasn't that great on amd64. (note: I like Mandrake, so sue me.  I wouldn't exactly call myself a linux guru, but I have been using it for over 10 years (woah, has it been that long) since the days of downloading slackware disks off a BBS)  Fedora installed relatively easily, but I wasn't too impressed with it.  I'd played with Gentoo in the past and I really missed it, unfortunately despite Gentoo's awesome documentation I had a hell of a time getting it to install on this system (the LiveCD didn't detect the sata hard drive or the onboard nic).  Right now I'm sitting happily in a super fast (glxgears running at a whopping 13,900 fps! -that wasn't a typo) slick Gnome desktop while emerge --update world compiles in the background.  I wanted to write it all down for my own records before I forget what I had to do to get it working.  Here's a basic rundown of my system:&lt;/p&gt;

&lt;p&gt;MSI K8N Neo Platinum Motherboard (NFORCE3-250)
AMD Athlon 64 3200+
Western Digital 10,000RPM 74gig Serial ATA (WDC WD740GD-00FL)
nVIDIA GeForce 6800
1gig ram&lt;/p&gt;

&lt;p&gt;&lt;!--more--&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;First, we'll get the install to see the drives, etc and get the right kernel options going...&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;The first two major problems were getting the damn thing to see the hard drives and the nic.  The modules required are sata&lt;em&gt;nv and forcedeth (for the nic).  However Gentoo wasn't smart enough to do that automatically.  Most resources I found said to just run "modprobe sata&lt;/em&gt;nv" and "modprobe forcedeth", however these commands would just lock up.  Finally I found that when you boot the livecd you have to type "gentoo noapic" at the boot prompt.  Once I did that, I was able to load those modules with modprobe.&lt;/p&gt;

&lt;p&gt;So then I went about installing Gentoo, decided to use the universal live cd and just go with a stage3 install so I wouldn't have to compile everything.  The next mistake I made was using the genkernal option to compile my kernel.  Doing that means linux will not be able to see the sata drive because you have to compile the sata_nv into the kernel and not as a module.  So you have to compile the kernel manually and enable the following options (into the kernal not as modules, I decided to compile the nic in as well, but that could be a module if you want):&lt;/p&gt;

&lt;p&gt;cd /usr/src/linux
mv .config .config-old
make clean
make menuconfig&lt;/p&gt;

&lt;p&gt;Device Drivers -&gt;&lt;/p&gt;

&lt;p&gt;SCSI device support -&gt;
  SCSI low level drivers -&gt;
    &amp;lt; *&gt; Serial ATA (SATA) support
    &amp;lt; *&gt; NVIDIA SATA support&lt;/p&gt;

&lt;p&gt;Networking support -&gt;
    [*] Network device support
    Ethernet (10 or 100Mbit) -&gt;
      &amp;lt; *&gt; Reverse Engineered nForce Ethernet support (EXPERIMENTAL)&lt;/p&gt;

&lt;p&gt;Turn on sound card support, but don't enable anything under Advanced Linux Sound Architecture or Open Sound System. (we'll be using gentoo's alsa-driver package later)&lt;/p&gt;

&lt;p&gt;Sound -&gt;
    &lt;m&gt; Sound card support&lt;/p&gt;

&lt;p&gt;I haven't actually tried this with anything yet, but the board has it...&lt;/p&gt;

&lt;p&gt;IEEE 1394 (FireWire) support -&gt; 
    &amp;lt; *&gt; IEEE 1394 (FireWire) support&lt;/p&gt;

&lt;p&gt;I haven't been able to get the fancy frame buffer console working though, I keep getting vesafb0 error -6 even though I enabled the following...&lt;/p&gt;

&lt;p&gt;Graphics support -&gt; 
    &amp;lt; *&gt; VESA VGA graphics support
    Console display driver support  ---&gt;
      [*]   Video mode selection support
      &amp;lt; *&gt; Framebuffer Console support&lt;/p&gt;

&lt;p&gt;Apparently Gentoo complains unless you enable devfs under...&lt;/p&gt;

&lt;p&gt;File systems -&gt;
  Pseudo filesystems -&gt;
    [*] /dev file system support (OBSOLETE)&lt;/p&gt;

&lt;p&gt;Also make sure you have ext2 and ext3 enabled, but I think that was on by default and I removed reiserfs.  I'm pretty sure that was everything.  Finally, compile your kernel.  (one nice thing about doing your kernel manually is that it compiles a LOT faster then genkernel since you're only doing the bare minimum, boots faster too)&lt;/p&gt;

&lt;p&gt;make &amp;amp;&amp;amp; make modules_install
mount /boot (note: I decided to go with basic suggestion of having a seperate boot partition)
cp arch/x86_64/boot/bzImage /boot/kernel-2.6.9-custom
vim /boot/grub/grub.conf (can't believe base gentoo doesn't come with vim, so emerge vim first, stupid nano)&lt;/p&gt;

&lt;p&gt;Put the following in grub.conf, note! the noapic option.  Here's my partition scheme:&lt;/p&gt;

&lt;p&gt;/dev/sda1 = windows xp
/dev/sda2 = /boot
/dev/sda3 = swap
/dev/sda4 = /&lt;/p&gt;

&lt;pre&gt;default 0
timeout 30
splashimage=(hd0,1)/grub/splash.xpm.gz

title=Gentoo 2.6.9
root (hd0,1)
kernel /kernel-2.6.9-custom root=/dev/sda4 noapic

title=Windows XP
rootnoverify (hd0,0)
makeactive
chainloader +1&lt;/pre&gt;

&lt;p&gt;&lt;b&gt;Next, we'll get that sweet Geforce 6800 working with xorg-x11...&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;This was a lot easier, but I still ran into a hell of a problem getting the damn acceleration working.  I also found a &lt;a href="http://forums.gentoo.org/viewtopic.php?t=272230"&gt;neat thread&lt;/a&gt; on the forums that increased my glxgears fps test from about 8,000 fps to almost 14,000.&lt;/p&gt;

&lt;p&gt;emerge nvidia-kernel
emerge nvidia-glx&lt;/p&gt;

&lt;p&gt;Add a line that says "nvidia" to /etc/modules.autoload.d/kernel-2.6.  And run "modules-update".  Then run "modprobe nvidia".&lt;/p&gt;

&lt;p&gt;Edit /etc/modules.d/nvidia and uncomment the line that says:
options nvidia NVreg&lt;em&gt;EnableAGPSBA=1 NVreg&lt;/em&gt;EnableAGPFW=1&lt;/p&gt;

&lt;p&gt;xorgconfig made an xorg.conf that loaded fine, but glxinfo would complain about "Error: couldn't find RGB GLX visual".  Turns out it requires you to add a DefaultDepth of at least 16 in the Screen section of /etc/X11/xorg.conf.  Here's a snip of the changed settings I made and what I did to get the scroll wheel on my intellimouse to work:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Section "Device"  Identifier  "Card0"
  Driver      "nvidia"
  VendorName  "nVidia Corporation"
  BoardName   "Unknown Board"
  BusID       "PCI:1:0:0"&lt;/p&gt;

&lt;p&gt;Option "NvAGP" "2"
  Option "NoLogo" "true"
  Option "RenderAccel" "true"
  Screen 0
EndSection&lt;/p&gt;

&lt;p&gt;Section "Screen"
  Identifier "Screen0"
  Device     "Card0"
  Monitor    "Monitor0"
  DefaultDepth 16
  SubSection "Display"
    Depth     16
    Modes "1280x1024" "1024x768" "800x600" "640x480"
  EndSubSection
EndSection&lt;/p&gt;

&lt;p&gt;Section "InputDevice"
  Identifier  "Mouse0"
  Driver      "mouse"
  Option      "Protocol" "auto"
  Option      "Device" "/dev/mouse"
  Option      "Buttons" "5"
  Option      "ZAxisMapping" "4 5"
EndSection&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;b&gt;Now to get sound working...&lt;/b&gt;&lt;/p&gt;

&lt;p&gt;I basically just followed the Gentoo &lt;a href="http://www.gentoo.org/doc/en/alsa-guide.xml"&gt;alsa docs&lt;/a&gt;.  The built in sound on this motherboard is an intel8x0.&lt;/p&gt;

&lt;p&gt;In /etc/make.conf add alsa and oss to your USE.  Also add a line that says:
ALSA_CARDS="intel8x0"&lt;/p&gt;

&lt;p&gt;emerge alsa-driver
emerge alsa-oss
emerge alsa-utils&lt;/p&gt;

&lt;p&gt;Add the following two lines to /etc/modules.d/alsa:&lt;/p&gt;

&lt;p&gt;alias snd-card-0 snd-intel8x0
alias sound-slot-0 snd-card-0&lt;/p&gt;

&lt;p&gt;Run the following commands:&lt;/p&gt;

&lt;p&gt;rc-update add alsasound boot
/etc/init.d/alsasound start
amixer set Master 100 unmute
amixer set PCM 100 unmute
amixer set Center 100 unmute
amixer set Surround 100 unmute&lt;/p&gt;</description>
      <pubDate>Sun, 09 Jan 2005 20:44:13 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:1eeac79756813d0c4abb03db1e03bc0b</guid>
      <author>Tony Buser</author>
      <link>http://juju.org/articles/2005/01/09/installing-gentoo-x86_64</link>
      <category>Linux</category>
      <trackback:ping>http://juju.org/articles/trackback/324</trackback:ping>
    </item>
  </channel>
</rss>
