# Installing Gentoo on IBM T41

## squareHat

Installing Gentoo on IBM T41

Note: This is a work in progress...

Just picked up a new IBM T41 2394-DJU.

I have been running gentoo on a R31 for about a year, I remember it took me a few weeks (OK months:-) to get it really working perfectly with that machine.

This time round I thought I would create a how to of all the steps to get the machine up and humming. Hopefully this will be a help other T41 Linux and Gentoo users.

I bought a new drive, One for linux and one for that other operating system that I need from time to time... If you need to share the drive with windows follow one of the excellent guides out there.

BIOS CHANGES

I turned off:

*Power Mode for AC : Custom

*Power Mode for Battery : Custom

I defined the Custom mode as follows:

* Processor speed : Fixed Max

* Suspend Timer : Disabled

* LCD off timer : Disabled

* HDD off timer : 3 Min 

Install Steps: (if you have never installed Gentoo read the excellent installation guide  and use this as notes)

I used x86-Basic-1.4-20030911.iso to boot the machine. 

```
# date
```

  (Make sure your time and date is correct. If wrong, set it with  date MMDDhhmmCCYY )

NETWORK CARD: the network card worked out of the gate along with framebuffer and like most people I have DHCP server running on my LAN so the network in my case is already configured

```
# fdisk /dev/hda
```

 (Partition your drive)

I went with the following scheme:

 *Quote:*   

> 
> 
>    Device Boot      Start         End      Blocks   Id  System
> 
> /dev/hda1   *           1           5       40131   83  Linux
> ...

 

FILESYSTEMS

I went with

```
#mke2fs -j /dev/hda1 (Ext3 for boot)

#mkswap /dev/hda2 (swap)

#mke2fs -j /dev/hda3 (Ext3 for root 200Megs in this case)
```

for lvm you need to execute

```
#vgscan

#pvcreate /dev/hda4

#vgcreate vg /dev/ide/host0/bus0/target0/lun0/part4 (assuming you got on hda4)

# lvcreate -L5G -nusr vg (repeat for var, tmp, home, opt, change -L5G e.g. 5gig as appropriate...)

```

and I put reiserfs on the rest.

```
#mkreiserfs /dev/vg/usr (repeat for var, tmp, home, opt)
```

MOUNT THE FILESYSTEMS

```
# swapon /dev/hda2 (Activate the swap partition)

# mount /dev/hda1 /mnt/gentoo (Mount the root partition)                       

# cd /mnt/gentoo

# mkdir boot usr opt var tmp home (Create the OTHER mountpoints as appropriate)

# mount /dev/hda1 /mnt/gentoo/boot (repeat for usr,home,var,tmp,opt and so on)
```

grab the latest tarball                    

```
 #wget url (check out http://www.gentoo.org/main/en/mirrors.xml  )
```

```

# tar -xvjpf /mnt/cdrom/stages/stage*.tar.bz2           

# mirrorselect -a -s4 -o >> 

# cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

# mount -t proc none /mnt/gentoo/proc

# chroot /mnt/gentoo /bin/bash

# env-update; source /etc/profile

# emerge sync
```

INSTALL GENTOO:

I went with the following use flags in /etc/make.conf

 *Quote:*   

> CFLAGS="-march=pentium3 -O3 -pipe -msse2 -fomit-frame-pointer"
> 
> CHOST="i686-pc-linux-gnu"
> 
> USE="-kde -qt gtk2 oci8 imap sasl maildir" 
> ...

 

then

```
# cd /usr/portage; scripts/bootstrap.sh

# emerge system

# ln -sf /usr/share/zoneinfo/<path to time zone file> /etc/localtime

# nano -w /etc/fstab
```

my /etc/fsatb looks this:

 *Quote:*   

> /dev/hda1               /boot           ext3            noauto,noatime          1 1
> 
> /dev/hda3               /               ext3            noatime                 0 0
> 
> /dev/hda2               none            swap            sw                      0 0
> ...

 

INSTALL THE KERNEL

I went with gentoo-sources which as of this date gave me gentoo-sources-2.4.22r7 

```
# emerge gentoo-sources

# cd /usr/src/linux
```

copy my .config to /usr/src/linux (this is my initial try)

```
#make oldconfig (I think this step is necessary if you are copying someone .config file into a new kernel source tree?)

#make menuconfig
```

You will need LVM if you choose LVM and for gentoo VM fs, /proc fs, /dev fs,  /dev fs auto mount at boot)

So for I have found that you need to have:

Local APIC support on uniprocessors has to be disabled for the machine to shutdown properly

```

# make dep && make clean bzImage modules modules_install

# cp arch/i386/boot/bzImage.date ; cp .config /boot/config.date
```

I installed the following tools

```
# emerge syslog-ng vixie-cron reiserfsprogs lvmuser
```

```
# rc-update add syslog-ng default

# rc-update add vixie-cron default   

# rc-update add domainname default
```

Finalise settings before your first boot:

