Installing Gentoo on a ThinkPad R51-1830

From ThinkWiki
Revision as of 19:40, 27 August 2007 by TpUser0 (Talk | contribs) (Base configuration (Gentoo): update, link to fglrx)

Jump to: navigation, search
NOTE!
This page is far from being complete and will be updated soon... --“TpUser0” 18:57, 22 August 2007 (UTC)

Introduction

This page shows some partes of how I did once install Gentoo Linux on my ThinkPad. Since the R51 is now quite outdated (2005) everyone having such a laptop surely has his/her system installed already. So why this page?

Mainly out of interest and for fun.

If you also own a Thinkpad R51 (machine types 1829, 1830, 1831 and 1836) feel free to add what you feel missing.

My system specs

Machine: IBM ThinkPad R51 1830-DG4

  • Pentium M 1.7 GHz
  • 1.5 GB PC2700 DDR RAM (I upgraded by 1 GB)
  • 100 GB Western Digital HDD (upgraded, not original)

lspci:

00:00.0 Host bridge: Intel Corporation 82855PM Processor to I/O Controller (rev 03)
00:01.0 PCI bridge: Intel Corporation 82855PM Processor to AGP Controller (rev 03)
00:1d.0 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #1 (rev 01)
00:1d.1 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #2 (rev 01)
00:1d.2 USB Controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) USB UHCI Controller #3 (rev 01)
00:1d.7 USB Controller: Intel Corporation 82801DB/DBM (ICH4/ICH4-M) USB2 EHCI Controller (rev 01)
00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 81)
00:1f.0 ISA bridge: Intel Corporation 82801DBM (ICH4-M) LPC Interface Bridge (rev 01)
00:1f.1 IDE interface: Intel Corporation 82801DBM (ICH4-M) IDE Controller (rev 01)
00:1f.3 SMBus: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) SMBus Controller (rev 01)
00:1f.5 Multimedia audio controller: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller (rev 01)
00:1f.6 Modem: Intel Corporation 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Modem Controller (rev 01)
01:00.0 VGA compatible controller: ATI Technologies Inc Radeon RV250 [Mobility FireGL 9000] (rev 02)
02:00.0 CardBus bridge: Texas Instruments PCI4520 PC card Cardbus Controller (rev 01)
02:00.2 FireWire (IEEE 1394): Texas Instruments Unknown device 802a (rev 01)
02:01.0 Ethernet controller: Intel Corporation 82540EP Gigabit Ethernet Controller (Mobile) (rev 03)
02:02.0 Network controller: Intel Corporation PRO/Wireless 2200BG Network Connection (rev 05)

Preparing for Installation

The laptop originally came with an 80 GB Hitachi hard disk.

TpUser0@localhost # fdisk -l /dev/hdc

Disk /dev/hdc: 80.0 GB, 80026361856 bytes
240 heads, 63 sectors/track, 10337 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1        9736    73604128+   c  W95 FAT32 (LBA)
/dev/hdc2            9737       10337     4543560   12  Compaq Diagnostics

When I received the ThinkPad I did not switch it on right away! I did also not start Windows XP!

A cronological list of what I did:

  • Since I had a 2.5 inch IDE adaptor I removed the HDD from the ThinkPad and put it in my desktop computer.
    Use a Knoppix Live Linux (or any other Live Linux) on CD/DVD if you don't have an adaptor.
  • I made a backup of each parition. Back in 2005 I used partimage.
    Use a program of you choice or even dd if you prefer, but keep in mind that it should also work if you change the parition sizes and positions.
  • I resized the Windows partition from its almost 75 GB to 20 GB using parted.
  • I made an image of the resulting partition too.
  • I deleted the second partition which is the rescue partition. Since I now had my own rescue images I didn't need it anymore.
    You will have to turn of the "Rescue Parition" feature in the BIOS to do this!
  • I then booted into Windows XP for the first time (!) and set it up to suit my needs.
    My system always converts FAT32 to NTFS and installs all the programs that came with the ThinkPad. I then need to install Service Pack 2 and all other recent updates for Windows and all the other programs. Use the Software Installer from IBM (Lenovo) to do this for you. You will need a broadband internet connection though, or you have all the files at hand (offline update). Another partition image of a recent and updated configuration will save your time for future Windows XP recoveries.
  • I then partitioned the rest of the hard disk with Linux and installed Gentoo Linux according to the manual.
    In my case I just copied an existing installation from my desktop to the ThinkPad and re-emerged everything with the correct CFLAGS and USE flags.

My partition layout (after I upgraded to a 100 GB hard disk):

tpuser0@localhost # fdisk -l /dev/hda
Disk /dev/hda: 100.0 GB, 100030242816 bytes
240 heads, 63 sectors/track, 12921 cylinders
Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1        2774    20971408+   7  HPFS/NTFS
/dev/hda2   *        2775        2779       37800   83  Linux
/dev/hda3            2780       12921    76673520    5  Extended
/dev/hda5            2780        5943    23919808+  83  Linux
/dev/hda6            5944       12726    51279448+  83  Linux
/dev/hda7           12727       12921     1474168+  82  Linux swap / Solaris

As you can see I have

  • /dev/hda1 20 GB reserved for the Windows XP installation
    I bought it with the laptop, so why not use it from time to time?
  • /dev/hda2 /boot 40 MB for the kernels...
  • /dev/hda5 / 25 GB for the root directory
    I figured it be best to have no seperate partitions for / and /usr...
  • /dev/hda6 /home 53 GB for all my personal files (and I have a lot of them!)
  • /dev/hda7 swap 1.5 MB
    You need at least the size of RAM you have on your system for swap or hibernation will not be possible.

Base configuration (Gentoo)

  1. /etc/make.conf:
    • #=== hardware ===
    • ALSA_CARDS="intel8x0 intel8x0m virmidi dummy"add "usb-audio" if you have additional devices such as TV capture cards.
    • VIDEO_CARDS="radeon fbdev dummy vesa"add "fglrx" for the proprietary driver from ATI.
    • INPUT_DEVICES="keyboard joystick mouse synaptics"
    • SANE_BACKENDS="genesys"if you have a scanner, add your SANE backend here.
    • #=== host settings optimizations ===
    • CHOST="i686-pc-linux-gnu"
    • CFLAGS="-O2 -march=pentium-m -fomit-frame-pointer -pipe"I'm using very stable settings here because I want to work with my laptop, not tune it for crashing all the time...
    • CXXFLAGS="${CFLAGS}"
    • #=== portage ===
    • Most of the other settings are explaned in /etc/make.conf.example – don't forget to add them too!
    • SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"use mirrorselect
    • FEATURES="sandbox ccache parallel-fetch userfetch userpriv usersandbox"
    • USE=" your USE flags here "use ufed (Use Flag EDitior)
TODO
...

Kernel configuration

TODO
...

Installation

TODO
...

Configuring relevant kernel modules

TODO
...

Configuring X.org

TODO
...

External Sources

TODO
...