I adquired a Compaq Armada 4120T on a "second hand" shop and installed Linux on it. I got into some troubles because of some special stuff of the Armada Laptops, so I decided to write this page in order to help people on using this Laptop under Linux.
I started by taking a look at the _great_ Linux on Laptops Page (located on http://www.cs.utexas.edu/users/kharker/linux-laptop/, and the links to another Compaq Armada 4120T users that you can locate on the Laptop Guide. I found there a good guideline to start on, but I discovered some funny things on the way to install Linux on it…
I'll be brief because there is lot of useful info here duplicated from the right links of the Linux Laptops Page, and due to my poor english . This text is written readers having some knowledge about partitions, hardware, how to install Linux, etc.
Compaq Armada 4120T (http://www.compaq.com):
When I bought my 4120T (on 20-10-2000, two weeks ago) I noticed that I couldn't enter the BIOS. After reading lots of USENET posts, and searching at Compaq's Website (http://www.compaq.com) I found that Compaq Laptops do not have a BIOS user interface on an EEPROM. Instead, they have a 4Mb partition with MSDOS installed on it that becames active when you press the F10 key during startup (when the cursor appears on the upper-right corner of the screen).
In my case I had no BIOS partition so I couldn't enter the BIOS. I went to Compaq's Webpage and entered on "Software And Drivers", section "Laptops: Armada Family", subsection "4100 Family" and finally clicked on "Windows 95", as Compaq only gives software for Windows, and as under Windows98 there was no all the software available. I downloaded all the programs on that page for the Compaq 4100 family. Those included a ROM upgrade, a program for changing the Parallel Port mode, another one to reprogram the Custom Keys, Diagnostic Utilities, and … the SETUP PARTITION and DIAGNOSTICS floppy disk. I found too (searching by hand) a PHDISK.EXE program.
My Laptop came with a 1Gb Windows FAT16 partition, that I reduced to 350Mb using Partition Magic (yes, I know I shouldn't use it :). Then I moved the partition up by 4Mb to leave space for the setup partition. After that, I ran the PHDISK.EXE program, that creates a 16-24Mb partition (in my case 24Mb) to flush the RAM in when suspending the Laptop, and save more battery when suspending the system. PHDISK created it at the end of my HDD, and left 4Mb more (for future upgrades?). I'm still not sure if this is needed on my Laptop. If not, please report to me and I'll delete the Hibernation SuspendToDisk partition and use those 24Mb for the /root directory under Linux .
NOTE: I've finally formated that partition as EXT2 and I've mounted it under /root/files (a 24Mb partition where saving the kernel sources on .tar.bz2 and deb files of programs I don't use often), because I've heard that the SuspendToDisk partition is only needed to use the special HYBERNATION function of some O.S. . So really you don't need to run PHDISK to create the SuspendToDisk partition: you can suspend the system normally without that partition. This gives you 16/24 extra MB for the Linux partition.
After that I created both the SETUP and DIAGNOSTICS floppies that allowed me to create the System Partition. Since that moment I can enter into the BIOS-Setup by pressing F10 during startup.
That BIOS partition is /dev/hda1 for Windows' FDISK and /dev/hda3 for Linux's fdisk. Thanks to LILO we can boot to the setup partition directly (I added an entry called "setup" to boot /dev/hda3 and enter the BIOS without using F10).
At this moment I created the Linux native and Linux Swap partitions (650 and 70Mb, respectively). Executing "fdisk /dev/hda -l" outputs something like:
Disk /dev/hda: 64 heads, 63 sectors, 527 cylinders Units = cylinders of 4032 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 3 166 330592+ 6 FAT16 /dev/hda2 * 167 512 697536 5 Extended /dev/hda3 1 2 4000+ 12 Compaq diagnostics /dev/hda4 513 525 26208 a0 IBM Thinkpad hibernation /dev/hda5 167 477 626944+ 83 Linux /dev/hda6 478 512 70528+ 82 Linux swap
At this moment (I did an fdisk /dev/hda, used T to change the ID for hda4, changed it to ext2, and ran mkfs.ext2 /dev/hda4) I have the following:
Disk /dev/hda: 64 heads, 63 sectors, 527 cylinders Units = cylinders of 4032 * 512 bytes Device Boot Start End Blocks Id System /dev/hda1 3 166 330592+ 6 FAT16 /dev/hda2 * 167 512 697536 5 Extended /dev/hda3 1 2 4000+ 12 Compaq diagnostics /dev/hda4 513 525 26208 83 Linux /dev/hda5 167 477 626944+ 83 Linux /dev/hda6 478 512 70528+ 82 Linux swap
I also did a BIOS ROMPAQ update (the same compaq webpage) that took just a few seconds and is supposed to allow me to put big harddrives (up to 8Gb) on my laptop.
I used a ZIP drive attached to the parallel port to copy the Windows 95 OSR2 instalation files to the C: partition, and I deleted all the rest of the HDD stuff (Windows 98 SE used 265 Mb just for the standard install, and 24Mb it's not enought for Win88 to work fine). I installed Windows95 and after that I downloaded from Compaq's web (in the same page than the SETUP and DIAGNOSTIC tools) the Cirrus Logic and Sound Drivers.
It used about 100Mb (plus 50 of the instalation directory) so I still have about 150Mb free, that I've used to install some abandonware (LEGAL) games such as Worms, Lemmings 95, Populous 2, SimCity and so on. Remember that those games are legal as can't be sold anymore. Also I installed funny and small games that use the mouse for playing (I use an external PS2 mouse) because in my ZX-Spectrum times I always broke the O, P, Q, A and SPACE keys due to the use, and I don't want to break this keyboard too just playing. I installed also ZSnes, a SuperNES console emulator (and some of the games I have on my real SuperNES).
I installed GNU/Linux Debian 2.2 (aka Potato) on my computer. I created the 11 base disks plus the 3 drivers disk plus the ROOT and RESCUE disk, all needed to install the Base Debian system. I created them from the Debian Binary 1 CDROM (at dists/potato/main/disks-i386/images-1.44/ or similar) using the dd command (you can also use rawrite for MSDos/Win) in this way:
dd if=file_to_write of=/dev/fd0
(I also tested the floppies by copying 2 floppies and then trying to read them with dd if=/dev/fd0 of=test_file . The need of 2 floppies is Linux's cache; if you copy just one and try to read it, Linux will take it from the cache. Instead, copy two floppies and then test the first one and after that, the last one. This way you'll be aware of broken floppies before starting the installation).
After that just put the RESCUE disk into the floppy drive and restart. Then install Linux as you usually do it (read the Debian documentation at the Debian CDROM if you don't know how to install Linux). This will give you a Debian Linux BASE System of about 25 Megabytes with no X and just the basic packages…
I solved this by connecting an external modem (SupraExpress) to the Laptop, configuring a PPP connection with pppconfig (very easy) and connecting to my ISP. The apt-get command is very useful under Debian, just connect, do an apt-get update, and then you can install the program XXX by writing "apt-get install XXX" and pressing enter. Remember that there are TASK packages used to install lots of packages and their dependencies easily (search them by using apt-cache search task ).
I started to install some task and standard packages (such as task-x-window-system, task-c-dev, and so on) and I've ended (5 hours later) with a fully functional Linux Debian potato including XWindow 3.3.6 with ICEWM and BlackBox Window Managers, WordPerfect 8 for Linux, AbiWord suite, XSpreadSheet, C/C++ compiler, XChat IRC client, netscape 3.04gold, gftp, Vim, w3m/links/lynx, mc, mutt, slrn, Perl, wuftpd, ircd, Samba FS support, XVNCviewer, snes9x-svga, wget, xpaint, xpdf, xnetload, xv, and all the basic stuff such as at, lpr, pcmcia, cron, and a big list of things that used about 270Mb of harddisk. I still have more than 300Mb free under the Linux partition and about 100Mb under the Windows partition.
I've still not recompiled the Linux kernel (although I have the sources installed) because I always use modconf (o debconf-tiny) to install the hardware support as modules, such as sound or pcmcia support.
As this is no a Linux tutorial, I'll stop describing what I installed and how: I'll asume you know how to use Linux and Debian, if not just ask on IRC or newsgroups or ask me if you have any doubt of the installation procedure.
I use the following /etc/lilo.conf file to boot the system:
# /etc/lilo.conf - See: `lilo(8)' and `lilo.conf(5)', lba32 boot=/dev/hda2 root=/dev/hda5 install=/boot/boot.b map=/boot/map prompt delay=80 timeout=90 vga=normal append="apm=on" default=linux # Linux partition image=/vmlinuz label=linux read-only # Windows partition... other=/dev/hda1 label=win table=/dev/hda # Compaq LAPTOP setup partition... other=/dev/hda3 label=setup table=/dev/hda
Notice the append="apm=on" statement. It allows me to poweroff the system (using poweroff) and suspend it (apm –suspend) without having to recompile the system kernel to enable APM support (the default Debian kernel has APM compiled into the kernel but disabled by default).
The sound card was easy to configure. I saw that during kernel startup the SoundCard was detected so I tried to play some mp3 files using mpg123. I noticed the sound was very slow, but under Windows it worked perfectly, so I started to read Linux documentation (the kernel sources, and /usr/doc/linux Documentation) and I noticed that the card was not being properly detected. The system was detecting it as an ESS 1888, but the sound card was the ESS 1788, so I used modconf to unload the module and reload it adding the esstype=1788 parameter. You can also edit /etc/modules.conf and add it to the sb options line:
options sb irq=5 io=0x220 dma=1 dma16=7 esstype=1788
Check your IRQ, IO and DMA values on Windows Control Panel or in the BIOS and change it according to them. You can also insert the module in the command line by writing "insmod sb irq=5 dma=…" and so on.
After that change, the sound worked perfectly and I could heard MP3 and another kind of sounds (snes9x emulator sounds) under Linux. Remember that you just need the sb module to have sound (modconf will load the soundcore and sound modules needed to use the SB main module).
For X11 configuration I just downloaded and merged some of the X configuration files at the Linux Laptop Page. Finally I "wrote" the following /etc/X11/XF86Config file:
# XF86Config file for the Compaq Armada 4120 TFT LCD # XFree86 3.3 Section "Files" RgbPath "/usr/X11R6/lib/X11/rgb" FontPath "/usr/X11R6/lib/X11/fonts/misc/" FontPath "/usr/X11R6/lib/X11/fonts/Type1/" FontPath "/usr/X11R6/lib/X11/fonts/Speedo/" FontPath "/usr/X11R6/lib/X11/fonts/75dpi/" FontPath "/usr/X11R6/lib/X11/fonts/100dpi/" EndSection Section "ServerFlags" EndSection Section "Keyboard" Protocol "Standard" XkbRules "xfree86" XkbModel "pc102" XkbLayout "es" AutoRepeat 500 5 EndSection Section "Pointer" Protocol "PS/2" Device "/dev/mouse" Emulate3Buttons EndSection Section "Monitor" Identifier "Compaq Armada 4120 TFT LCD" VendorName "Compaq" ModelName "Armada 4120" Bandwidth 100.0 HorizSync 31-69 VertRefresh 55-120 ModeLine "800x600" 45 800 840 968 1056 600 601 605 628 # ModeLine "800x600" 36 800 840 856 1000 600 608 616 632 ModeLine "640x480" 25.175 640 664 760 800 480 491 493 525 EndSection Section "Device" Identifier "Cirrus CL-GD7548" VendorName "Cirrus" BoardName "CL-GD7548" VideoRam 1024 Chipset "clgd7548" # Clockchip "cirrus" Option "linear" MemBase 0x40000000 # Option "mmio" # Option "fifo_conservative" # Option "no_accel" # Option "no_bitblt" EndSection Section "Screen" Driver "svga" Device "Cirrus CL-GD7548" Monitor "Compaq Armada 4120 TFT LCD" DefaultColorDepth 16 Subsection "Display" Depth 8 Modes "800x600" "640x480" EndSubsection Subsection "Display" Depth 16 Modes "800x600" "640x480" EndSubsection EndSection
I installed xdm so that X11 was launched during system startup. As I have 24Mb of RAM and I'm using IceWM, the system is using just 11Mb of memory after entering the XWindow System (with another 10Mb cached, and 2 free). This is quite fine to work and swap is not used very often (just about 6-8Mb when I use Netscape, XChat and Wordperfect 8 simultaneously). I also installed xbanner (and configured the XBanner.ad) to create a nice XDM screen for my Laptop.
I created a .icewm directory on my home and copied to it the /etc/X11/icewm files so that I can configure all the ICEWM menues as user. Take a look at this files to know how to add programs to the menu or the toolbar: it's very easy and this way I added a nice menu with all the programs on my computer. I installed wterm as XTerminal (it uses very low memory) and created links on the ICEWM menubar to open lots of console applications under wterm, such as: For SVGALIB based programs, I changed the /etc/vga/libvga.conf and set the graphical chipset used to the standard VGA, as the Cirrus chipset was not working, at least under snes9x. Just discommenting the VGA chipset option I could use SVGAlib programs under 320x200 (mainly snes9x, the only one I usually execute).
prog BitchX xterm wterm -bg black -fg gray -font 7x13 -e BitchX
I also use gentoo and DFM as File Managers. The first is like Midnigth Commander but under X and the second is like Windows' Explorer (or KDE's KFM filemanager) and they use very little memory. Xosview allows me to know the status of memory, the system load and the network/ppp speed at any time.
The XVNCviewer client allows me to connect to my big PC (that has the vncserver installed) and use KDE 2 and StarOffice under my laptop when someone is using the main computer (for web surfing, and so on).
I had problems using the mouse under X when gpm (console mouse) was enabled, so I disabled it by removing the link on /etc/rc2.d (then is not launched during system startup at runlevel 2, the one I'm using). The /dev/mouse file is a link to /dev/psaux. I think that X and GPM can coexist if I link /dev/mouse to /dev/gpmdata, but as I use X most of the time, I've not tested it.
I used a ppp connection to install the system, but I used too a ZIP drive to pass .deb packages from my big computer to the LAPTOP, in order to make the instalation faster (and avoid to download big files on the laptop, accelerating the system instalation). As I don't have a network card on the laptop, and while I buy a PCMCIA card for it, I thought of using a null modem or null printer cable to connect the Laptop and the main PC.
Serial NULL-MODEM cables use SLIP, and Parallel NULL-PRINTER cables use PLIP. The second one protocol (using the parallel port) is lots of time faster than using a serial cable, so I bought a 2 meters INTERLNK PARPORT CABLE (I believe is the same than a LAPLINK cable) for about 5 US$ and connected the two computers following those steps:
On both machines I added the following to /etc/hosts:
192.168.69.1 ppc 192.168.69.2 ptatil
This way, the .1 address will be the Big PC (ppc stands por plip pc :) and the .2 address will be asigned to the Laptop (tatil stands for portatil, which is laptop on Spanish).
Use this on the Laptop part to stablish the plip0 link under 2.2.x kernels:
rmmod parport_pc rmmod parport insmod parport insmod parport_pc io=0x378 irq=9 echo "9" > /proc/parport/0/irq insmod plip cat /proc/interrupts ifconfig plip0 ptatil pointopoint ppc up route add ppc dev plip0 route add default gw ppc
Remember to have those modules available and change the "9" and 0x378 for your parallel port values. If you put the right values, you'll see something like that on your /proc/interrupts:
9: 1 XTPIC parport0
The above "1" (or higher) will be "0" if the irq or IO port has not been configured propertly, check your BIOS or Windows control-panel to know the right values.
On the Big PC part, do (in my own case):
rmmod parport_pc rmmod parport insmod parport insmod parport_pc io=0x378 irq=7 echo "7" > /proc/parport/0/irq insmod plip ifconfig plip0 ppc pointopoint ptatil up route add ptatil dev plip0
This way you should be able to ping between the two machines. Install an FTP server on the Big PC and you'll be able to pass files between the machines at about 60-70Kb per second. You can also install telnet, VNCserver and more extra services to work with the big PC remotely using the Laptop as a terminal.
The best service is IPMasquerade. If you know how to install IPMasquerade on the big PC, and if you have an Internet connection on it, you can ALSO use Internet on the Laptop simultaneously using the PLIP interface as a gateway. Read the IPmasquerade howto to install the right modules and activate IPforwarding and then use the following IPCHAINS rule:
ipchains -A forward -s 192.168.69.0/24 -j MASQ
Remember to put a valid nameserver on the /etc/resolv.conf file of the Laptop to solve DNS names and then you'll be able to use Web Browsers, FTP, IRC, ICQ and so on directly on your Laptop.
To disable PLIP, run the following on both machines:
ifconfig plip0 down rmmod plip rmmod parport_pc rmmod parport
You can also put all those command line sentences into scripts such as plip_on and plip_off, as I did.
If one of the parallel ports is faster than the other, then you could get some errors in the console, as:
PLIP0: Transmit Timeout (1,80).
This happens when one of the LPTs can't follow the other, but this is not a real transmission error: I use the PLIP link to transmit lot of files between the 2 computers and all the files are transmited right (by example, zip files would no uncompress if it would have any error on it) at about 65-70 KBytes per second, so just ignore the messages.
For more info, read the PLIP and PLIP-Install Linux HOWTO.
I bought a PCMCIA Ethernet Card (Ovislink 10/100) and plugged it into the PCMCIA slot. I installed the pcmcia-cs debian package and changed the /etc/pcmcia/network.opts file:
# Network adapter configuration # Automatically generated during the Debian installation # The address format is "scheme,socket,instance,hwaddr". case "$ADDRESS" in *,*,*,*) IF_PORT="auto" PUMP="n" # Host's IP address, netmask, network address, broadcast address IPADDR="192.168.5.69" NETMASK="255.255.255.0" NETWORK="192.168.5.0" BROADCAST="192.168.5.255" GATEWAY="192.168.5.1" DNS_1="192.168.5.1" ;; esac
Then I executed /etc/init.d/pcmcia restart and the eth0 interface appeared on the ifconfig output, and I was able to access my 192.168.5.0 network (where I have 2 more computers) using the PCMCIA card. This was an easy and fast ethernet configuration, that I tested using xvncviewer to connect to my Big PC and work using KDE while the computer was being used. As I have IPMasquerading activated for all the 192.168.5.x hosts, I have Internet access on the Laptop just by setting as default gateway the 192.168.5.1 host (read the IPMasquerade HOWTO for more info).
I have still not configured the following devices, so I can't say anything about them:
UPDATED: Ian R. Justman told me the following by email: I had been having trouble getting my Palm m100 to talk to my desktop PCs running Linux, yet it works fine on my laptop, not only wired... but also via IrDA (in fact, I got IrDA working --FIRST--). The thing is you have to treat the IrDA as a serial port. If you go into the setup program, it is the second port you set up. The first one is the DB-9 serial connector. Was fully able to communicate with it using PPP; haven't tried syncing yet, though given my success doing it wired (which for whatever reason I cannot do on my desktops), it should work fine. I was also able to do syncing using pilot-xfer.
Thanks a lot Ian for the info
I detected the following problems under Linux:
[-x /sbin/update ] && update by [-x /sbin/update ] && update -f 300 -s 300
This forces Linux to flush and sync the HDD buffer every 5 minutes instead of 5 seconds, so I stoped to heard the continuos noise I was hearding. But that was no the end, because I found in the Compaq Web (in the same page as SETUP, DIAG and DRIVERS) a FUJITSU FIRMWARE UPGRADE that changed the "after-5-seconds-park-headers" to "after-more-seconds-park-headers", so now my Laptop makes no strange noises while I'm using it.
To check if your laptop has the latest firmware just make a disk access (ls /usr by example) and wait. If you hear a sound after 5 seconds, you have the same problem I had. If you use the standard update flushing time, imagine the anoying FLUSH-noise-FLUSH-noise chain that I was hearing all the time…
I've bought a PS/2 two-buttons cheap mouse and a PC PS/2 keyboard in order to use in on my laptop when playing games or writing long documents. I've bought them because I don't want to break my Laptop keyboard/mouse by playing games. The external keyboard is very cheaper than replacing the internal one in a Compaq Technical Service, so buying them is an enhacement for me.
I have also an (PC standard) LG 4X IDE CDRom drive I want to connect to my computer attaching it to the parallel port using an IDE-to-Parallel interface and the Linux PARIDE kernel module. I'll explain here all the process when I find a cheap IDE-to-Parallel interface.
Finally, my Laptop has no GAME/JOYSTICK port, so I can't plug in a Joystick or Joypad to "save" the keyboard when playing games, or simply for better gameplay, so I've decided to BUILD an JOYSTICK-to-PARALLEL_port adapter. On http://www.emulatronia.com (in spanish and English) there is a section where explains how to adapt SuperNES, MegaDrive/Genesis or PSX pads to plug them to the parallel port, including DirectX and MSDOS drivers for using them. Linux includes too the joy-db9 and joy-console drivers to use those joypads under Linux (and a .txt file to show how to build the adapter), so I'm going to use one of my SuperNES pads to play ZSnes, snes9x and Windows games. I finally succeded on my idea thanks to Jolu, who send me a PSX to LPT adapter you can also find in Emulatronia.
If you want to contribute with corrections, new files, more info, hardware ideas, questions, and so on, please feel free to send me by email. I'll try also to update this page (I'm writing this help page just two weeks later of buying the Laptop) whenever I find useful info for the Compaq Armada 4120T.