```
# passwd

# useradd your_user -m -G users,wheel,audio -s /bin/bash

# passwd your_user

# echo mymachine > /etc/hostname

# echo mydomain.com > /etc/dnsdomainname 
```

 /etc/hosts "127.0.0.1 localhost mymachine") 

Set up Networking

edit /etc/conf.d/net  ( iface_eth0="dhcp"  )

```
# rc-update add net.eth0 default
```

I went with grub 

```
# emerge grub

# grub

grub> root (hd0,0)

grub> setup (hd0)

grub> quit

# nano -w /boot/grub/grub.conf
```

```
default 1

timeout 5

splashimage=(hd0,0)/grub/splash.xpm.gz

                                                                                                                                

title=Gentoo Linux Stable

  root (hd0,0)

  kernel (hd0,0)/boot/vmlinux.stable root=/dev/hda3

                                                                                                                                

title=Gentoo Linux du jour

  root (hd0,0)

  kernel (hd0,0)/boot/vmlinux.new root=/dev/hda3 video=vesa,mtrr vga=834
```

REBOOT  :Shocked: 

TWEAKS

edit /etc/conf.f/hdparm

 *Quote:*   

> all_args="-d1 -c3"

 

```
#rc-update add hdparm default
```

XFREE GNOME etc

I used this guide as you main reference: http://www.gentoo.org/doc/en/desktop.xml

```
#emerge xfree xfree-drm gnome mozilla
```

   (etc...)

```
#/usr/bin/X11/xf86cfg
```

works to get you up and running with X quickly

First I tried the Now to get the ATI drivers wasn't too impressed, they worked, but didn't match the reliability of the rest of the system. 

I got Xfree to work reliabilty and 1200 GLX Gears, 

here is my XF86Config.

However after purchasing a new whiz bang laptop, and being confident enought with Desktop linux to give windows the boot:-)  I installed accelerated-X, it's not free and not open source, but it's still an X server and an open standard, so I can still sleep at night:-) . I get 1950 in GLXgears, and everything related to the screen seems to really work well. Flightgear works nicely, things scroll better etc.

CREDITS

These are sites that I found most usefull:

http://bellet.info/~bellet/laptop/t40.html

http://www.linux-on-laptops.com/ibm.htmlLast edited by squareHat on Tue May 11, 2004 10:40 pm; edited 9 times in total

----------

## balou

Great!!! I have juste bought the same notebook and i planned to install a gentoo on it shortly.

Thx for your precious information.

----------

## ph03n1x

Great tutorial

Didn't need though  :Wink:  but it would have helped me

I'm messing around with xf86 atm, it says no screen found...

However on my previous install i somehow made it work with ati-drivers but i cannot remember how, too bad ...  :Very Happy: 

----------

## Ian

Very nice guide.

I'm hoping on getting a T41 for college in a few months, but that depends on how much my parents feel like giving me.  I'd probably need Windows on it as well, for school, but oh well, at least this guide will save me some time with X11 and such.

Speaking of X11, can you try to install X.org's X11 implementation, instead of XFree86?  I'd like to know if there's any issues with that, though I doubt it.

----------

## ph03n1x

Me again  :Smile: 

Did u get those LEDs working? My W-Lan led and the num-lock stay dark, althout both functions are working correct. Any progress concerning ati?

I have actually a t41p and shell runs @ 1440x1050 and X did so too. Since I emerged gnome it doesn't want to do more than 1280x1024 weird, eh?

----------

## cineto

You may want to try synaptics drivers., then you will get:

 *Quote:*   

> 
> 
> - Movement with adjustable, non-linear acceleration and speed.
> 
> - Button events through short touching of the touchpad.
> ...

 

Let's install it:

```

cervinia root # ACCEPT_KEYWORDS=~x86 emerge -vp synaptics

 

These are the packages that I would merge, in order:

 

Calculating dependencies ...done!

[blocks B     ] x11-base/xfree ("virtual/x11" from pkg x11-base/xorg-x11-6.7.0)

[blocks B     ] x11-base/xfree (from pkg x11-base/xorg-x11-6.7.0)

[blocks B     ] x11-base/xfree ("virtual/xft" from pkg x11-base/xorg-x11-6.7.0)

[ebuild  N    ] x11-base/xorg-x11-6.7.0  +3dfx -cjk -debug +doc -hardened -ipv6 +nls +pam -pie -sdk -static  0 kB

[ebuild  N    ] x11-misc/synaptics-0.12.5   0 kB

[ebuild  N    ] app-arch/rpm2targz-9.0-r2   0 kB

[ebuild  N    ] sys-apps/utempter-0.5.3.2-r1   0 kB

[ebuild  N    ] x11-terms/xterm-184  -Xaw3d +truetype  0 kB

```

As I dont want (yet) move into xorg, I just downloaded the synaptics tarfile, untarred it and run make.

After that I followed the steps described in acompaning INSTALL file, basically:

1. cp synaptics_drv.o into /usr/X11R6/lib/modules/input/ (I'm unsure about the permisions so just chmod'ed it to have same permisions as the other files in the directory)

2. Add some lines to the XF86config file. Mine is below, it allows you to use any of the usb mouse, touchpad and clit pointer even at the same time:

