Installing Linux with Reiserfs and Wireless on a Dell Inspiron 4000
[Editor's note: I wrote this a long time ago, but people still stumble upon this old document via search engines and the like. I'm moving it into my blog so it's still useful to those with old hardware. Things have probably changed at this point, so reader beware...]
I recently purchased a Dell Inspiron 4000 laptop, with the built-in wireless Ethernet for use at School, where they deployed wireless Ethernet across campus in the summer of 2001. The vital stats on the laptop:
- Pentium III 900MHz
- 1400×1050 SXGA+ 14.1″ Display
- 30GB hard drive
- Dell TrueMobile 1150 Mini-PCI wireless Ethernet controller
- 512MB RAM
- Dual 53 WHr batteries
- 8X Max variable DVD drive
- PCMCIA Modem and Ethernet controllers
The system is a dream to use, but getting it set up was, to put it nicely, a bear to accomplish. I’m documenting it here in hopes that someone else will have less pain that I did in getting everything running.
First off, if you want a nice, stable, easy-to-install system, you need only make two changes: Don’t use reiserfs and have access to a readily-supported Ethernet card. At the time of installing my system, I didn’t have my PCMCIA Ethernet card (ordered separately from Dell to save money), so all I had was the CD-ROM, floppy drive, and a wireless card that’s generally not supported in install kernels for Linux.
Note that this is all being documented after the fact, and it’s likely I’m missing a step here and there. Regardless, the hints I’ve got should cover the salient details, and if you know what you’re doing with Linux, it should be sufficient to get everything installed. If you’re a newbie, please don’t try these instructions without expecting breakage. Have a Linux Guru available to help out if things don’t go so well. If you’re stumped, you can always email me, but I can’t guarantee I’ll be able to fix your problems, much less even reply.
Battle Plan
When all is said and done, my goal was a Win2k and Debian unstable dual boot system, running reiserfs for all Linux partitions, and fully supporting the wireless Ethernet access on both systems. It should also contain a FAT32 partition, so that I could have read/write access to a common set of files between Win2k and Linux. Ideally I would also have a small rescue partition for Linux installed, which ran completely independently of the main Linux partition and could be used for system recovery.
The main complications I had in setting everything up was that I didn’t have a Debian installation CD. However, it wouldn’t have helped much, because Debian has yet to support reiserfs in the installation routines, and the kernel included in the current stable Debian distribution (2.2 – which is what would be on CD) doesn’t contain support for the wireless Ethernet controller, which makes upgrading to unstable virtually impossible, since I couldn’t even download a more recent kernel and recompile.
Install Windows 2000
As much as I hate Windows, the installation of Windows 2000 went relatively smoothly. I wiped the default Windows Millennium Edition from the computer, deleted the partition, and booted off of Win2k boot disks. After feeding it the four disks, I created a 6GB NTFS partition for Win2k to live in, and installed the operating system.
After the install, the wireless Ethernet wasn’t working, because the driver support isn’t built-in. No worries; pop in the “Drivers and Utilities” CD that the system comes with, and from the web pages you can choose to install the TrueMobile 1150 Client Manager. A reboot later wireless was working.
Installing the rest of Win2k is a rather boring process of installing various programs and security patches from Windows Update, with a million and one reboots to go along with it. I won’t detail the tedium here.
One important item to take into consideration once Win2k is up-and-running is to create a FAT32 partition for moving files back and forth between Linux and Windows. Since I didn’t expect to have network access in the beginning, it was crucial that I had this to download things in Windows and then bring them over to Linux. For reasons I’ll get into later, dedicate at least 1.5 gigs to this purpose.
Preparing for Linux
After searching around, I found a set of modified boot-floppies for Debian that support reiserfs. Download and these 3 disks, then use the favorite utility of your choice to write them to a floppy disk, and download the base2_2.tgz file to your shared FAT32 partition.
Installing the base system in this fashion gives you what is normally a system functional enough to connect to the Internet and download the rest of Debian (be it the stable, testing, or unstable distribution). However, we won’t have a working Internet connection unless we upgrade to the 2.4 series kernels, which entails upgrading the kernel and installing a more recent version of the PCMCIA card services.
To get around this, I needed a system capable of recompiling a recent kernel and PCMCIA card services, which is only available with a fair chunk of the binary CD installed. The solution: download the ISO image of the binary CD, and use a loopback file system to mount the CD during the install process and install from a local file system. This is why we made the shared FAT32 partition so big. While you’re using Windows, go ahead and download the latest Linux Kernel and the latest version of the PCMCIA Card Services.
Note that installing Debian over a network is not only slower and time-consuming than installing directly from a CD, but it also puts a strain on the download servers. If you’re going to download the ISO image as I did to use via a loop back file system or to burn, please use the Pseudo-Image Kit to download the images. It’s nicer on the servers, and works well resuming failed download attempts.
Booting the Linux Install
Go ahead and boot from the fresh copies of the reiserfs boot floppy, and follow the prompts. You should be able to get past the partitioning, reiserfs initialization, etc. without much difficulty.
The first trick comes at the main install. You’ll need to escape out to a command prompt by hitting Alt-F2 on the keyboard. Make directories for the FAT32 partition and the CD ISO image, and mount them:
# mkdir /mnt/shared# mkdir /mnt/cdiso # mount /dev/hda2 /mnt/shared # mount -o loop /mnt/shared/binary-i386-1.iso /mnt/cdiso
Now go ahead and switch back to the install program by pressing Alt-F1, and then continue along with the install, pointing it to a file system install rooted in /mnt/cdiso.
At this point in time, the files you’ll be installing this way are nowhere near up-to-date if you’re eventually going to be running testing or unstable. You should only install the packages you deem absolutely necessary (mainly compiler and development tools necessary for recompiling the kernel, plus perhaps a few tools like vi or emacs). Later on you’ll have to re-download more recent versions of all these tools, so don’t go installing XWindows and GNOME already.
Working With the Non-Internet Wireless System
Now you should have a somewhat-function system booting reiserfs, but still unable to get on the network. Ick. Your next step is to get the wireless up and running.
The TrueMobile 1150 Mini-PCI card is actually a re-badged product from Lucent. The best documentation about Wireless support in Linux was here, but beware that at times it’s outdated or just completely wrong. In our case, the page says the driver doesn’t support the USB or Mini-PCI versions. I’m typing in a remote window right now, and there are no wires coming out of my laptop.
That said, we’ll need to compile in support for “Hermes support (Orinoco/WavelanIEEE/PrismII/Symbol 802.11b cards)” also known as CONFIG_PCMCIA_HERMES and CONFIG_NET_RADIO into the kernel. To do this, copy mount your shared FAT32 partition if necessary, untar/gzip the kernel, and follow the normally kernel compilation instructions. Don’t forget to also install reiserfs support built-in to the kernel (not as a module, otherwise you’ll get a kernel panic mounting the root file system).
Next, install PCMCIA card services. Extract the tar.gz file from your shared partition into /usr/src, and then run the following commands:
# make config# make all # make install
The only funny thing that happened to me in doing this was the the modules didn’t end up in the right place – I actual wireless modules compiled in the kernel end up in /lib/modules/2.4.x/kernel/drivers/net/pcmcia, when the card services want them in /lib/modules/2.4.x/pcmcia. Copy them there and it won’t hurt anything.
Next, you need to copy the file hermes.conf into your /etc/pcmcia directory. This will allow the PCMCIA card services to recognize the card (which to Linux appears to be just another PCMCIA card, in slot 2), and load the appropriate module to configure it.
Reboot With the New (Wireless) Kernel
At this point you should be able to reboot using your new kernel. Don’t forget to lilo, grub, use the boot disk, or whatever other method you decided to use to boot from the new kernel. When it starts up, you should hear two high-pitched beeps as the PCMCIA card services start up – the first notes the presence of the card, and the second notes it being successfully configured.
If you hear nothing at all, your PCMCIA card services aren’t installed correctly. Go read the PCMCIA HOW-TO and figure out where you went wrong. If you hear a high beep followed by a low beep, the card was found but not properly configured. You should look at the contents of /var/log for recent messages to see what went wrong, as well as the output of the dmesg command to see if anything obvious went wrong. If you compiled the support as a module, is it loaded?
At this point, you should be able to use ifconfig to configure the eth0 interface now, or use a dhcp client. (With the 2.2 version of Debian you should have installed at this point, dhcpcd should be the command to run, if you’ve installed that package.) Now you should have working Internet access.
Upgrading to Debian Unstable
Finally, you can install some real software! To upgrade to Debian’s unstable distribution (which is far from unstable, especially compared to Windows), simply remove the current uncommented line from /etc/apt/sources.list and add the following lines:
deb http://http.us.debian.org/debian unstable main contrib non-freedeb http://non-us.debian.org/debian-non-US unstable/non-US main contrib non-free
Run apt-get update; apt-get dist-upgrade
to upgrade to unstable. Go ahead and install whatever other software you’d like now.
Getting XFree86 Working If you’re following these instructions, be absolutely sure that you have an SXGA+ display, running at 1400×1050 – this will not work for the cheaper models running at 1024×768!
When I installed XFree86, it didn’t work properly by default. The default Debian install wouldn’t even run, and when I used the new auto-configuration option built into the new XFree86 4.0 and above, it would corrupt the display, leaving the computer is a state where the best I could do was type “reboot” as root to safely shutdown and restart, and try again. Eventually I stumbled across a page (now lost, sorry) that had a German XF86Config-4 file that worked, if you like German. I didn’t so a bit of hacking got me to this file. If you want to integrate it into your own pre-existing XF86Config file, the most important line is probably “Modeline “1400×1050″ 108.000 1400 1448 1462 1688 1050 1050 1053 1066″ in the Monitor section.
Note that I’ve still yet to get the display corruption on return to text mode fixed. This is okay with me, however, because I always run XWindows. Logging in and out resets the display properly, so as long as I stay in a graphics mode (or never load X if I need a text console for system repair, etc.) then I’m fine.
Getting the Mouse Working
The touchpad built-in works through gpm, the console mouse server. To run in XWindows, I have it set to repeat the commands to X. I set the type to “imps2″ and the repeat_type to “raw”, and it works beautifully.
Until you suspend, that is. After resuming from a suspend-to-RAM, it doesn’t work anymore – it’s like the mouse protocol is all messed up again. To solve this, I whipped up a quick script gpm that I put in /etc/apm/event.d/, and that fixed all those problems.
That’s all!
Hopefully you should have a pretty happy setup at this point. If you’re having issues, ask your resident Linux Guru, or failing that, I’ll try to help. Enjoy wireless Linux!