Installing GNU/Linux on an IBM ThinkPad R51
This page is under construction (work in progress)!
partitioning #
kernel #
suspend to ram #
suspend to disk #
framebuffer #
ethernet #
wireless #
modem #
sound #
usb #
frequency scaling #
powersaving #
xorg #
make.conf #
boot NetBSD #
warning #
links #
disclaimer
The following lines describe how to install GNU/Linux
(Gentoo)
on an IBM ThinkPad R51 and how to
get the pieces of hardware working.
|
|
Hardware/Support overview
|
Graphics |
Intel Xtreme 64MB (shared) |
OK |
USB |
Intel (ICH4) USB 2.0 (uhci/ehci) |
OK |
CardBus |
Texas Instruments PCI1510 |
OK |
Sound |
Intel (intel8x0) |
OK |
Ethernet |
Intel PRO/100 |
OK |
Wireless |
Intel PRO/Wireless 2200BG |
OK |
Modem |
Intel ??? |
Not tested |
Various stuff
|
Suspend to RAM |
OK |
Suspend to disk |
OK |
CPU frequency scaling |
OK |
lspci-output
|
0000:00:00.0 Host bridge: Intel Corp. 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
0000:00:00.1 System peripheral: Intel Corp. 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
0000:00:00.3 System peripheral: Intel Corp. 82852/82855 GM/GME/PM/GMV Processor to I/O Controller (rev 02)
0000:00:02.0 VGA compatible controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)
0000:00:02.1 Display controller: Intel Corp. 82852/855GM Integrated Graphics Device (rev 02)
0000:00:1d.0 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
0000:00:1d.1 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
0000:00:1d.2 USB Controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
0000:00:1d.7 USB Controller: Intel Corp. 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
0000:00:1e.0 PCI bridge: Intel Corp. 82801 Mobile PCI Bridge (rev 81)
0000:00:1f.0 ISA bridge: Intel Corp. 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
0000:00:1f.1 IDE interface: Intel Corp. 82801DBM (ICH4-M) IDE Controller (rev 01)
0000:00:1f.3 SMBus: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
0000:00:1f.5 Multimedia audio controller: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
0000:00:1f.6 Modem: Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01)
0000:02:00.0 CardBus bridge: Texas Instruments PCI1510 PC card Cardbus Controller
0000:02:02.0 Network controller: Intel Corp. PRO/Wireless 2200BG (rev 05)
0000:02:08.0 Ethernet controller: Intel Corp. 82801DB PRO/100 VE (MOB) Ethernet Controller (rev 81)
|
A more detailed lspci output (lspci -v) is available
here.
|
Harddrive/Partitions
Right after purchasing this fine piece of hardware, I booted the shipped OS
(Windows XP), burned the rescue CD's and than went straight to the nice part.
I haven't been using Windows for years because I never liked it at all. Therefore
it wasn't a hard decision to boot
Kanotix
and remove every existing partition to set up this new schema:
Disk /dev/hda: 40.0 GB, 40007761920 bytes
16 heads, 63 sectors/track, 77520 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 105 52888+ 83 Linux
/dev/hda2 * 106 10503 5240497+ a9 NetBSD
/dev/hda3 10503 11495 500062+ 82 Linux swap
/dev/hda4 11496 77520 33276600 5 Extended
/dev/hda5 11496 15371 1953472+ 83 Linux
/dev/hda6 15372 22154 3418600+ 83 Linux
/dev/hda7 22155 29905 3906472+ 83 Linux
/dev/hda8 29906 30898 500440+ 82 Linux swap
/dev/hda9 30899 77520 23497456+ 83 Linux
The second swap space (/dev/hda8) is reserved for suspend to disk. That
isn't really necessary, but I like the clear layout and so I can
use the first one for Knoppix/Kanotix or one of my
uClibc-ramdisk systems while a
resumeable image is stored in the second one.
Because I made very good experiences mit SGI's XFS I have chosen it as
FS for most of my Linux partitions:
Filesystem Type Size Used Avail Use% Mounted on
/dev/hda1 ext2 51M 5.4M 43M 12% /boot
/dev/hda5 xfs 1.9G 221M 1.7G 12% /
/dev/hda6 xfs 3.3G 2.3G 1.1G 69% /usr
/dev/hda7 xfs 3.8G 2.8G 970M 75% /opt
/dev/hda9 xfs 23G 6.8M 23G 1% /home
none tmpfs 121M 0 121M 0% /dev/shm
Configuring the kernel
I am using gentoo-dev-sources 2.6.9-r9, the complete config
is located here.
Beside the gentoo-related stuff (i.e. devfsd) (have a look at the
Gentoo handbook section), the following general suggestions maybe helpful:
<*> ATA/ATAPI/MFM/RLL support
...
<*> Include IDE/ATAPI CDROM support
...
[*] PCI IDE chipset support
[*] Sharing PCI IDE interrupts support
[*] Generic PCI bus-master DMA support
[*] Use PCI DMA by default when available
...
<*> Intel PIIXn chipsets support
...
A complete dmesg output is available
here.
Configuring suspend to RAM (aka. S3)
I compiled these options into the kernel:
Power management options (ACPI, APM) --->
[*] Power Management support
[*] Software Suspend (EXPERIMENTAL)
ACPI (Advanced Configuration and Power Interface) Support --->
[*] ACPI Support
[*] Sleep States (EXPERIMENTAL)
<*> AC Adapter
<*> Battery
<*> Button
<*> Fan
<*> Processor
<*> Thermal Zone
...
[*] Power Management Timer Support
Good news, everyone! Suspend to RAM works out of the box with linux-2.6.9 on a R51 -
there's just one little thing you have to keep in mind:
In order to avoid getting a dead blank screen after resume, you have to pass
the following line to the kernel at boot-time:
acpi_sleep=s3_bios
So, just add this line to grub or lilo and you'll be fine.
Note: After resuming the framebuffer will be broken, so if
you want to use a framebuffer console and S3, you have to investigate
on this issue... (I didn't 'cause I normally don't use the framebuffer console)
Here's my suspend to RAM script - just put it
somewhere on your disk and make acpid use it on sleep events in order
to make Fn-F4 work perfectly.
Configuring suspend to disk (aka. S4)
I compiled these extra options into the kernel:
[*] Suspend-to-Disk Support
(/dev/hda8) Default resume partition
Suspend to disk works out of the box, too.
Remeber, if you don't want to hardcode the resume partition, append the following line
to your bootloader, so it gets passes to the kernel at boot-time:
pmdisk=/dev/[swap-partition]
Here's my script.
Configuring the framebuffer
To get a working fancy framebuffer, these extra options were compiled into the kernel: (I tried it just for testing - if you want to use it, read
this note first!)
Processor type and features --->
[*] MTRR (Memory Type Range Register) support
...
Graphics support --->
[*] Support for frame buffer devices
<*> VESA VGA graphics support
VESA driver type (vesafb) --->
...
Console display driver support --->
--- VGA text console
[*] Video mode selection support
<*> Framebuffer Console support
Choose a resolution and make your bootloader use this addition:
video=vesafb:mtrr,ywrap vga=CODE
Replace CODE with your desired resolution and your done. I suggest 791
what gives you a resolution of 1024x768@16. More CODEs can be found
here.
Configuring the ethernet nic
The onboard NIC works out-of-the-box with the Linux e100-driver.
Configuring the wireless nic
The onboard wireless-card is an Intel PRO/Wireless 2200 BG for which
at the moment no suitable driver is present in the Linux-kernel.
Luckily, there's a project on sourceforge called ipw2200
which is developing a native driver that can be used as LKM.
(see links)
The module compiles without problems and ipw2200 is present in
portage:
'net-wireless/ipw2200'. I haven't had time to test the results but my first
impressions suggest that everything's allright here, too.
Configuring the modem
coming soon
Configuring sound
I am using ALSA with great (as expected) results: sound is
loud and clear - no problems at all. The necessary driver is called
intel8x0 (module: snd_intel8x0).
Configuring USB
coming soon
Configuring CPU frequency scaling
coming soon
Some notes further notes on powersaving
coming soon
Configuring Xorg-X11
coming soon
Suggested make.conf settings
While some guys suggest the CFLAGS for a Pentium-M to be
"-march=pentium3 -02 -pipe -fomit-frame-pointer", I experienced better
results with a more general and less optimized approach:
CFLAGS="-O2 -march=i686 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CXXFLAGS="${CFLAGS}"
GENTOO_MIRRORS="http://172.16.45.4/mirrors/gentoo"
SYNC="rsync://172.16.45.4/gentoo-portage"
USE="X gnome -kde -arts -qt gtk gtk2 mmx sse nptl acpi alsa oss avi crypt
divx4linux dvd cdr esd ftp gif png xpm jpeg tiff gphoto2 gstreamer ncurses
nptl oggvorbis opengl pcmcia perl quicktime samba sdl ssl usb xml xmms xosd
-doc -nls hal xvid -java gnutls unicode svg "
PKGDIR="/opt/portage/packages"
DISTDIR="/opt/portage/distfiles"
PORTAGE_TMPDIR="/opt/portage/tmpdir"
FEATURES="ccache strict candy noinfo buildpkg"
PORTDIR_OVERLAY="/home/alex/coding/ebuilds/"
PORTAGE_BINHOST="http://172.16.45.4/mirrors/gentoo/packages/i686/"
If you're interested in what packages I considered useful in order to
do some stuff with this fine piece of hardware, have a look at my
packages list.
Booting NetBSD
To boot NetBSD I added the following entry in my grub.conf:
title NetBSD 2.0
rootnoverify (hd0,1)
chainloader +1
An important warning
NEVER try using and
on your thinkpad!
Doing so may destroy your thinkpad once and for all!
Consult
this page for
more information.
Useful links
Gentoo Linux
Linux on Laptops
ACPI specs
Intel PRO/Wireless 2200BG driver
Linux Thinkpad (a great mailinglist is available!)
Disclaimer
This page was written in order to give some useful information on installing
GNU/Linux on an IBM Thinkpad R51 - while in doubt which laptop to purchase, I
read a couple of pages like this and it really helped me figuring out what
model was the "right one" for me. I hope the above lines may help you in that way,
too.
But I cannot asure that every information I gave in the above text is correct,
so I cannot give a warranty of any kind at all. If your
laptop gets harmed, destroyed, catches fire or stuff like that: you have been warned ;)
Comments and suggestions regarding the article are welcome. Contact me at:
Alex Linke, Alexander.Linke-2 AT rub.de
last edited: 10-12-2004 09:03