Section "Files"

        RgbPath      "/usr/X11R6/lib/X11/rgb"

        ModulePath   "/usr/X11R6/lib/modules"

        FontPath     "/usr/X11R6/lib/X11/fonts/misc/"

        FontPath     "/usr/X11R6/lib/X11/fonts/Speedo/"

        FontPath     "/usr/X11R6/lib/X11/fonts/Type1/"

        FontPath     "/usr/X11R6/lib/X11/fonts/CID/"

        FontPath     "/usr/X11R6/lib/X11/fonts/75dpi/"

        FontPath     "/usr/X11R6/lib/X11/fonts/100dpi/"

EndSection

Section "ServerFlags"

    DontZoom

    DontZap

EndSection

Section "Module"

    Load "dbe"

    Load "extmod"

    Load "type1"

    Load "freetype"

    Load "dri"

    Load "glx"

    Load "record"

    Load "xtrap"

    Load "speedo"

EndSection

Section "DRI"

    Mode 0666

EndSection

Section "InputDevice"

    Identifier "Keyboard0"

    Driver     "Keyboard"

#    Option     "AutoRepeat" "500 30"

#    Option     "XkbModel" "pc105"

#    Option     "XkbLayout" "us_intl"

EndSection

Section "InputDevice"

    Identifier "Mouse0"

    Driver     "mouse"

    Option     "Protocol" "IMPS/2"

    Option     "Device" "/dev/input/mice"

    Option     "Emulate3Buttons" "off"

    Option     "ZAxisMapping" "4 5"

EndSection

#############################################

#synaptics pointer

Section "InputDevice"

  Driver        "synaptics"

  Identifier    "Mouse[1]"

  Option        "Device"          "/dev/psaux"

  Option        "Protocol"        "auto-dev"

  Option        "LeftEdge"        "1700"

  Option        "RightEdge"       "5300"

  Option        "TopEdge"         "1700"

  Option        "BottomEdge"      "4200"

  Option        "FingerLow"       "25"

  Option        "FingerHigh"      "30"

  Option        "MaxTapTime"      "180"

  Option        "MaxTapMove"      "220"

  Option        "VertScrollDelta" "100"

  Option        "MinSpeed"        "0.06"

  Option        "MaxSpeed"        "0.12"

  Option        "AccelFactor"     "0.0010"

  Option        "SHMConfig"       "on"

EndSection

#################################################

Section "Monitor"

    Identifier "monitor0"

    VendorName "Generic"

    ModelName  "Flat Panel 1400x1050"

    HorizSync   31.5-90

    VertRefresh 59-75

    # TV fullscreen mode or DVD fullscreen output.

    # 768x576 @ 79 Hz, 50 kHz hsync

    # ModeLine "768x576"     50.00  768  832  846 1000   576  590  595  630

    # 768x576 @ 100 Hz, 61.6 kHz hsync

    # ModeLine "768x576"     63.07  768  800  960 1024   576  578  590  616

EndSection

Section "Device"

    Identifier "device0"

    VendorName "ATI"

    BoardName "ATI Radeon (fglrx)"

    Driver "ati"

    Option "DPMS"

    BusID  "PCI:1:0:0"

    Option "AGPMode"        "4"

    Option "Accel"

    Option "EnablePageFlip" "on"

    Option "DDCMode"        "on"

    Option "IgnoreEDID"     "off"

#    Option "AGPFastWrite"   "on" hang!

EndSection

Section "Screen"

    Identifier "screen0"

    Device "device0"

    Monitor "Monitor0"

    DefaultColorDepth 24

    Subsection "Display"

        Depth 24

        Modes "1400x1050" "1280x1024"

#       Modes "1280x1024"

    EndSubsection

EndSection

Section "ServerLayout"

 Identifier  "Cervinia Layout"

 Screen "Screen 0"

 InputDevice "Mouse[1]" "CorePointer"

 InputDevice "Mouse0"   "AlwaysCore"

 InputDevice "Keyboard0" "CoreKeyboard"

EndSection

3. You will also need a kernel with this options on it:

```

/tmp/syna/synaptics-0.12.5

> gzip -dc /proc/config.gz | grep CONFIG_MOUSE_PS2

CONFIG_MOUSE_PS2=y

/tmp/syna/synaptics-0.12.5

> gzip -dc /proc/config.gz | grep CONFIG_INPUT_EVDEV

CONFIG_INPUT_EVDEV=y

```

That all, works like a charm. 

Now you don't have to mis the scroll wheel of your mouse when you are in the road.

Now set up gestures in mozilla to take plenty use of your pointers...[/quote]

----------

## vrghost

Just received one of these T41 and playing around with it. But there are three devices I still have not got running.

1. WiFi interface

      Found a lot of docs on how to get it running. But right now it is rather unimportant. Will have to wait until tomorrow or something.

2. IRDa interface.

     Might be fun, but not important at the moment, but anyone who knows what chipset/driver to use, please do tell.

