by
Thanks to the project neptun students of many departments can get a laptop at very cheap cost. As a student of the Department of Computer Science, I was happy to hear, that the laptop our department offers was an IBM. Unfortunately, this Thinkpad came shipped with Microsoft Windows 2000.
This article describes how to remove the unwanted operating system and install and configure Debian GNU/Linux on it. I will not provide guidance in how to install Linux in general. If you leak of basic skills, try the Linux documentation project and the homepage of the Linux Users Group Switzerland.
Before installing GNU/Linux, we want do do some preparations. In case you don't want to switch completely to GNU/Linux (as I did) you should take care that you can restore the preinstalled operating system.
The Thinkpad was shipped without a Windows CD! However, IBM has included a restore partition:
Device Boot Start End Blocks Id System /dev/hda1 * 1 2422 18310288+ c Win95 FAT32 (LBA) /dev/hda2 2423 2584 1224720 1c Hidden Win95 FAT32 (LBA)
The restore partition is booted from a bootloader in the MBR (press F11
at
boot). I strongly recommend that you create a restore floppy (press F11
and
follow the instructions). Once overwritten (like Windows 9x/Me and most Linux
installations do) you almost have no chance to boot from this partition.
After the IBM bootloader was overwritten, you can still create a recovery boot
disk as follows: boot from a Linux floppy/CD, mount /dev/hda2
, chdir
to
the recovery directory, copy rrdisk.dsk
and loaddskf.exe
to a floppy,
boot DOS or Windows and write the bootdisk with "loaddskf rrdisk.dsk a:
/y/q
".
The restore partition is capable of fully restoring the first Windows partition, so we can do there everything we want.
My Thinkpad came with a Matshita DVD-ROM SR-8175-M (check if your's is the same!). Unfortunately this drive is RPC2 protected. The RPC2 firmware is capable of handling region codes. The drive will refuse to play DVD's which have no equal region code than the one stored inside your DVD-ROM. This region code can be changed 5 times. After the last set, the drive will be locked on this code. This has nothing to do with the software or operating system you use!
Legal note: I will not take any responsibility for any damage you cause (to your DVD, your Thinkpad or your dog) by reading this howto! Patching your DVD voids the warranty of IBM. If you fuck up your DVD, then it's your fault, not mine. Nobody will pay you another drive to play around.
First you should check whether your DVD is working. Do this using the DVD playback software IBM has included. This will also set an initial region code, which is important for the firmware patch to work.
Second, you must find out which firmware you have. Under Windows 2000 you cannot get this information -- you have to install Windows 98 (which is no problem since the first partition is formated with FAT32). Use CDVDInfo or Driveinfo to find out which firmware you have and whether your drive is RPC2 protected (My firmware was G228).
Then go to The Firmware Page and get the appropriate patch. Flashing the wrong type of firmware will cause your drive to malfunction or refuse operation! You have been warned.
You can also download the local copy of the G228 patch.
You should run the patch software in real DOS mode (and not in a
DOS-Box). The DVD is attached to the secondary IDE master, so "DWL2 2
X228.BIN
" should just work fine. Make sure that you don't accidently turn
your Thinkpad off during flashing -- this will certainly destroy your
drive.
Make sure your drive is now RPC1 by running Drive info. You win, when get an "This drive has NO region protection" message. It means your drive has become RPC1. Note: under Windows you will still have to deal with region codes. This is because the playback software checks the region code and refuses to play -- a good reason to upgrade to Linux.
I did the partitioning in the following way:
Disk /dev/hda: 240 heads, 63 sectors, 2584 cylinders Units = cylinders of 15120 * 512 bytes
Device Boot Start End Blocks Id System /dev/hda1 * 1 37 279688+ 6 FAT16 /dev/hda2 38 72 264600 82 Linux swap /dev/hda3 73 2584 18990720 83 Linux
The first partition is for hibernation. It must be a FAT formated
partition big enough to hold a hibernation file of the size: Physical
Memory + Video Memory + 2MB for additional information and bad blocks
.
This makes 266MB for me (256 + 8 + 2). My /dev/hda1
is now filled by 98%. A
hibernation partition doesn't work! . IBM provides a selfextractin floppy
disk image
(which extracts onto a floppy disk when run under windows). After formating
your hibernation pratition, you can boot anytime from this floppy disk and
set up a swap file. After rebooting, Alt+F12
should work.
As you can see, I removed the restore partition from IBM. If you want the option of restoring Windows, leave it untouched.
The installation went surprisingly smooth. I installed Debian 2.2r3
(potato) from floppy disk and upgraded to woody using the apt-get
tool.
Check out http://www.debian.org/ for a local mirror. A sample
sources.list for the local mirror of Swiss Federal Institute of Technology
in Zürich can be found at http://debian.ethz.ch/. You need to install
the Ethernet module which is called eepro100
(see below).
modprobe eepro100
".
The S3 chip is well supported. Although the driver is quite stable, X
freezed twice after some hours of work. I think with the line
"Option "ShadowStatus"
" you can bypass this bug. Check
Tim Robert's S3 Savage XFree86 4.x page
for further information.
To install StarOffice/OpenOffice (or if the Opera browser hangs),
you have to upgrade to
the latest driver.
XVideo is supported, but will cease to work (in 24 bpp mode; showing a green window) after playing some videos. It seems to be a XVideo-bug since neither mplayer nor VideoLAN nor Ogle can reinitialize XVideo properly. It might be in correlation with the SIG11 the X-server sometimes catches after exiting. Who knows? Switching to 16 bpp mode helped, however, now X catches a SIG11 from time to time when XVideo is initialized. DRI is (unfortunately) not supported.
On the above homepage you will also find a utility called s3switch
,
which lets you (as root) switch the video output between the LCD, CRT
and S-Video. In my XF86Config you will find a screen section called
tv.
Use "startx -- -screen tv
" to start the X-server with a maximum
resolution suitable for your (PAL) TV (e.g. when you want to watch your
code free DVD fullscreen). Note that SDL might be a better choice to watch
videos in fullscreen mode since it doesn't need the X-server to be restarted.
The soundcard worked out of the box. Try "modprobe cs46xx
".
You may need to add the following lines to /etc/modutils/sound:
alias char-major-14 cs46xx alias sound cs46xx
Then do a "echo sound >> /etc/modules
". Sound is now loaded
automatically at startup.
Works fine. findchip -v
reports:
Found NSC PC87338 Controller at 0x2e, DevID=0x0b, Rev. 2 SIR Base 0x2f8, FIR Base 0x2f8 IRQ = 3, DMA = 3 Enabled: yes, Suspended: no UART compatible: yes Half duplex delay = 0 us
This chip supports FIR (Fast InfraRed) with up to 4Mbps and is natively
supported by the kernel module nsc-ircc
. After setting up
/etc/modutils/irda
according to The Infrared HOWTO,
irattach irda0 -s 1
should enable IrDA. Once it works, you may set up
/etc/irda.conf
to automate this.
You can find out which modem chip you have by typing "grep Lucent
/proc/pci
". The chip is identified by two hexadecimal numbers (like
11c1:045c
).
Get the driver from http://www.heby.de/ltmodem/. Version 6.00a works
well. Untar the source (tar xvzf ltmodem-6.00a.tar.gz
), chdir into the
driver's directory, untar source.tar.gz and chdir into the source
directory. Then build the driver as usual (./configure; make; make
install; depmod -a
). Now create the device file:
mknod /dev/ttyLT0 c 62 64 rm /dev/modem ln -s /dev/ttyLT0 /dev/modem chgrp uucp /dev/ttyLT0 chmod 666 /dev/ttyLT0
Load the modules:
modprobe lt_modem modprobe lt_serial
If all goes right, you can now test your modem: start minicom (minicom
/dev/modem
) and type "AT
" (without the quotes). If you get an "OK
",
your modem works.
You can warm swap your drives by going into suspend mode first. Unmount any disk you are currently using and then press Fn-F4 and wait. After the system is fully suspended, swap your devices. When the swap is complete, tap the Fn key to un-suspend.
I have not really tested USB since I don't have any peripherals. However, it is reported to work out of the box (thanks Balint Sandor). You need a kernel with USB support (it is hard to find one without, these days) and (depending on the device) following modules: usb-uhci, usb-storage, scsi_mod, sg.
2006-02-06 dh Added link to TuxMobil 2003-12-24 dh Updated broken/redirected links 2003-11-16 dh Remarks on FIR (IrDA section). 2002-12-20 dh Link to Jonas Jermann's page 2002-05-31 dh XFree86: use "DefaultDepth 16" 2002-02-18 dh added hint about StarOffice installation 2002-02-15 dh s/mayor/major/, USB and XVideo update 2001-11-30 dh Link to Scott Gose's page added, PCMCIA update 2001-10-26 dh added section Modem 2001-10-23 dh added Hibernation instructions 2001-10-18 dh Initial Version