Installing Gentoo on a Dell Inspiron 5100 (July 29 - Aug 4, 2004)
Using the 2004.1 LiveCD; kernel gentoo-dev-sources 2.6.7-r11
Dual boot with Windows XP Home (already installed).

By Daniel Pixley
danpixley at cox dott net.

Table of Contents:

1. Preperation for dual booting
2. Starting Installation
3. Kernel Config
4. Video Card
5. Sound
6. Ethernet
7. Wireless
8. Airsnort and Kismet
9. Special Thanks
10. Resources

Preparation for dual booting:

My Inspiron 5100 came with a "Dell Utility", which was installed on a seperate partition at the beginning of the drive. This partition messed with my dual booting as Windows XP requires itself to be installed on the first partition/drive. So I just got rid of the Dell Utility and merged its partition with the NTFS partition.

Keep in mind that although it is possible to install Linux first, and then Windows second, it is generally easier to install Windows first. There are also various tricks you can do dual booting with Windows XP on a second hardrive (search the Gentoo forums), which is nice to do since Windows constantly has to be reinstalled. For me though, I rarely use my Windows XP partition except as a last resort, so I don't plan on having to reinstall it very often.

After installing Windows XP, I used Partition Magic 8 to make a second empty partition. You can also use DOS Fdisk during the Windows XP installation to create a single empty partition for Gentoo Linux. The easiest thing to do is to put Windows on the first partition. During the Gentoo installation, I used (Linux) fdisk to split up the empty partition further for my Gentoo installation (the Gentoo Installaltion Guide walks you through using fdisk, but not generally dual booting). These are just basic dual booting technics here.

(Update Aug 29, 2004)
I installed Grub as follows. Keep in mind that the actual installation and setup of Grub isn't until the end of the Gentoo installation process.

# grub
grub> root (hd0,2)
grub> setup (hd0)

/boot/grub/grub.conf looks like this:

default 0
timeout 30
splashimage=(hd0,2)/boot/grub/splash.xpm.gz

title=Gentoo Linux
        root (hd0,2)
        kernel /boot/gentoo-dev-sources-2.6.7-r11 root=/dev/hdc3

title=Windows XP
        rootnoverify (hd0,0)
        chainloader +1

Note: Do not run Grub's setup command with (hd0,0). This will erase important filesystem information on your Windows partition! Running the setup command with (hd0) will install Grub on the MBR of the first hard disk, which is usually what you want.

See the installation section of the Grub Manual for more information on how to install Grub.

Starting Intallation:

I attached an internet connection via the NIC rather than trying to go for a wireless installation. Gentoo did not automatically load the NIC driver (Broadcom 440x 10/100 Integrated Controller). Booting with kernel option smp at the boot prompt solved this. There was no need to run net-setup, dhcpcd eth0, or modprobe drivers at this point. Update 02/05/2004: the 2004.3 Minimal LiveCD loaded my NIC driver without having to load a special kernel or anything. Internet access was instant.

I downloaded the x86/2004.2/stages/pentium4/stage2-gentoo tar package. This 41 MB file took around 2 hours to download with a home cable modem connection.

/dev/hda resolved to the CD-ROM drive, not the hardrive. The hardrive resolved to /dev/hdc. In fdisk, hda reported to be only a 706 MB drive, which I thought was very strange until I realized it was calculating the size of the LiveCD in my CD-ROM. While rebooting, I noticed the kernel messages as it initialized my hardware, and saw that it was mapping hda to the CD-ROM, and hdc to the hardrive. This may be due to my BIOS settings. I have my CD-ROM booting first. In the BIOS notes, there is a warning that "disk drive letters may change if this setting is modified." Whatever, it works. : )

Layout of my partitions (fdisk -l):

/dev/hdc1  *    1 	1280	14000MB	7	HPFS/NTFS
/dev/hdc2	1281	1366	700MB	83	Linux swap
/dev/hdc3	1367	3648	18000MB	83	Linux

Kernel Config:

(Update Aug 29, 2004)
I've uploaded a copy of my kernel config, which can be found here. Be warned that some of the options in my config may be extraneous. If you spot something that probably should not be there, please email me (danpixley at cox dott net) and let me know. This is my complete kernel config after all of the tweaking listed in this document. Also, I tend to compile options into the kernel, rather than going modular.

Video card:

To get the ATI Radeon 7500 working, I just followed these instructions:

(Update Nov 1, 2004)
My Radeon 7500 Mobility card now supports DRI and DRM, and is getting almost double the fps I was getting before. I went up from 500 to about 800 according to glxgears -info. See the third link in this list for more info.

http://www.gentoo.org/doc/en/ati-faq.xml (use the r100 instructions).
http://www.gentoo.org/doc/en/xorg-config.xml
More info on configuring Xorg.conf for Radeon 7500 Mobility.

Configuring my video card and X Window goes hand in hand as far as I can tell. My xorg.conf file is located here, which was generated by xorgconfig as per the Gentoo xorg tutorial, and later tweaked according to configurations suggested in the third link above.

Sound:

I followed the Gentoo ALSA guide at

http://www.gentoo.org/doc/en/alsa-guide.xml

The driver I used is selected in the kernel 2.6.7 config as:

Device Drivers > Sound > Advanced Linux Sound Architecture > PCI Devices > Intel i8x0/MX440 SiS 7012