3. Bluetooth interface.

     This is the one that I realy want running. And I have a problem finding any kind of info on how to get the bluetooth environment running properly. 

So if anyone happens to have a clue how I can get the IRDA and the bluetooth working in the kernel I would owe that person a pint. And I stand by my word (even though you might have to be in London for the occasion)

----------

## phuber

Kernel 2.6: For bluetooth support, enable that bluetooth protocols found under networking then enable the bluetooth-usb device driver since the bluetooth chip is internally hooked to the usb. fn-f5 to enable the chip.

I compiled it as a module so I can load that as needed and save power when I don't need bt.

I tried connecting to my ericsson but that didn't seem to work at all. Nevertheless, the kernel config mentioned above should basically work.

--

I myself have lots of troubles getting 3D to work. There are ton's of hints out there but nothing seems to work. I also wonder why I have to enter this ChipID in the X config and what value it should be. Nothing seems to work

And since xfree-drm is kernel 2.4 only (as of now) I'm messing with the ati fglrx driver but...

Has anyone a working X setup with 3D under 2.6? I'd love to have a look at you configs...

----------

## kpoman

Hello!

I am very interested in buying that laptop, they say its autonomy is very good! But I know IBM uses its own software to enhance battery length;

I'd like to know if its gonna work well with Linux. Could someone please tell, using same apps, whats the ratio between windows and linux lifetime cycle ?

thanks  :Smile: 

----------

## squareHat

I don't know much about the enhancement for windows.

But you can throttle the CPU, under Linux

you can use ACPI, or you can use APM,

I am still using APM as I still are using a 2.4 kernel, so you can suspend, blank the screen when your not doing anything.

In order to get the disk to power down you will need to change the journalling options on whatever filesystem you choose.

----------

## phuber

I found acpi to be somewhat not working. x does not survive a suspend regardless of the video card driver so I went back to APM (kernel 2.6).

cpu frequency scaling works very well with the modules speedstep_centrino and freq_table loaded and the powernowd loaded (the powernowd is cpu-independent). cpufreqd didn't seem to work at all.

----------

## ph03n1x

Enable also the speedstepping stuff for the kernel, this works as well

Concerning xorg i can say it works  :Wink: 

----------

## phuber

My last post wasn't clear. It should've read something like speedstep didn't work for a while but now does with modules x, y and the powernowd.

From my observations, it seems that speedstep doesn't work automatically - you need a daemon that tells the cpu what speed to run at.

For XFree... You got everything working with 2.6, acpi, and what video driver? So far, the X radeon driver was the only one to wake up reliably from suspend. And that under apm only.

Could you please post the important parts of your config files etc?

thanks

----------

## OSTSJoe

Nice howto. I've got a t41 with gentoo and 2.6. I've got throttling working agressivly and tried all sorts of tweaks with the hard drive, but I can't get the battery to last over 2.5 hours. I even called ibm and had them overnight me a new battery (hows that for customer service) but that didn't help at all. Anyone know whats causing this?

----------

## !db!

Hello,

I just bought a T41 (should be getting it next week). I currently use Gentoo on 2 other computers: 1 desktop and a Thinkpad 600. Both have dual boot with XP.

IBM preinstalls XP Pro (under, I believe, a single NTFS partition) on T41s. They offer a reinstallation disk which resets everything to factory settings. I've never really had any problems dual-booting with my other machines, but I'm slightly concerned about this one ... what are you experiences, and/or how have you manage to dual-boot (or are you all using Gentoo only)?

Thanks for any feedback (and great overview of a Gentoo install on a T41!)

----------

## barlad

No problem dual booting here. I resized my NTFS partition using PartitionMagic (there are a lot of freewares/sharewares out there for that kind of work) then installed gentoo on the freespace. I am using grub to dual boot.

There are a few things that I still have to make work on my T41:

- Fn+F12 for suspend to disk. Neither apm or acpi seem to recognize that event. (it is not even logged). Regular suspend to disk works well unless I activate dri.

- Fn + F2 for "blank out screen" is not recognized by ACPI. Not sure how I can make that work.

- Suspend to Ram crashes due to X. It's due to dri. Did any of you manage to have resume work with X using dri (either ati or xfree drivers)?

- Cannot use IBM sensors. You have to use ACPI if you want to get CPU temperature and a few other information. lm-sensors won't work since apparently some IBM laptops can get their hardware corrupted if you are trying to use lm-sensors on them.

----------

## !db!

Thanks barlad!

Going through another forum on thinkpads, resizing the NTFS seems like the preferred option. My question now would be how much resizing is possible? Could you split up a 30GB hard drive into 2?

----------

## barlad

Yeah without any problem. As far as I remember, you can resize your partition as much as you want as long as it does not imply deleting some datas (otherwise it would ruin the whole purpose of "resizing").

----------

## lblblb

Hi,

I'm having problems with my grub config.  I came across your documentation.  It's great, very easy to follow (except note the difference for the 2.6 kernel in the make bzImage)

I know this will sound funny, given that I'm having problems with grub, but I think you may have mis-written  grub/partition related info.  Please confirm.

