Difference between revisions of "Installing Debian on a ThinkPad G41"

From ThinkWiki
Jump to: navigation, search
(What to do with existing Windows partition?)
(a few minor edits)
Line 1: Line 1:
==What to do with existing Windows partition?==
+
<h2>What to do with existing Windows partition?</h2><br>
If you want to keep the Windows XP partition you should seriously consider whether you want it to be VFAT or NTFS, because on the very first bootup of the system it will automatically run a command to convert from VFAT to NTFS.  I recommend disabling the automatic conversion as per instructions [http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2004-February/016069.html here], i.e.:
+
If you want to keep the Windows XP partition you should seriously consider whether you want it to be VFAT or NTFS, because on the very first bootup of the system it will automatically run a command to convert from VFAT to NTFS.  I recommend disabling the automatic conversion as per instructions <a href=”http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2004-February/016069.html”> here</a>, i.e.:<br>
 
+
<br>
Using Knoppix, mount the XP partition under /win:
+
Using Knoppix, mount the XP partition under /win:<br>
:{{cmdroot|mkdir /win; mount /dev/hda1 /win}}
+
<br>
 
+
<code>mkdir /win; mount /dev/hda1 /win</code><br>
windows/system32/convert.exe:
+
<br>
:{{cmdroot|mv /win/windows/system32/convert.exe /win/windows/system32/convert_.ex_}}
+
<b>windows/system32/convert.exe:</b><br>
windows/system32/autoconv.exe:
+
<code>mv /win/windows/system32/convert.exe /win/windows/system32/convert_.ex_<br></code>
:{{cmdroot|mv /win/windows/system32/autoconv.exe /win/windows/system32/autoconv_.ex_}}
+
<b>windows/system32/autoconv.exe:</b><br>
i386/convert.exe<br>
+
<code>mv /win/windows/system32/autoconv.exe /win/windows/system32/autoconv_.ex_</code><br>
:{{cmdroot|mv /win/i386/convert.exe /win/i386/convert_.ex_}}
+
<b>i386/convert.exe</b><br>
i386/autoconv.exe<br>
+
<code>mv /win/i386/convert.exe /win/i386/convert_.ex_</code><br>
:{{cmdroot|mv /win/i386/autoconv.exe /win/i386/autoconv_.ex_}}
+
<b>i386/autoconv.exe</b><br>
 
+
<code>mv /win/i386/autoconv.exe /win/i386/autoconv_.ex_</code><br>
I like to keep the Windows XP partition for at least a little while to run it and see how much development effort IBM has spent to make the user experience under Windows a full-featured one, complete with many assistant applications and helper utilities rich in multi-media content and graphics - in sharp contrast with what they provide for Linux users.
+
<br>
 
+
I like to keep the Windows XP partition for at least a little while to run it and see how much development effort IBM has spent to make the user experience under Windows a full-featured one, complete with many assistant applications and helper utilities rich in multi-media content and graphics - in sharp contrast with what they provide for Linux users.<br>
IBM does not provide the rescue/recovery CD set with this model so I suggest before anything else that you immediately boot into Windows and create the set if you think you will ever want to re-image the drive.  You could always order the set from IBM for $45.  The set from IBM consists of a "Rescue and Recovery" CD plus 6 "Product Recovery" CD's which contain the actual image that gets written to the hard drive.   
+
<br>
 
+
IBM does not provide the rescue/recovery CD set with this model so I suggest before anything else that you immediately boot into Windows and create the set if you think you will ever want to re-image the drive.  You could always order the set from IBM for $45.  The set from IBM consists of a "Rescue and Recovery" CD plus 6 "Product Recovery" CD's which contain the actual image that gets written to the hard drive.  <br>
After creating the recovery CD set I recommend going into the BIOS and setting the "IBM Predesktop Area" in the BIOS under "Security" to "Disabled".  This enables you to remove the “PreDesktop Environment” area, which is the second partition and takes over 3 GB of disk space.  The Predesktop Environment is not very useful unless you want to have the feature of being able to re-image your disk and re-install Windows from scratch.  If you're really concerned that you will somehow badly screw up your Windows environment - if you ever use it :-)  - you can always create restore points without wasting precious disk space on the Predesktop Environment.
+
<br>
 
+
After creating the recovery CD set I recommend going into the BIOS and setting the "IBM Predesktop Area" in the BIOS under "Security" to "Disabled".  This enables you to remove the “PreDesktop Environment” area, which is the second partition and takes over 3 GB of disk space.  The Predesktop Environment is not very useful unless you want to have the feature of being able to re-image your disk and re-install Windows from scratch.  If you're really concerned that you will somehow badly screw up your Windows environment - if you ever use it :-)  - you can always create restore points without wasting precious disk space on the Predesktop Environment.<br>
==Notes on the model used in this setup==
+
<br>
This info is for setting up Debian on a G41 with the following features:
+
<br>
* Processor: Mobile Intel Pentium 4 Processor 548 with HT Technology
+
<b>Notes on the model used in this setup:</b><br>
* Graphics: NVIDIA GeForce FX Go5200 (nVidia Corporation NV34M)
+
<br>
* Display: 1400x1050 SXGA+
+
This info is for setting up Debian on a G41 with the following features:<br><ul>
* Wireless: ThinkPad 11b/g Wi-Fi Wireless (Atheros Communications, Inc. AR5212 802.11abg)
+
<li> Processor: Mobile Intel Pentium 4 Processor 548 with HT Technology<br>
* Ethernet: Integrated Gigabit Ethernet (Broadcom Corporation NetXtreme BCM5705M_2)
+
<li> Graphics: NVIDIA GeForce FX Go5200 (nVidia Corporation NV34M)<br>
* Sound: SoundMAX (Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller)
+
<li> Display: 1400x1050 SXGA+<br>
 
+
<li> Wireless: ThinkPad 11b/g Wi-Fi Wireless (Atheros Communications, Inc. AR5212 802.11abg)<br>
If your model does not have these features, then some or most of this information might not apply.
+
<li> Ethernet: Integrated Gigabit Ethernet (Broadcom Corporation NetXtreme BCM5705M_2)<br>
 