After following the ALSA guide above, I then emerged gnome-alsamixer (use this instead of gnome-mixer as of this writing), and updated my gst-plugins-alsa package to version 0.8.2-r1. There is a problem in Gnome 2.6 and my ALSA setup; the Gnome Volume Control does not change the volume. The sound works, but the Gnome Volume Control icon reports the error, 'Couldn't open mixer device /dev/sound/mixer'. You can use the gnome-alsamixer application instead to control volume from the desktop. Delete the default Gnome Volume Control icon from the desktop panel, and add the gnome-alsamixer icon, which should appear in the menu under 'Multimedia'. There is a thread on the Gentoo forums that contains other information regarding this little annoyance:

http://forums.gentoo.org/viewtopic.php?t=157347&highlight=gnome+open+mixer+device

Ethernet:

Entered these kernel configurations as per Peter Ton, :

Network device support  --->
  Ethernet (10 or 100Mbit)  --->
    [*] Ethernet (10 or 100Mbit)
    [*]   EISA, VLB, PCI and on board controllers
    [*]     Broadcom 4400 ethernet support (EXPERIMENTAL)

Wireless:

I bought a well-known Linux-friendly card, the Netgear WG511 wireless b/g PCMCIA card that works with the prism54 drivers. The drivers are already built into the 2.6.5+ kernel, so there is no need to download them from prism54.org if you have this kernel or higher. As far as I know, the drivers for the Broadcom TM1400 chipset do not work in monitor mode, and therefore do not work with Kismet or Airsnort. If you don't care about this, you can probably get this card working with linuxant proprietary drivers.

I emerged packages pcmcia-cs and hotplug, which were needed to get my card working. Otherwise, I just followed these directions on the gentoo forums:

http://forums.gentoo.org/viewtopic.php?t=177446

Important update for the new Hotplug version 20040923!
You now must place the Prism54 firmware (isl3890) executable into the /lib/firmware directory. If you upgraded to the new Hotplug from the old Hotplug 20040401 ebuild, you must create the new directory and copy the driver.

New users of this guide, create /lib/firmware and copy the isl3890 driver into it. Old users who have upgraded to the new Hotplug, create the /lib/firmware directory, and copy the driver from the old directory (/usr/lib/hotplug/firmware) into the /lib/firmware.

After installing UberLord's script, I editted any instances of eth0 to eth1 in /etc/conf.d/wireless since eth0 is my ethernet NIC.

Important update!
There are new scripts available in baselayout-1.11.0. See The Wireless HOWTO and this forums discussion for more information on the new Uberlord scripts. I have not tried the new scripts out yet, so please don't ask me questions about them. And remember, you do not have to use Uberlord's scripts. There are other implementations listed in the Gentoo forums post on the WG511 card.

After getting the wireless card to work, which is set as eth1 (according to iwconfig), I ran these commands to auto-start my wireless card at boot:

# ln -s /etc/init.d/net.eth0 /etc/init.d/net.eth1
# rc-update del net.eth0
# rc-update add net.eth1 default

I removed my ethernet NIC (net.eth0) because I don't plan on using it much, and at boot time it will hang for a good five minutes while searching for a connection. I can always manually start it with:

# /etc/init.d/net.eth0 start

As per the Gentoo Installation Guide, I created a soft link of net.eth0 to net.eth1, and then added net.eth1 to my start up scripts. The card now starts automatically, and works flawlessly with the MAC address filtering setup on my AP (ifconfig eth1 to find the MAC address, or look on the back of the card itself). WEP encryption will be the next step for semi-securing the AP.

(Update Aug 9, 2004)
I now have WEP encryption set up on a WRT54G Linksys WAP with linksys firmware v2.02.2. For this router, generating a WEP key is very simple. Just log into your router's configuration page via 192.168.1.1, and navigate to the wireless security tab. Enter in a passphrase, and click "Generate". You will get a 10 digit hex key which you will use to connect clients. If you get more than one key from this generation, just pick the first one unless you have reason to do otherwise. Now back on your laptop (assuming you installed UberLord's script), open /etc/conf.d/wireless and scroll down to where the WEP keys are defined. Make an entry:

key_YOURAPSSID="HEXKEY enc open"

For example, if your SSID is linksys (shame on you, change it!), and your hex key is 123ABC456D, the entry would look like: key_linksys="123ABC456D enc open". It is worth noting that I had trouble with the default format, which adds an s: before the hex key. I could get authorized to my AP, but DHCP would not resolve and I could not connect with this format.

Airsnort and Kismet:

Airsnort works right out of the box with this wireless card. Where X equals your ethernet card number in ethX, type:

# ifconfig ethX up
# iwconfig ethX mode monitor

When the Airsnort GUI comes up, select ethX as your card, and other as driver.

Kismet-2004-10.1 emerges easily:

# USE="ncurses" emerge kismet

Edit /etc/kismet.conf to use the prism54g source and set a suiduser while you are there:

source=prism54g,ethX,prism54
suiduser=<your_regular_user>

After that, create a directory where you want to store log files:

# mkdir /home/<your_regular_user>/kismet.logs

Make sure this log directory is owned by <your_regular_user> and has the proper permissions.

Now su to root and type:

# cd /home/<your_regular_user>/kismet.logs 
# kismet 

Have fun sniffing wireless networks!

Special Thanks:

Just a quick shout out to the helpful and brilliant Gentoo community located at the Gentoo forums and IRC channel. I could not have done this without your posts, advice, and hacks. Everything on this site has been basically plagiarized from scattered how to's and tutorials. Thanks a lot, folks.

Resources:

http://www.gentoo.org/doc/en/
http://www.prism54.org
http://prism54.org/forums/viewforum.php?f=24
http://www.linux-on-laptops.com/dell.html
http://www.kismetwireless.net

(This page will be updated as I add more things.)


Home