You say your partitions are:

```
 Device Boot Start End Blocks Id System

/dev/hda1 * 1 5 40131 83 Linux

/dev/hda2 6 255 2008125 82 Linux swap

/dev/hda3 256 280 200812+ 83 Linux

/dev/hda4 281 7296 56356020 8e Linux LVM
```

 mapped to the filesystem as:

```

#mke2fs -j /dev/hda1 (Ext3 for boot)

#mkswap /dev/hda2 (swap)

#mke2fs -j /dev/hda3 (Ext3 for root 200Megs in this case)
```

then, you mount the filesystems into the proper subtree for chroot'ing, and then you chroot.

....do a bunch of system set up stuff...

then grub:

```
grub> root (hd0,0)

grub> setup (hd0)

grub> quit 
```

I'm with you so far -- the "root" here "the disk" and "the partition" numbers (counting from 0, of course) of the partition housing /boot, right? (in your case /dev/hda1).  Any time we see "(hd0,0)", we can effectively replace it in our minds with "/boot". If I follow your document, then "root" doesn't *actually* mean the location of the root filesystem which would be (hd0,2) aka /dev/hda3 , right?  It instead points to "/boot".

and " setup (hd0)" means to install the bootloader to the MBR of /dev/hda , right?

and so then, a clip from your grub.conf...

```
default 1

timeout 5

splashimage=(hd0,0)/grub/splash.xpm.gz

title=Gentoo Linux Stable

  root (hd0,0)

  kernel (hd0,0)/boot/vmlinux.stable root=/dev/hda3
```

now, in the splashimage, we have the path (using substitution) of /boot/grub/splash.xpm.gz" , which looks correct to me.