+
<li> Sound: SoundMAX (Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller)<br>
== Disk Preparation and Partitioning ==
+
<br>
Next I ran Knoppix again and used the QTparted graphical disk partitioning tool to alter the partition layout of the drive.  I deleted the recovery/predesktop partition (partition 2) and shrunk the XP partition (partition 1  to 8 GB.  QTParted will correctly resize the XP partition regardless of whether it is VFAT or NTFS.  Finally, I created a 2300 MB swap partition as the second partition and used the remainder of the disk (partition 3) as one large XFS filesystem for Linux.  The reason I chose the high value for the swap partition size was so that it can accommodate suspend to disk, which requires a swap partition larger than the amount of installed RAM, and allowing for the maximum 2GB of RAM to be installed.
+
If your model does not have these features, then some or most of this information might not apply.<br>
 
+
<br>
== Debian installation ==
+
<h2>Disk Preparation and Partitioning</h2><br>
After this I installed {{Debian}} using an official i386 Debian minimal bootable CD netinst image obtained from http://www.us.debian.org/CD/netinst/
+
Next I ran Knoppix again and used the QTparted graphical disk partitioning tool to alter the partition layout of the drive.  I deleted the recovery/predesktop partition (partition 2) and shrunk the XP partition (partition 1  to 8 GB.  QTParted will correctly resize the XP partition regardless of whether it is VFAT or NTFS.  Finally, I created a 2300 MB swap partition as the second partition and used the remainder of the disk (partition 3) as one large XFS filesystem for Linux.  The reason I chose the high value for the swap partition size was so that it can accommodate suspend to disk, which requires a swap partition larger than the amount of installed RAM, and allowing for the maximum 2GB of RAM to be installed.<br>
 
+
<br>
When the CD booted I pressed the {{key|F3}} key which gave instructions to type "expert26" at the boot prompt in order to install in expert mode using a more recent 2.6 Linux kernel.  I accepted the defaults for all questions except that when it asked about partitioning the disk I chose the option to "manually edit the partition table".  This is because I already partitioned the disk with QTParted above and created the swap and XFS filesystems I plan to use.  So in the manual partition setup section I simply told it to use hda2 as swap and to use hda3 as xfs, assign the mount point "/" to it, and to format the filesystem.  Once this is done the rest is simple.  When it asked about making Linux bootable directly from the hard disk, it is important to NOT chose the Grub boot loader since the version included with the installer has a serious problem dealing with XFS filesystems.  Choose Lilo instead and everything will be fine.
+
<h2>Debian installation</h2><br>
 
+
After this I installed Debian using an official i386 Debian minimal bootable CD netinst image obtained from http://www.us.debian.org/CD/netinst/<br>
After the first reboot during the install it asks to set up apt sources.  I chose to use http and selected a local mirror in my country.  It then asked if I want to choose packages to install and I said no.  My philosophy is to install Debian with the minimal amount of stuff, get it working, and then later on install any other applications I want.  Also, if you plan on dist-upgrading from stable to testing or Sid then it is easier to do with only a minimal installation.
+
<br>
 
+
When the CD booted I pressed the {{key|F3}} key which gave instructions to type "expert26" at the boot prompt in order to install in expert mode using a more recent 2.6 Linux kernel.  I accepted the defaults for all questions except that when it asked about partitioning the disk I chose the option to "manually edit the partition table".  This is because I already partitioned the disk with QTParted above and created the swap and XFS filesystems I plan to use.  So in the manual partition setup section I simply told it to use hda2 as swap and to use hda3 as xfs, assign the mount point "/" to it, and to format the filesystem.  Once this is done the rest is simple.  When it asked about making Linux bootable directly from the hard disk, it is important to NOT chose the Grub boot loader since the version included with the installer has a serious problem dealing with XFS filesystems.  Choose Lilo instead and everything will be fine.<br>
== Installing a few important packages ==
+
<br>
Here are a few important packages that it is good to install right away:
+
After the first reboot during the install it asks to set up apt sources.  I chose to use http and selected a local mirror in my country.  It then asked if I want to choose packages to install and I said no.  My philosophy is to install Debian with the minimal amount of stuff, get it working, and then later on install any other applications I want.  Also, if you plan on dist-upgrading from stable to testing or Sid then it is easier to do with only a minimal installation.<br>
:{{cmdroot|apt-get install less vim}}
+
<br>
:{{cmdroot|apt-get remove --purge nvi}}
+
<h2>Installing a few important packages</h2><br>
 
+
Here are a few important packages that it is good to install right away:<br>
vim is a much better than nvi.  Less is much better than more which is installed by default.
+
<code>apt-get install less vim</code><br>
 
+
<code>apt-get remove --purge nvi</code><br>
 
+
<br>
== Building a Linux kernel with [http://www.suspend2.net/ Software Suspend 2] Support==
+
vim is a much better than nvi.  Less is much better than more which is installed by default.<br>
As of this writing [http://www.suspend2.net/ Software Suspend 2 (swsusp2)] is the only working implementation of power-saving functionality available. ACPI sleep and standby modes and the in-kernel software suspend do not work with this model. swsusp2 provides a patch for the kernel. Which version of kernel you use is dependent upon which version of swsusp2 you wish to use. There is a development version which has the latest-and-greatest features and bugfixes, and the stable version which is slightly older. For this article I chose to use the latest-and-greatest which was version 2.2-rc8 which requires Linux kernel version 2.6.14-rc3. This is a “release candidate” kernel which is available from the usual kernel repositories under the /testing subdirectory.
+
<br>
 
+
<br>
===Preparing for the kernel build===
+
<h2>Building a Linux kernel with <a href=”http://www.suspend2.net/”>Software Suspend 2</a> Support</h2><br>
There are a few packages that must be installed prior to compiling a kernel:
+
As of this writing <a href=”http://www.suspend2.net/”>Software Suspend 2</a>(swsusp2) is the only working implementation of power-saving functionality available. ACPI sleep and standby modes and the in-kernel software suspend do not work with this model. swsusp2 provides a patch for the kernel. Which version of kernel you use is dependent upon which version of swsusp2 you wish to use. There is a development version which has the latest-and-greatest features and bugfixes, and the stable version which is slightly older. For this article I chose to use the latest-and-greatest which was version 2.2-rc8 which requires Linux kernel version 2.6.14-rc3. This is a “release candidate” kernel which is available from the usual kernel repositories under the /testing subdirectory.<br>
:{{cmdroot|apt-get install ncftp build-essential bin86 libncurses-dev bzip2}}
+
<br>
 
+
<b>Preparing for the kernel build</b>
===Getting the kernel source===
+
There are a few packages that must be installed prior to compiling a kernel:<br>
Use an ftp client like ncftp to retrieve linux-2.6.14-rc3.tar.bz2 from
+
<code>apt-get install ncftp build-essential bin86 libncurses-dev bzip2</code><br>
ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing .
+
<br>
 
+
<b>Getting the kernel source</b><br>
:{{cmdroot|cd /usr/src}}
+
Use an ftp client like ncftp to retrieve linux-2.6.14-rc3.tar.bz2 from<br> <a href=”ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing”> ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing</a>:<br>
:{{cmdroot|ncftp}}
+
<code>
::{{cmd|open ftp.kernel.org|ncftp> }}
+
cd /usr/src<br>
::{{cmd|cd pub/linux/kernel/v2.6|ncftp> }}
+
ncftp<br>
::{{cmd|get linux-2.6.14-rc3.tar.bz2|ncftp> }}
+
open ftp.kernel.org<br>
::{{cmd|bye|ncftp> }}
+
cd pub/linux/kernel/v2.6/testing<br>
 
+
get linux-2.6.14-rc3.tar.bz2<br>
===Unpack the kernel, configure, and compile===
+
bye<br></code>
:{{cmdroot|tar -xjf linux-2.6.14-rc3.tar.bz2}}
+
<br>
At this point I prefer to rename the kernel source tree so that if at some point in the future I wish to build another kernel version, I can do so in a separate tree.
+
<b>Unpack the kernel, configure, and compile</b><br>
:{{cmdroot|mv linux-2.6.14-rc3 linux-2.6.13-rc3-uni}}
+
<br>
I chose to append the name of the kernel with “-uni” as a shorthand for “uniprocessor”. This Pentium 4 CPU supports hyperthreading which when enabled causes the single CPU to appear as 2 separate CPUs which makes the system a Symmetric-Multiprocessing (SMP) system. However, currently there are issues with swsusp2 and SMP so we will leave hypterthreading disabled in the BIOS settings (under “Power”) so that the CPU appears as a uniprocessor, and then build the kernel for a uniprocessor. If you want to experiment later, you can build another kernel version linux-2.6.13-rc3-smp which has Symmetric-Multiprocessing support enabled in the kernel. If you do this, you would set the maximum number of CPU's to “2” in the kernel config and be sure to enable hyperthreading in the BIOS settings under the “Power” section. (NOTE: If you do in fact build an -smp kernel and accidently boot the machine with hyperthreading disabled, or vice-versa, you run the -uni kernel but have hyperthreading enabled in the kernel, there will probably be a loss of performance but it should not harm your system.)
+
<code>tar -xjf linux-2.6.14-rc3.tar.bz2</code><br>
 
+
<br>
Next, edit the Makefile in the top level of the kernel source and change the line EXTRAVERSION so that it reads: <tt>EXTRAVERSION = -rc3-uni</tt>
+
At this point I prefer to rename the kernel source tree so that if at some point in the future I wish to build another kernel version, I can do so in a separate tree.<br>
 
+
<code>mv linux-2.6.14-rc3 linux-2.6.13-rc3-uni</code><br>
Then we are creating this symlink because when we compile some external kernel modules later they often prefer to have the current kernel source in /usr/src/linux which is a convention:
+
I chose to append the name of the kernel with “-uni” as a shorthand for “uniprocessor”. This Pentium 4 CPU supports hyperthreading which when enabled causes the single CPU to appear as 2 separate CPUs which makes the system a Symmetric-Multiprocessing (SMP) system. However, currently there are issues with swsusp2 and SMP so we will leave hypterthreading disabled in the BIOS settings (under “Power”) so that the CPU appears as a uniprocessor, and then build the kernel for a uniprocessor. If you want to experiment later, you can build another kernel version <i>linux-2.6.13-rc3-smp</i> which has Symmetric-Multiprocessing support enabled in the kernel. If you do this, you would set the maximum number of CPU's to “2” in the kernel config and be sure to enable hyperthreading in the BIOS settings under the “Power” section. (NOTE: If you do in fact build an <i>-smp</i> kernel and accidently boot the machine with hyperthreading disabled, or vice-versa, you run the -uni kernel but have hyperthreading enabled in the kernel, there will probably be a loss of performance but it should not harm your system.)<br>
:{{cmdroot|ln -s linux-2.6.14-rc3 linux}}
+
<br>
 
+
Next, edit the Makefile in the top level of the kernel source and change the line EXTRAVERSION so that it reads:
And configure the kernel:
+
<code>EXTRAVERSION = -rc3-uni</code><br>
:{{cmdroot|cd linux}}
+
Then:<br>
:{{cmdroot|make menuconfig}}
+
<br>
 
+
<code>
Prior to configuring the kernel it is important to have an inventory of the components in your system. Here is a list of the most important components in terms of how Linux sees them. You will need this list during menuconfig in order to enable support for these components.
+
ln -s linux-2.6.14-rc3-uni linux</code><br>
 
+
we are creating this symlink because when we compile some external kernel modules later they often prefer to have the current kernel source in /usr/src/linux which is a convention<br>
*Intel Pentium 4 PC-compatible processor. It capable of Hyperthreading however if we are leaving Hypterthreading support off in the BIOS then we also do NOT want to choose Symmetric Multiprocessing support (SMP) in the kernel
+
<br>
* ACPI interface supporting CPU frequency scaling
+
<code>cd linux<br>
* PCI bridge
+
make menuconfig<br></code>
* ISA bridge
+
<br>
* CardBus yenta-compatible PC Card controller
+
Prior to configuring the kernel it is important to have an inventory of the components in your system. Here is a list of the most important components in terms of how Linux sees them. You will need this list during menuconfig in order to enable support for these components.<br>
* PC-style parallel port
+
<br>
* Intel Ultra ATA ICH4 Storage Controller (IDE interface)
+
<ul><li>Intel Pentium 4 PC-compatible processor. It capable of Hyperthreading however if we are leaving Hypterthreading support off in the BIOS then we also do NOT want to choose Symmetric Multiprocessing support (SMP) in the kernel<br>
* Broadcom Tigon3 1000 Mbit ethernet controller
+
<li>ACPI interface supporting CPU frequency scaling<br>
* PS/2 Mouse interface
+
<li> PCI bridge<br>
* 8250/16550 compatible serial port
+
<li> ISA bridge<br>
* Intel 855GM AGP chipset
+
<li>CardBus yenta-compatible PC Card controller<br>
* Intel 82801 (ICH) SMBus (I2C)
+
<li>PC-style parallel port<br>
* VESA 2.0 compatible graphics chipset
+
<li>Intel Ultra ATA ICH4 Storage Controller (IDE interface)<br>
* Intel AC97 Audio controller
+
<li>Broadcom Tigon3 1000 Mbit ethernet controller<br>
* Intel MC97 Modem
+
<li>PS/2 Mouse interface<br>
* Intel UHCI USB controller
+
<li>8250/16550 compatible serial port<br>
* Intel EHCI USB 2.0 controller
+
<li>Intel 855GM AGP chipset<br>
 
+
<li>Intel 82801 (ICH) SMBus (I2C)<br>
 
+
<li>VESA 2.0 compatible graphics chipset<br>
There are a few important things in the kernel config to be aware of.
+
<li>Intel AC97 Audio controller<br>
 
+
<li>Intel MC97 Modem<br>
* For this kernel, do not enable Symmetric-Multiprocessing support.
+
<li>Intel UHCI USB controller<br>
* Power Management/ACPI:  I chose to not enable IBM laptop extras (ibm_acpi) in order to build a newer version later
+
<li>Intel EHCI USB 2.0 controller<br>
* under ATA support be sure to select Intel PIIXn chipsets support
+
<br>
* You must enable Direct Rendering Manager support (without selecting any of the driver modules, since we will build our own later)
+
<br>
* In the Graphics section select VESA VGA graphics support but DO NOT select nVidia Framebuffer Support as it interferes with the nvidia DRM driver we will install below
+
There are a few important things in the kernel config to be aware of.<br>
 
+
<br>
 
+
* For this kernel, do not enable Symmetric-Multiprocessing support.<br>
:{{cmdroot|cp .config ../dot-config-2.6.14-rc3-uni}}  #good to save a copy
+
* Power Management/ACPI:  I chose to not enable IBM laptop extras (ibm_acpi) in order to build a newer version later<br>
:{{cmdroot|make}}
+
* under ATA support be sure to select Intel PIIXn chipsets support<br>
:{{cmdroot|make modules_install}}
+
* You must enable Direct Rendering Manager support (without selecting any of the driver modules, since we will build our own later)<br>
:{{cmdroot|cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.14-rc3-uni}}
+
* In the Graphics section select VESA VGA graphics support but DO NOT select nVidia Framebuffer Support as it interferes with the nvidia DRM driver we will install below<br>
:{{cmdroot|cp System.map /boot/System.map-2.6.14-rc3-uni}}
+
<br>
:{{cmdroot|vi /etc/lilo.conf}}
+
<br>
 
+
<code>
 
+
cp .config ../dot-config-2.6.13-rc3-uni}}  #good to save a copy<br>
  #lilo stanza for image from {{path|lilo.conf}}
+
make<br>
  image=/boot/vmlinuz-2.6.14-rc3-uni
+
make modules_install<br>
# set the resume2 partition to whatever your swap partition is below:
+
cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.13-rc3-uni<br>
append="resume2=swap:/dev/hda2" #needed for swsusp2 to work
+
cp System.map /boot/System.map-2.6.13-rc3-uni<br>
  label=2.6.14-rc3-uni
+
<br>
  # the following sets the console to framebuffer mode 1280x1024
+
vi /etc/lilo.conf<br>
  # you must have “VESA VGA graphics support” selected
+
<br></code>
  # in the kernel under Device Drivers -> Graphics support
+
---<br>
  # otherwise set to “1” or “normal”
+
<code>
  vga=0x31B  
+
  #lilo stanza for image from lilo.conf<br>
  read-only
+
  image=/boot/vmlinuz-2.6.13-rc3-uni<br>
 
+
# set the resume2 partition to whatever your swap partition is below:<br>
Then run {{cmdroot|lilo}} to install it to the MBR.
+
append=”resume2=swap:/dev/hda2” #needed for swsusp2 to work<br>
Now it should be possible to boot into the new 2.6.14-rc3-uni kernel.
+
  label=2.6.12<br>
 
+
  # the following sets the console to framebuffer mode 1280x1024<br>
== Setting up graphics ==
+
  # you must have “VESA VGA graphics support” selected<br>
First, it is necessary to install the minimal essential components necessary to get the graphical environment working:
+
  # in the kernel under Device Drivers -> Graphics support<br>
:{{cmdroot|apt-get install x-window-system-core}}
+
  # otherwise set to “1” or “normal”<br>
 
+
  vga=0x31B<br>
===Setting up the proprietary nvidia driver (optional)===
+
  read-only<br>
The easiest way to install the proprietary nvidia driver this is with Debian's module-assistant utility:
+
</code>---<br>
 
+
<br>
:{{cmdroot|apt-get install module-assistant}}
+
<br>
:{{cmdroot|m-a prepare}}
+
Then run "lilo" to install it to the MBR.<br>
:{{cmdroot|m-a a-i nvidia}}
+
Now it should be possible to boot into the new 2.6.14-rc3-uni kernel.<br>
:{{cmdroot|apt-get install nvidia-glx nvidia-settings}}
+
<br>
:{{cmdroot|echo nvidia >> /etc/modules}}
+
<br>
:{{cmdroot|modprobe nvidia}}
+
<h2>Setting up graphics</h2><br>
 
+
First, it is necessary to install the minimal essential components necessary to get the graphical environment working:<br>
===Configuring the X server===
+
apt-get install x-window-system-core<br>
:{{cmdroot|dpkg-reconfigure xserver-xfree86}}
+
<br>
If you are using Sid, then use :{{cmdroot|dpkg-reconfigure xserver-xorg}}.
+
<b>Setting up the proprietary nvidia driver (optional)</b><br> 
 
+
Unfortunately Software Suspend2 does not work nicely with this driver.  I leave this section as optional.<br>
This will ask a lot of questions about X setup.  Here are options I selected:
+
The easiest way to install the proprietary nvidia driver this is with Debian's module-assistant utility:<br>
* allow it to attempt to autodetect video hardware. It will automatically select the "nv" driver, which is the one we want if we are going to use swsusp2. Unfortunately this driver does not support OpenGL so you have to choose between 3D graphics acceleration or the ability to suspend-to-disk. If however you decide you want the nvidia driver scroll down one and select it.
+
<br>
* leave video RAM setting blank.  X server will autodetect it
+
<code>
* do NOT use kernel framebuffer interface
+
apt-get install module-assistant<br>
* for keyboard layout do not select default "us" value, but replace with "intl" (this is better because it also supports multi-key on the right-alt key)
+
m-a prepare<br>
* XKB rule set accept default value
+
m-a a-i nvidia<br>
* for keyboard model replace "pc105" with "pc102"
+
apt-get install nvidia-glx nvidia-settings<br>
* attempt mouse autodetection and use the default /dev/input/mouse
+
echo nvidia >> /etc/modules<br>
* Mouse protocol: select ImPS/2 (should be default)
+
modprobe nvidia<br>
* yes to emulate 3 button mouse
+
</code>
* yes to enable scroll events
+
<br>
* accept all modules (default)
+
<br>
* under display setup, select only mode 1400x1050
+
<b>Configuring the X server</b><br>
* under choose method, select medium
+
<code>dpkg-reconfigure xserver-xfree86</code><br>
* select 1400x1050 @ 75Hz
+
<br>
* select default color depth of 24 (you can select 16 which is slightly lower, and might give slightly better performance)
+
if you are using Sid, then use : <code>dpkg-reconfigure xserver-xorg</code><br>
 
+
<br>
At this point you should be able to start X from the command line with the startx command.  But it will not look very appealing.  Install a window manager/desktop environment, e.g.
+
This will ask a lot of questions about X setup.  Here are options I selected:<br>
 
+
* allow it to attempt to autodetect video hardware. It will automatically select the "nv" driver, which is the one we want if we are going to use swsusp2. Unfortunately this driver does not support OpenGL so you have to choose between 3D graphics acceleration or the ability to suspend-to-disk. If however you decide you want the nvidia driver scroll down one and select it.<br>
:{{cmdroot|apt-get install openbox obconf openbox-themes fbpanel}}
+
* leave video RAM setting blank.  X server will autodetect it<br>
And some fonts to go along with it:
+
* do NOT use kernel framebuffer interface<br>
 
+
* for keyboard layout do not select default "us" value, but replace with "intl" (this is better because it also supports multi-key on the right-alt key)<br>
:{{cmdroot|apt-get install ttf-dustin ttf-freefont ttf-opensymbol ttf-thryomanes \
+
* XKB rule set accept default value<br>
ttf-xfree86-nonfree xfonts-100dpi xfonts-100dpi-transcoded xfonts-75dpi \
+
* for keyboard model replace "pc105" with "pc102"<br>
xfonts-75dpi-transcoded xfonts-artwiz xfonts-base xfonts-base-transcoded \
+
* attempt mouse autodetection and use the default /dev/input/mouse<br>
xfonts-biznet-100dpi xfonts-biznet-75dpi xfonts-biznet-base xfonts-scalable \
+
* Mouse protocol: select ImPS/2<br>
defoma fontconfig}}
+
* yes to emulate 3 button mouse<br>
 
+
* yes to enable scroll events<br>
For the fontconfig debconf question I chose to use Freetype<br><br>
+
* accept all modules (default)<br>
 
+
* under display setup, select only mode 1400x1050<br>
Then create a {{path|.xsession}} file in your home directory to invoke openbox/fbpanel when you run "startx":
+
* under choose method, select medium<br>
 
+
* select 1400x1050 @ 75Hz<br>
  #!/bin/sh
+
* select default color depth of 24 (you can select 16 which is slightly lower, and might give slightly better performance)<br>
   # ~/.xsession: stuff to do when starting X
+
<br>
   #
+
At this point you should be able to start X from the command line with the startx command.  But it will not look very appealing.  Install a window manager/desktop environment, e.g.<br>
   #set the background
+
<code>apt-get install openbox obconf openbox-themes fbpanel</code><br>
   xsetroot -solid DarkSlateGrey  
+
And some fonts to go along with it:<br>
   # increase the mouse sensitivity a bit, good for Trackpoints
+
<code>apt-get install ttf-dustin ttf-freefont ttf-opensymbol ttf-thryomanes \<br>
   xset m 4 1
+
ttf-xfree86-nonfree xfonts-100dpi xfonts-100dpi-transcoded xfonts-75dpi \<br>
   #run fbpanel              
+
xfonts-75dpi-transcoded xfonts-artwiz xfonts-base xfonts-base-transcoded \<br>
   fbpanel &  
+
xfonts-biznet-100dpi xfonts-biznet-75dpi xfonts-biznet-base xfonts-scalable \<br>
   # run openbox, our window manager                              
+
defoma fontconfig</code><br>
   exec openbox                        
+
<br>
 
+
For the fontconfig debconf question I chose to use Freetype<br>
== Setting up the Wireless driver ==
+
<br>
lspci listing should show the Atheros Communications 802.11abg adapter.  Here is how to get it working using the [http://madwifi.sourceforge.net/ madwifi] driver:
+
Then create a .xsession file in your home directory to invoke openbox/fbpanel when you run "startx":<br>
 
+
<br>
:{{cmdroot|apt-get install cvs}}
+
---<br>
:{{cmdroot|cd /usr/local/src}}
+
<code>
:{{cmdroot|cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi}}
+
  #!/bin/sh<br>
:{{cmdroot|cd madwifi}}
+
   # ~/.xsession: stuff to do when starting X<br>
:{{cmdroot|make && make install}}
+
   #<br>
:{{cmdroot|modprobe ath_pci}}
+
   #set the background<br>
 
+
   xsetroot -solid DarkSlateGrey<br>
:{{cmdroot|apt-get install wireless-tools dhcp3-client}}
+
   # increase the mouse sensitivity a bit, good for Trackpoints<br>
 
+
   xset m 4 1 #if this is too fast for you, try using 3 1 instead<br>
See {{path|/usr/local/src/madwifi/README}} for useful information about the configuring the interface.
+
   #run fbpanel<br>         
 
+
   fbpanel &<br>
Before running any of the wireless utilities and configuring it you may need to bring the interface up first:
+
   # run openbox, our window manager<br>
:{{cmdroot|ifconfig ath0 up}} 
+
   exec openbox<br></code>
The easiest way to configure the interface is to install kwifimanager
+
---<br>
:{{cmdroot|apt-get install kwifimanager}} 
+
<br>
Once I scanned and had a list of access points (using :{{cmdroot|iwlist ath0 scan}}) basically all I had to do was go into the “Settings” menu and select “Configuration Editor”.  In there under “Network Name” enter the SSID of an access point, which is the name of the wireless network (not the BSSID which is the long hex address).  Make sure that “ath0” is selected in the “Settings apply to interface” text box (click “Autodetect” button and it should show up).  After activating the config it should associate with the AP.  Then run dhclient on the interface to obtain an IP address from the access point:
+
<h2>Setting up the Wireless driver</h2>
:{{cmdroot|dhclient ath0}}
+
<code>lspci</code> listing should show the Atheros Communications 802.11abg adapter.  Here is how to get it working using the <a href="http://madwifi.sourceforge.net/">madwifi</a> driver:<br>
 
+
<br>
== Setting up sound ==
+
<code>
 
+
apt-get install cvs<br>
The ALSA sound module is snd_intel8x0m
+
cd /usr/local/src<br>
 
+
cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi<br>
:{{cmdroot|apt-get install alsa-base alsa-utils alsamixergui}}
+
cd madwifi<br>
:{{cmdroot|alsaconfig}}
+
make && make install<br>
 
+
modprobe ath_pci<br>
 
+
<br>
== Power management ==
+
apt-get install wireless-tools dhcp3-client<br></code>
 
+
<br>
According to power/video.txt in the Linux kernel source documentation ACPI suspend-to-RAM mode (a.k.a. "Standby" or "Sleep") does not and can not work with Hyperthreading CPUs:  
+
See /usr/local/src/madwifi/README for useful information about the configuring the interface.<br>
 
+
<br>
"S3 has absolutely no chance of working with SMP/HT. Be sure it to turn it off before testing (swsusp should work ok, OTOH)."
+
Before running any of the wireless utilities and configuring it you may need to bring the interface up first:<br>
 
+
<code>ifconfig ath0 up</code><br>
In order to get Software Suspend 2 fully working you also need to download and install the hibernate-script from the [http://www.suspend2.net/downloads/ Software Suspend 2 site]. This will install a shell script called "hibernate" in {{path|/usr/local/sbin}} and also a configuration directory {{path|/etc/hibernate}}. Once installed, if your kernel was configured correctly, you should be able to run the command {{cmdroot|hibernate}}. The system will save the current contents of RAM to the swap partiton (make sure you have set the correct {{bootparm|resume2|swap:}} parameter in your bootloader config or else it will not work). The next time you restart the system it will detect that the swap partition contains the suspended information and automatically restore the system. If there is a problem with swsusp2 it may freeze while resuming. The only time that I personally experienced a resume problem was when I was running the {{cmdroot|top}} command in a gnome-terminal during a suspend operation.
+
The easiest way to configure the interface is to install kwifimanager:<br>
 
+
<code>apt-get install kwifimanager</code><br>
===ibm-acpi===
+
Once I scanned and had a list of access points (using <code>iwlist ath0 scan</code>) basically all I had to do was go into the “Settings” menu and select “Configuration Editor”.  In there under “Network Name” enter the SSID of an access point, which is the name of the wireless network (not the BSSID which is the long hex address).  Make sure that “ath0” is selected in the “Settings apply to interface” text box (click “Autodetect” button and it should show up).  After activating the config it should associate with the AP.  Then run dhclient on the interface to obtain an IP address from the access point:<br>
It is probably worth installing the latest [[ibm-acpi]], which adds functionality for {{key|Fn}} key combinations, allows setting of threshold temperatures for fans, and more.  As of this writing much of this functionality is untested or unknown on the {{G41}}.  Still it doesn't hurt to install it:
+
<code>dhclient ath0</code>
 
+
<br>
Go to the [http://ibm-acpi.sourceforge.net/ IBM-acpi driver website] and download the latest driver (0.11 as of this writing) into {{path|/usr/local/src}}.
+
<br>
 
+
<h2>Setting up sound</h2><br>
:{{cmdroot|tar -xzf ibm-acpi-0.11.tar.gz}}
+
The ALSA sound module is snd_intel8x0m<br>
:{{cmdroot|cd ibm-acpi-0.11}}
+
<br>
:{{cmdroot|make}}
+
<code>apt-get install alsa-base alsa-utils alsamixergui</br>
:{{cmdroot|make install}}
+
alsaconfig<br>
:{{cmdroot|modprobe ibm_acpi}}
+
</code>
:{{cmdroot|echo "ibm_acpi" >> /etc/modules}}
+
<br>
 
+
<br>
You can see the currently installed version with:
+
<h2>Power management revisited</h2><br>
:{{cmdroot|cat /proc/acpi/ibm/driver}}
+
<br>
 
+
According to power/video.txt in the Linux kernel source documentation ACPI suspend-to-RAM mode (a.k.a. "Standby" or "Sleep") does not and can not work with Hyperthreading CPUs: <br>
 
+
<br>
== Further stuff ==
+
"S3 has absolutely no chance of working with SMP/HT. Be sure it to turn it off before testing (swsusp should work ok, OTOH)."<br>
[http://www.nongnu.org/tpb/ tpb] is a neat program that enables the on-screen display for certain keys functions such as the volume control and LCD brightness levels. {{cmdroot|apt-get install tpb}} and then edit {{path|/etc/tpbrc}}.
+
<br>
 
+
In order to get Software Suspend 2 fully working you also need to download and install the  
{{Todo|This page still needs a section on configuring the modem.  The last time I tested on another Thinkpad model, neither the Open-Source nor the proprietary driver for the "slmodem" Intel AC'97 Modem Controller seemed to work to well.  Fortunately I have a miniPCI card with a true Lucent WinModem which uses the "alk" driver available [http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/ here].  If you are planning to use the modem a lot it may be worth the $5 to pick one of these up on Ebay as it is much easier to configure and works quite reliably under Linux.}}
+
<b><i>hibernate-script</b></i> from the <a href=”http://www.suspend2.net/downloads/”>Software Suspend 2 site</a>. This will install a shell script called <code>hibernate</code> in /usr/local/sbin and also a configuration directory /etc/hibernate. Once installed, if your kernel was configured correctly, you should be able to run the command <code>hibernate</code>. The system will save the current contents of RAM to the swap partiton (make sure you have set the correct device for the <code>resume2=</code> parameter in your bootloader config or else it will not work). The next time you restart the system it will detect that the swap partition contains the suspended information and automatically restore the system. If there ever is a problem with swsusp2 it may freeze while resuming in which case you will have to reboot your system and lose the saved system state.<br>
 
+
<br>
 
+
<b>ibm-acpi</b><br>
[[Category:G41]]
+
It is probably worth installing the latest ibm-acpi, which adds functionality for Fn keys, allows setting of threshold temperatures for fans, and more.  As of this writing much of this functionality is untested or unknown on the G41.  Still it doesn't hurt to install it:<br>
 +
<br>
 +
Go to the <a href="http://ibm-acpi.sourceforge.net/">IBM-acpi driver website</a> and download the latest driver (0.11 as of this writing) into /usr/local/src<br>
 +
<br>
 +
<code>tar -xzf ibm-acpi-0.11.tar.gz<br>
 +
cd ibm-acpi-0.11<br>
 +
make<br>
 +
make install<br>
 +
modprobe ibm_acpi<br>
 +
echo "ibm_acpi" >> /etc/modules</code><br>
 +
<br>
 +
You can see the currently installed version with:<br>
 +
<br>
 +
<code>cat /proc/acpi/ibm/driver</code><br>
 +
<br>
 +
<br>
 +
<h2>Further stuff</h2><br>
 +
<br>
 +
<a href=”http://www.nongnu.org/tpb/”>tpb</a> is a neat program that enables the on-screen display for certain keys functions such as the volume control and LCD brightness levels. <code>apt-get install tpb</code> and then edit /etc/tpbrc<br>
 +
<br>
 +
This page still needs a section on configuring the modem.  The last time I tested on another Thinkpad model, neither the Open-Source nor the proprietary driver for the “slmodem” Intel AC'97 Modem Controller seemed to work to well.  Fortunately I have a miniPCI card with a true Lucent WinModem which uses the “alk” driver available <a href=”http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/”> here</a>.  If you are planning to use the modem a lot it may be worth the $5 to pick one of these up on Ebay as it is much easier to configure and works quite reliably under Linux.<br>
 +
<br>

Revision as of 23:38, 27 October 2005

What to do with existing Windows partition?


If you want to keep the Windows XP partition you should seriously consider whether you want it to be VFAT or NTFS, because on the very first bootup of the system it will automatically run a command to convert from VFAT to NTFS. I recommend disabling the automatic conversion as per instructions <a href=”http://mailman.linux-thinkpad.org/pipermail/linux-thinkpad/2004-February/016069.html”> here</a>, i.e.:

Using Knoppix, mount the XP partition under /win:

mkdir /win; mount /dev/hda1 /win

windows/system32/convert.exe:
mv /win/windows/system32/convert.exe /win/windows/system32/convert_.ex_
windows/system32/autoconv.exe:
mv /win/windows/system32/autoconv.exe /win/windows/system32/autoconv_.ex_
i386/convert.exe
mv /win/i386/convert.exe /win/i386/convert_.ex_
i386/autoconv.exe
mv /win/i386/autoconv.exe /win/i386/autoconv_.ex_

I like to keep the Windows XP partition for at least a little while to run it and see how much development effort IBM has spent to make the user experience under Windows a full-featured one, complete with many assistant applications and helper utilities rich in multi-media content and graphics - in sharp contrast with what they provide for Linux users.

IBM does not provide the rescue/recovery CD set with this model so I suggest before anything else that you immediately boot into Windows and create the set if you think you will ever want to re-image the drive. You could always order the set from IBM for $45. The set from IBM consists of a "Rescue and Recovery" CD plus 6 "Product Recovery" CD's which contain the actual image that gets written to the hard drive.

After creating the recovery CD set I recommend going into the BIOS and setting the "IBM Predesktop Area" in the BIOS under "Security" to "Disabled". This enables you to remove the “PreDesktop Environment” area, which is the second partition and takes over 3 GB of disk space. The Predesktop Environment is not very useful unless you want to have the feature of being able to re-image your disk and re-install Windows from scratch. If you're really concerned that you will somehow badly screw up your Windows environment - if you ever use it :-) - you can always create restore points without wasting precious disk space on the Predesktop Environment.


Notes on the model used in this setup:

This info is for setting up Debian on a G41 with the following features:

  • Processor: Mobile Intel Pentium 4 Processor 548 with HT Technology
  • Graphics: NVIDIA GeForce FX Go5200 (nVidia Corporation NV34M)
  • Display: 1400x1050 SXGA+
  • Wireless: ThinkPad 11b/g Wi-Fi Wireless (Atheros Communications, Inc. AR5212 802.11abg)
  • Ethernet: Integrated Gigabit Ethernet (Broadcom Corporation NetXtreme BCM5705M_2)
  • Sound: SoundMAX (Intel Corp. 82801DB/DBL/DBM (ICH4/ICH4-L/ICH4-M) AC'97 Audio Controller)

    If your model does not have these features, then some or most of this information might not apply.

    Disk Preparation and Partitioning


    Next I ran Knoppix again and used the QTparted graphical disk partitioning tool to alter the partition layout of the drive. I deleted the recovery/predesktop partition (partition 2) and shrunk the XP partition (partition 1 to 8 GB. QTParted will correctly resize the XP partition regardless of whether it is VFAT or NTFS. Finally, I created a 2300 MB swap partition as the second partition and used the remainder of the disk (partition 3) as one large XFS filesystem for Linux. The reason I chose the high value for the swap partition size was so that it can accommodate suspend to disk, which requires a swap partition larger than the amount of installed RAM, and allowing for the maximum 2GB of RAM to be installed.

    Debian installation


    After this I installed Debian using an official i386 Debian minimal bootable CD netinst image obtained from http://www.us.debian.org/CD/netinst/

    When the CD booted I pressed the F3 key which gave instructions to type "expert26" at the boot prompt in order to install in expert mode using a more recent 2.6 Linux kernel. I accepted the defaults for all questions except that when it asked about partitioning the disk I chose the option to "manually edit the partition table". This is because I already partitioned the disk with QTParted above and created the swap and XFS filesystems I plan to use. So in the manual partition setup section I simply told it to use hda2 as swap and to use hda3 as xfs, assign the mount point "/" to it, and to format the filesystem. Once this is done the rest is simple. When it asked about making Linux bootable directly from the hard disk, it is important to NOT chose the Grub boot loader since the version included with the installer has a serious problem dealing with XFS filesystems. Choose Lilo instead and everything will be fine.

    After the first reboot during the install it asks to set up apt sources. I chose to use http and selected a local mirror in my country. It then asked if I want to choose packages to install and I said no. My philosophy is to install Debian with the minimal amount of stuff, get it working, and then later on install any other applications I want. Also, if you plan on dist-upgrading from stable to testing or Sid then it is easier to do with only a minimal installation.

    Installing a few important packages


    Here are a few important packages that it is good to install right away:
    apt-get install less vim
    apt-get remove --purge nvi

    vim is a much better than nvi. Less is much better than more which is installed by default.


    Building a Linux kernel with <a href=”http://www.suspend2.net/”>Software Suspend 2</a> Support


    As of this writing <a href=”http://www.suspend2.net/”>Software Suspend 2</a>(swsusp2) is the only working implementation of power-saving functionality available. ACPI sleep and standby modes and the in-kernel software suspend do not work with this model. swsusp2 provides a patch for the kernel. Which version of kernel you use is dependent upon which version of swsusp2 you wish to use. There is a development version which has the latest-and-greatest features and bugfixes, and the stable version which is slightly older. For this article I chose to use the latest-and-greatest which was version 2.2-rc8 which requires Linux kernel version 2.6.14-rc3. This is a “release candidate” kernel which is available from the usual kernel repositories under the /testing subdirectory.

    Preparing for the kernel build There are a few packages that must be installed prior to compiling a kernel:
    apt-get install ncftp build-essential bin86 libncurses-dev bzip2

    Getting the kernel source
    Use an ftp client like ncftp to retrieve linux-2.6.14-rc3.tar.bz2 from
    <a href=”ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing”> ftp://ftp.kernel.org/pub/linux/kernel/v2.6/testing</a>:
    cd /usr/src
    ncftp
    open ftp.kernel.org
    cd pub/linux/kernel/v2.6/testing
    get linux-2.6.14-rc3.tar.bz2
    bye

    Unpack the kernel, configure, and compile

    tar -xjf linux-2.6.14-rc3.tar.bz2

    At this point I prefer to rename the kernel source tree so that if at some point in the future I wish to build another kernel version, I can do so in a separate tree.
    mv linux-2.6.14-rc3 linux-2.6.13-rc3-uni
    I chose to append the name of the kernel with “-uni” as a shorthand for “uniprocessor”. This Pentium 4 CPU supports hyperthreading which when enabled causes the single CPU to appear as 2 separate CPUs which makes the system a Symmetric-Multiprocessing (SMP) system. However, currently there are issues with swsusp2 and SMP so we will leave hypterthreading disabled in the BIOS settings (under “Power”) so that the CPU appears as a uniprocessor, and then build the kernel for a uniprocessor. If you want to experiment later, you can build another kernel version linux-2.6.13-rc3-smp which has Symmetric-Multiprocessing support enabled in the kernel. If you do this, you would set the maximum number of CPU's to “2” in the kernel config and be sure to enable hyperthreading in the BIOS settings under the “Power” section. (NOTE: If you do in fact build an -smp kernel and accidently boot the machine with hyperthreading disabled, or vice-versa, you run the -uni kernel but have hyperthreading enabled in the kernel, there will probably be a loss of performance but it should not harm your system.)

    Next, edit the Makefile in the top level of the kernel source and change the line EXTRAVERSION so that it reads: EXTRAVERSION = -rc3-uni
    Then:

    ln -s linux-2.6.14-rc3-uni linux
    we are creating this symlink because when we compile some external kernel modules later they often prefer to have the current kernel source in /usr/src/linux which is a convention

    cd linux
    make menuconfig

    Prior to configuring the kernel it is important to have an inventory of the components in your system. Here is a list of the most important components in terms of how Linux sees them. You will need this list during menuconfig in order to enable support for these components.

    • Intel Pentium 4 PC-compatible processor. It capable of Hyperthreading however if we are leaving Hypterthreading support off in the BIOS then we also do NOT want to choose Symmetric Multiprocessing support (SMP) in the kernel
    • ACPI interface supporting CPU frequency scaling
    • PCI bridge
    • ISA bridge
    • CardBus yenta-compatible PC Card controller
    • PC-style parallel port
    • Intel Ultra ATA ICH4 Storage Controller (IDE interface)
    • Broadcom Tigon3 1000 Mbit ethernet controller
    • PS/2 Mouse interface
    • 8250/16550 compatible serial port
    • Intel 855GM AGP chipset
    • Intel 82801 (ICH) SMBus (I2C)
    • VESA 2.0 compatible graphics chipset
    • Intel AC97 Audio controller
    • Intel MC97 Modem
    • Intel UHCI USB controller
    • Intel EHCI USB 2.0 controller


      There are a few important things in the kernel config to be aware of.

      • For this kernel, do not enable Symmetric-Multiprocessing support.
      • Power Management/ACPI: I chose to not enable IBM laptop extras (ibm_acpi) in order to build a newer version later
      • under ATA support be sure to select Intel PIIXn chipsets support
      • You must enable Direct Rendering Manager support (without selecting any of the driver modules, since we will build our own later)
      • In the Graphics section select VESA VGA graphics support but DO NOT select nVidia Framebuffer Support as it interferes with the nvidia DRM driver we will install below


      cp .config ../dot-config-2.6.13-rc3-uni}} #good to save a copy
      make
      make modules_install
      cp arch/i386/boot/bzImage /boot/vmlinuz-2.6.13-rc3-uni
      cp System.map /boot/System.map-2.6.13-rc3-uni

      vi /etc/lilo.conf

      ---
      #lilo stanza for image from lilo.conf
      image=/boot/vmlinuz-2.6.13-rc3-uni
      1. set the resume2 partition to whatever your swap partition is below:
      append=”resume2=swap:/dev/hda2” #needed for swsusp2 to work
      label=2.6.12
      # the following sets the console to framebuffer mode 1280x1024
      # you must have “VESA VGA graphics support” selected
      # in the kernel under Device Drivers -> Graphics support
      # otherwise set to “1” or “normal”
      vga=0x31B
      read-only
      ---


      Then run "lilo" to install it to the MBR.
      Now it should be possible to boot into the new 2.6.14-rc3-uni kernel.


      Setting up graphics


      First, it is necessary to install the minimal essential components necessary to get the graphical environment working:
      apt-get install x-window-system-core

      Setting up the proprietary nvidia driver (optional)
      Unfortunately Software Suspend2 does not work nicely with this driver. I leave this section as optional.
      The easiest way to install the proprietary nvidia driver this is with Debian's module-assistant utility:

      apt-get install module-assistant
      m-a prepare
      m-a a-i nvidia
      apt-get install nvidia-glx nvidia-settings
      echo nvidia >> /etc/modules
      modprobe nvidia


      Configuring the X server
      dpkg-reconfigure xserver-xfree86

      if you are using Sid, then use : dpkg-reconfigure xserver-xorg

      This will ask a lot of questions about X setup. Here are options I selected:

      • allow it to attempt to autodetect video hardware. It will automatically select the "nv" driver, which is the one we want if we are going to use swsusp2. Unfortunately this driver does not support OpenGL so you have to choose between 3D graphics acceleration or the ability to suspend-to-disk. If however you decide you want the nvidia driver scroll down one and select it.
      • leave video RAM setting blank. X server will autodetect it
      • do NOT use kernel framebuffer interface
      • for keyboard layout do not select default "us" value, but replace with "intl" (this is better because it also supports multi-key on the right-alt key)
      • XKB rule set accept default value
      • for keyboard model replace "pc105" with "pc102"
      • attempt mouse autodetection and use the default /dev/input/mouse
      • Mouse protocol: select ImPS/2
      • yes to emulate 3 button mouse
      • yes to enable scroll events
      • accept all modules (default)
      • under display setup, select only mode 1400x1050
      • under choose method, select medium
      • select 1400x1050 @ 75Hz
      • select default color depth of 24 (you can select 16 which is slightly lower, and might give slightly better performance)


      At this point you should be able to start X from the command line with the startx command. But it will not look very appealing. Install a window manager/desktop environment, e.g.
      apt-get install openbox obconf openbox-themes fbpanel
      And some fonts to go along with it:
      apt-get install ttf-dustin ttf-freefont ttf-opensymbol ttf-thryomanes \
      ttf-xfree86-nonfree xfonts-100dpi xfonts-100dpi-transcoded xfonts-75dpi \
      xfonts-75dpi-transcoded xfonts-artwiz xfonts-base xfonts-base-transcoded \
      xfonts-biznet-100dpi xfonts-biznet-75dpi xfonts-biznet-base xfonts-scalable \
      defoma fontconfig


      For the fontconfig debconf question I chose to use Freetype

      Then create a .xsession file in your home directory to invoke openbox/fbpanel when you run "startx":

      ---

        #!/bin/sh
      # ~/.xsession: stuff to do when starting X
      #
      #set the background
      xsetroot -solid DarkSlateGrey
      # increase the mouse sensitivity a bit, good for Trackpoints
      xset m 4 1 #if this is too fast for you, try using 3 1 instead
      #run fbpanel
      fbpanel &
      # run openbox, our window manager
      exec openbox

      ---

      Setting up the Wireless driver

      lspci listing should show the Atheros Communications 802.11abg adapter. Here is how to get it working using the <a href="http://madwifi.sourceforge.net/">madwifi</a> driver:

      apt-get install cvs
      cd /usr/local/src
      cvs -z3 -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/madwifi co madwifi
      cd madwifi
      make && make install
      modprobe ath_pci

      apt-get install wireless-tools dhcp3-client

      See /usr/local/src/madwifi/README for useful information about the configuring the interface.

      Before running any of the wireless utilities and configuring it you may need to bring the interface up first:
      ifconfig ath0 up
      The easiest way to configure the interface is to install kwifimanager:
      apt-get install kwifimanager
      Once I scanned and had a list of access points (using iwlist ath0 scan) basically all I had to do was go into the “Settings” menu and select “Configuration Editor”. In there under “Network Name” enter the SSID of an access point, which is the name of the wireless network (not the BSSID which is the long hex address). Make sure that “ath0” is selected in the “Settings apply to interface” text box (click “Autodetect” button and it should show up). After activating the config it should associate with the AP. Then run dhclient on the interface to obtain an IP address from the access point:
      dhclient ath0

      Setting up sound


      The ALSA sound module is snd_intel8x0m

      apt-get install alsa-base alsa-utils alsamixergui
      alsaconfig


      Power management revisited



      According to power/video.txt in the Linux kernel source documentation ACPI suspend-to-RAM mode (a.k.a. "Standby" or "Sleep") does not and can not work with Hyperthreading CPUs:

      "S3 has absolutely no chance of working with SMP/HT. Be sure it to turn it off before testing (swsusp should work ok, OTOH)."

      In order to get Software Suspend 2 fully working you also need to download and install the hibernate-script from the <a href=”http://www.suspend2.net/downloads/”>Software Suspend 2 site</a>. This will install a shell script called hibernate in /usr/local/sbin and also a configuration directory /etc/hibernate. Once installed, if your kernel was configured correctly, you should be able to run the command hibernate. The system will save the current contents of RAM to the swap partiton (make sure you have set the correct device for the resume2= parameter in your bootloader config or else it will not work). The next time you restart the system it will detect that the swap partition contains the suspended information and automatically restore the system. If there ever is a problem with swsusp2 it may freeze while resuming in which case you will have to reboot your system and lose the saved system state.

      ibm-acpi
      It is probably worth installing the latest ibm-acpi, which adds functionality for Fn keys, allows setting of threshold temperatures for fans, and more. As of this writing much of this functionality is untested or unknown on the G41. Still it doesn't hurt to install it:

      Go to the <a href="http://ibm-acpi.sourceforge.net/">IBM-acpi driver website</a> and download the latest driver (0.11 as of this writing) into /usr/local/src

      tar -xzf ibm-acpi-0.11.tar.gz
      cd ibm-acpi-0.11
      make
      make install
      modprobe ibm_acpi
      echo "ibm_acpi" >> /etc/modules


      You can see the currently installed version with:

      cat /proc/acpi/ibm/driver


      Further stuff



      <a href=”http://www.nongnu.org/tpb/”>tpb</a> is a neat program that enables the on-screen display for certain keys functions such as the volume control and LCD brightness levels. apt-get install tpb and then edit /etc/tpbrc

      This page still needs a section on configuring the modem. The last time I tested on another Thinkpad model, neither the Open-Source nor the proprietary driver for the “slmodem” Intel AC'97 Modem Controller seemed to work to well. Fortunately I have a miniPCI card with a true Lucent WinModem which uses the “alk” driver available <a href=”http://linmodems.technion.ac.il/packages/ltmodem/kernel-2.6/”> here</a>. If you are planning to use the modem a lot it may be worth the $5 to pick one of these up on Ebay as it is much easier to configure and works quite reliably under Linux.