Then, for some reason, grub wants us to again declare "root" (but it's actually "/boot"), so we do; as before, "root" (aka "/boot") still points to "(hd0,0)" (aka "/dev/hda1")

but then there's (using the "(hd0,0)" = "/dev/hda1" = "/boot" substitution):

kernel /boot/boot/vmlinux.stable root=/dev/hda3

so, the path for the kernel *appears* to me to be incorrect, as it should be instead "(hd0,0)/vmlinux.stable  -- can you confirm this as correct or erroneous?

and then, somehow, after all this, because of grub's screwy, dumb syntax for using the keyword "root" to mean both "root location for grub" and "root filesystem", "root"="/dev/hda3"="/"="(hd0,2)"

What just happened in that last line?

----------

## miju

Hi there,

since kernel 2.6.7 i got everything work i need:

Suspend to Ram with ACPI

Software Suspend (swsusp2)

both with the r200 DRM without crashes and working usb after resume

the only thing that i don't like is to restart the computer if i want to use atitvout...

do you know alternatives?

----------

## phuber

I'm still having problems with acpi. Could you please post the following things:

- XF86config

- Kernel Config

- /etc/acpi

Thanks!

----------

## miju

I use the 2.6.7 stable Kernel from kernel.org

patched with software-suspend-2.0.0.88-for-2.6.7 from swsusp.sourceforge.net

I installed the drm r200 and common files from http://www.freedesktop.org/~dri/snapshots

I am using xorg-x11 because software suspend with xfree 4.3 and drm did not work.

my .config: 

http://www.student.informatik.tu-darmstadt.de/~fabio_l/t40_config/.config

my xorg.conf

http://www.student.informatik.tu-darmstadt.de/~fabio_l/t40_config/xorg.conf

my suspend script:

http://www.student.informatik.tu-darmstadt.de/~fabio_l/t40_config/suspram.sh

important lines in the /etc/suspend.conf are:

SWSUSP_LEAVE_X_BEFORE_SUSPEND="nvidia"

SWSUSP_UNLOAD_MODULES_BEFORE_SUSPEND="yes"

Hope that helps.

Greets Fabio

----------

## vrghost

First, nice walkthrough, saves time, and thats allways nice.

Jupp, someone decided that I should have one of these small nice T41 (think it is the T41P, it is the one with Wi-Fi and bluthouth, also a gigabit ethernet adapter, last time I installed it on this machine it seem to take the eepro100 driver but not anymore, (yes this is the second time, I was stupid enough to actually belive that the internal winblows team at my company would understand that I did not mean ghost my disk when I said dont touch the partition table).

Anyway, the driver seems to be 

(have some problems with sockets on this one, so if you are building from stage one you might want to wait a while with this one)

Will get back to this some other day.

e1000. so just modprobe that after boot and it seems to do the trick, will add any other usefull information I find (so I can find it the next time I or someone else manage to fuck up the install  :Smile:  )Last edited by vrghost on Mon Jul 05, 2004 8:13 pm; edited 2 times in total

----------

## !db!

I just bought a T41 from IBM (2378DMF). Here's a bit of info on how I successfully configured gentoo-dev-sources. Thanks to all previous Gentoo'ers who successfully, through trial and error, managed to configure various thinkpads ... and who have posted their experiences.

I need, like many, a Win/'Nix combo (dual-boot), so I first let the T41 boot straight out of the box so the IBM preinstallation XP PRO/NTFS setup could do it's thing. Changed the BIOS so it could boot from CDs. Then defragged the HD and resized the NTFS partition with QtParted available on the SystemRescueCD. Only kept 8GB for Gentoo ...

2.6.7-r8 stage 1 installation from a 1.4 LiveCD downloaded over 6 months ago. Didn't try setting up the built-in wireless at first, instead went for the built-in ethernet. A few tweaks and away I went ...

fdisk /dev/hda

```
DEVICE    BOOT START  END  BLOCKS     ID  SYSTEM

/dev/hda1 *    1      2293 17335048+  7   HPFS/NTFS

/dev/hda2 *    2294   2298 37800      83  Linux

/dev/hda3      2299   2365 506520     82  Linux swap

/dev/hda4      2366   3403 7847280    83  Linux
```

/etc/make.conf

```
USE="-gnome f77 kde qt X gtk2 tcltk dvd cdr samba cups alsa"

CHOST="i686-pc-linux-gnu"

CFLAGS="-O3 -march=pentium3 -fomit-frame-pointer -funroll-loops -pipe"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j2"

AUTOCLEAN="yes"
```

My .config for 2.6.7-r8. Reading various posts, with a fair amount of additional tweaking, I got the main hardware I'm interested in working perfectly. It isn't always clear from their posts if Gentoo'ers are installing gentoo-dev-sources or not, so one can get quite confused as to what kernel options and what modules should be installed  :Confused:  . What I think are key kernel settings:

```
Processor type and features ---> Processor family (Pentium M)

Power management options (ACPI, APM) ---> Power Management Support (Y)

                                     ---> ACPI Support et cie (Y)

                                     ---> APM (N)

Bus Options ---> PCI Support (Y) ---> PCI Hotplug support ---> Support for PCI Hotplug (Y)

                                                          ---> ACPI PCI Hotplug driver (Y)

Device Drivers ---> Networking Support (Y) ---> Bluetooth subsystem support (M)

                                           ---> Ethernet (1000 Mbit) ---> Intel Pro/1000

               ---> Input device support ---> (1400) Horizontal screen resolution

                                         ---> (1050) Vertical screen resolution

               ---> Character devices ---> /dev/agpgart (Y)

                                      ---> Intel 440LX ... (Y)

                                      ---> Direct Rendering Manager (Y)

                                      ---> ATI Radeon (Y)

               ---> Graphics support ---> ATI Radeon display support (Y)

                                     ---> DDC/I2C for ATI Radeon support (Y)

               ---> Sound (M) ---> ALSA (mostly M)

               ---> USB (mostly M)
```

NB - Bluetooth and USB are installed as modules, but are not currently loaded - No such devices at home, so no testing yet.

/etc/fstab

```
/dev/hda2           /boot      ext2        noauto,noatime   1 2

/dev/hda4           /          reiserfs    noatime          0 1

/dev/hda3           none       swap        sw               0 0

/dev/cdroms/cdrom0  /mnt/cdrom auto        noauto,user,ro   0 0

none                /proc      proc        defaults         0 0

none                /dev/shm   tmpfs       defaults         0 0
```

Emerged xfree (no xfree-drm!!!). XF86Config here and some snippets:

```
Load "glx"

Load "dri"

...

Section "Device"

  Identifier "Mobility 7500"

  Driver     "radeon"

  #...

  Boardname  "ATI radeon Mobility M7 LW"

  Option     "AGPMode" "4"

  Option     "Accel"

  Option     "AGPFastWrite" "Yes"

  Option     "EnablePageFlip" "on"

  Option     "DDCMode" "Yes"

  BusID      "PCI:1:0:0"

EndSection

...

Section "DRI"

  Mode 0666

EndSection
```

Emerged ipw2100 for the wireless. Many posts on various configurations (scripts, ifplugd, etc.) for getting wireless/wired/no-lan setups on boot, but I haven't tweaked with this much yet. For the moment ...

/etc/conf.d/net

```
iface_eth0="dhcp"

dhcpcd_eth0="-t 2"

# only waits a few seconds on boot for a 'wired' dhcp, if not moves on

# (but of course slightly complains that no eth0 was found ...)
```

I only use the built-in wireless at home, and for the moment I just:

```
modprobe ipw2100

dhcpcd eth1
```

and that works fine for me when I need it ... Note: whenever a new kernel is recompiled, hostap-drivers and ipw2100 need re-emerging.

Set up ALSA sound exactly as x86processor did here ... bottom of the page ... ... thanks! Worked like a charm.

I'm very happy with the T41. Thin, light, and awfully quick compared to what I'm used to. Battery life is well over 3.5 hours for sure. IBM keys work fine. In the end, I think 2.6-xx makes life simpler for hardware recognition and configuration. I can say this because I previously spent some time configuring a Thinkpad600 running 2.4 ... and not as easy. Hope this may help someone. Good luck.

----------

## Eagle_

Hi

I bought recently a T41 (IBM ThinkPad) computer and i install Gentoo on it.

I had been told it would be good for the battery to be empty completly once a month. I saw at my friend computer (runing windows on it) that he had a program he can acces it while the computer just starting by pressing on Access IBM. This program can empty his computer battery completly. I didnt press on Access IBM before i install my gentoo on my computer so i dont know if i where having this program or not.

My qestion is: Is there a program from linux which can empty the battery completly? or i just suppose to use the battery until the computer crash by out of battery volts? (I think the second way is not so good).

P.S

I bought the bigger battry cepasety, and it last for about 6.5h with XFCE4 and about 5.8-5.9 with KDE 3.2.2

Thanks

----------

## allucid

the access ibm program is installed on another partition of your hard drive separate from windows. it is still there unless you explicitly removed it.

----------

## Butts

Could I see someone's grub.conf that is dual booting with WinXP. I keep getting Error 18.   :Mad:   :Mad: 

Thanks.

Matt

----------

## geekporn

http://www-307.ibm.com/pc/support/site.wss/document.do?lndocid=MIGR-48NT8D

this is ibm stuff... not tested with gentoo but there are resources at the bottom of the page that might help in configureing bluetooth, wireless, accessing recovery partition, etc.

----------

## !db!

Butts wrote *Quote:*   

> Could I see someone's grub.conf that is dual booting with WinXP. I keep getting Error 18.

 

Not sure if this helps, but dual booting works in my case with this very basic setup

```
default 0

timeout 10

splashimage=(hd0,1)/grub/splash.xpm.gz

title=GENTOO 2.6.7-r8

root (hd0,1)

kernel /kernel-2.6.7-gentoo-r8 root=/dev/hda4 video=vesa,mtrr

title=WINDOWS XPpro

rootnoverify (hd0,0)

chainloader +1
```

You can look up additional 'related' settings (fstab, etc.) on the previous page.

----------

## sebbb

 *miju wrote:*   

> the only thing that i don't like is to restart the computer if i want to use atitvout...

 

Sorry for my english...

How to use atitvout ?

I've always (even with '-f' argument) :

```
VBE call failed
```

I'm using gentoo-source (2.4)

Must I use the 2.6 kernel sources ?

Thanks

----------

## Butts

I have cpufreqd working, but I want to be able to adjust the frequency myself. I am trying to do this with the gkrellm plugin, but it keeps hanging.

Anyone have any insight?

Thanks in advance,

Matt

----------

## Butts

Also, when I shutdown my system from Gentoo, everything halts, but the system never fully powers down. I have to hold the power button for five seconds.

What is causing this and how do I fix it?

Matt

----------

## sebbb

 *Butts wrote:*   

> Also, when I shutdown my system from Gentoo, everything halts, but the system never fully powers down. I have to hold the power button for five seconds.
> 
> What is causing this and how do I fix it?
> 
> Matt

 

Have you include the APM support in your kernel ?

Who have a .config for the 2.6 kernel version ?

----------

## allucid

 *squareHat wrote:*   

> So for I have found that you need to have:
> 
> Local APIC support on uniprocessors has to be disabled for the machine to shutdown properly
> 
> 

 

----------

## kdag

hi t41 users!

i just found this thread, i have had a gentoo only stage2 install since 4months now,

finally i have some time to try to "fix" my xorg.conf so to be able to control any video projector as a second screen, i have tried tweaking the xorg.conf file but no luck yet, i have drm working and im afriad of messing to much to break it all. is there someone ho has it already working?

i mean, t41 with a ati 7500, 1024x768?

plis share it with me )

and second Q. i have this partition map:

Disk /dev/hda: 40.0 GB, 40007761920 bytes

240 heads, 63 sectors/track, 5168 cylinders

Units = cylinders of 15120 * 512 = 7741440 bytes

   Device Boot      Start         End      Blocks   Id  System

/dev/hda1   *           1           5       37768+  83  Linux

/dev/hda2               6          72      506520   82  Linux swap

/dev/hda3              73        3948    29302560   83  Linux

/dev/hda4            3949        5168     9223200   83  Linux

i have the IBM restore cds, i planned before to install the windows but someone told me that they run installing all into the 1st partition and i dont want to do that. So, is it possible to do the install in that last partition hda4?? if not can someone tell me how to make it of any use since i have it as a free space.

thnks

/a

----------

## lahaine

Hi, thanks a lot for the guide - it was very useful!

However, although I successfully installed Gentoo side-by-side with XP Pro on my T41, and dual-booting worked fine, and most of the laptop features were working under Gentoo, I had to remove Gentoo.

The problem was that I could see the linux partitions under Windows! They were there as raw partitions, which meant it gave them drive letters, which made Explorer hard to use - every time I accidentally selected on of the linux drives, it offered to format it!

I scoured the forums, I scoured Google, I tried reinstalling Gentoo twice, starting from scratch, but to no avail.  I tried ext2, ext3 and reiserfs, and it also happened with the swap partition. I've installed Gentoo successfully on many machines, mostly dual-booting with Windows 2000 or XP, and never seen this elsewhere.

Anyone any ideas? I had a large NTFS partition for Win XP (shrunk from the original 60 GB), then hda2 was boot, hda3 was swap, hda4 was root - all primaries. Nothing else there.

----------

## Boworr

lahaine, 

Windows can't read Linux formatted file systems natively unless you choose FAT32 (VFAT). When you booted into Windows it offered to format your drives because it couldn't find any filesystem it knew about. 

There are some utilities/drivers that allow you to access linux filesystems from Windows but I use Paragon's Mount Everything http://www.mount-everything.com/

----------

## SiggiS

Hi,

I got my T41p some weeks ago and now I want to install it on this machine. So anyone here who installed gentoo from scratched in the last few weeks and get tell me how it works and how long it takes ... Im not sure if I do a install from boostrap.

I hope for some answers  :Smile: 

Greetings Marc

----------

## zbindere

I have problems getting wireless to work. I emerged ipw2100 and then:

```
modprobe ipw2100
```

lsmod gives:

```
Module                  Size  Used by

ipw2100                88412  0

firmware_class          7680  1 ipw2100

ieee80211              15236  1 ipw2100

ieee80211_crypt         4484  1 ieee80211

sg                     28960  0

snd_mixer_oss          17408  1

snd_intel8x0           28584  2

snd_ac97_codec         67280  1 snd_intel8x0

snd_pcm                81928  1 snd_intel8x0

snd_timer              20996  1 snd_pcm

snd_page_alloc          7560  2 snd_intel8x0,snd_pcm

snd_mpu401_uart         6144  1 snd_intel8x0

snd_rawmidi            19364  1 snd_mpu401_uart

nls_iso8859_1           3968  1

nls_cp437               5632  1

vfat                   11904  1

fat                    38688  1 vfat
```

when I do:

```
ifconfig -a

```

I only see the ethernet card (eth0) but no wireless card. do I really need the hostab driver? when I emerged ipw2100 I didn't get a message that I needed that driver.

any suggestions?

----------

## daff

I was under the impression that most of the IBM Thinkpads use an Atheros based wireless card, not an Intel Pro Wireless, at least I was told so in some other thread in OTW. Maybe you should try using the madwifi drivers? Just a thought.

----------

## lahaine

The Centrino Thinkpads have the Intel Pro Wireless by definition, and that's how mine came.

However, as that only does 802.11b, I whipped that out and installed the IBM a/b/g wifi card, which is based on the Atheros chipset. (The a coverage at work is much better than the g). You can get this IBM card as a standard install thing, depends which model you choose.

I believe newer Centrino kits can do b and g now.

The cool thing was, the BIOS screen when I first booted after changing cards changed form a big Centrino logo to a small Pentium M logo. I guess the 855 chipset checks each of the three Centrino components...

----------

## daff

Hm that's good to know! So the Centrino-Thinkpads have an IPW chip and the non-Centrinos are Atheros based. So I suppose this T41p (which I plan to get) has an Atheros card since I don't see any indication that it is a Centrino model.

----------

## lahaine

daff, yes - your model laptop is very similar to mine, and as it says

'IBM 11a/b/g Wi-Fi Wireless'

it contains the Atheros chip for wifi, which is what I upgraded to.

----------

## woodwizzle

I'm thinking about getting a thinkpad to put gentoo on as well! Great article. Is it possible to get the fingerprint scanners to work in linux?

----------

## stgreek

 *woodwizzle wrote:*   

> I'm thinking about getting a thinkpad to put gentoo on as well! Great article. Is it possible to get the fingerprint scanners to work in linux?

 

I dont think there is Linux software yet, but judging from IBM's past it shouldn't be long before it is added. However, if you only use the scanner on boot it is OS-irrelevant, so you should be fine.

----------

## markandrew

lahaine - did you tag the partitions as linux ones? if you used windows to create the partitions in the firts place they were prob tagged as windows, even if you later formatted them with ext2 or whatever.

----------

## euphorium

I posted a comment here about an emerge problem I have but it has to do with my wireless problem as well.  Anyway, I was wondering if anyone here that has posted has gotten their wireless card working. 

I have been working with gentoo for a few years now, but this new networking setup is a bit confusing to me. Easier yes but, way different than 6 - 12 months ago. Any ideas would be great!

I am running a T41:

Pentium M 1600

1 GB Memory

ATI Mobility - radeon

Intel Wireless - ipw2100

Gigafast Net - e1000

Here is the error I get with:

dmesg | grep ipw2100

```
ipw2100: Intel(R) PRO/Wireless 2100 Network Driver, git-1.2.2

ipw2100: Copyright(c) 2003-2006 Intel Corporation

ipw2100: Detected Intel PRO/Wireless 2100 Network Connection

ipw2100: eth0: Firmware 'ipw2100-1.3.fw' not available or load failed.

ipw2100: eth0: ipw2100_get_firmware failed: -2

ipw2100: eth0: Failed to power on the adapter.

ipw2100: eth0: Failed to start the firmware.

ipw2100Error calling register_netdev.

ipw2100: probe of 0000:02:02.0 failed with error -5

```

Thanks!

----------

