August 13,2005 1000 hrs IST: This page is now only for documentation. I have now moved to Debian GNU/Linux Sarge 3.1r0a :)
Configuration
Intel Pentium M 1.40 GHz
512 MB RAM
40 GB HDD
14"
1024x768
32 MB ATI Mobility RADEON 7500
4.5-4.9lbs
UltraNav Ultrabay Slim CD-RW/DVD-ROM
Integrated Intel PRO/1000 Gigabit Ethernet
56K V.92 designed modem
Intel PRO/Wireless Network Connection 802.11b
IBM Embedded Security Subsystem 2.0
Screenshots
I had SuSE 9 installed on my Thinkpad. The documentation can be viewed from my SuSE 9 on T41 documentation. I wanted to try Gentoo on my Thinkpad for couple of reasons:
(a) easy upgradation
(b) handling of dependencies
I also wanted to have GNU Hurd and hence wanted to setup a dual boot. The first part explains the Gentoo installation while the second part explains the GNU Hurd installation. Gentoo installation took 5 hours with "emerge sync" taking most of the time. Installation of xfree and KDE (3.2.1) took 12 hours.
Configuration file outputs
/etc/X11/XF86Config
/sbin/lspci
/sbin/lsmod
/bin/dmesg
cat /usr/src/linux/.config
Booting Gentoo
Insert Gentoo CD1 and boot.
Booting Gentoo LiveCD
boot: enter
Although I had the CD (20030911), I wanted to get the latest tarball and snapshot from the Internet and install it. I wanted to do a direct stage-3 installation. The ethernet worked by default and I tested it with:
3. Configuring your Network
# ping www.yahoo.com
4.c. Using fdisk to Partition your Disk
/*Required partitioning*/
Device | Boot | Start | End | Blocks | Id | System |
/dev/hda1 | * | 1 | 14 | 105808+ | 83 | Linux |
/dev/hda2 | 15 | 144 | 982800 | 82 | Linux swap | |
/dev/hda3 | 145 | 4020 | 29302560 | 83 | Linux |
# fdisk /dev/hda
d /*delete existing partition*/
n /*new partition*/
p /*primary partition*/
1 /*first partition*/
enter /*default starting*/
size - +100M
p
a /*toggle*/
1 /*partition 1 set to boot*/
p /*print*/
n /*new*/
p /*primary*/
2 /*second partition*/
enter /*default starting*/
size - +1000M
p /*print*/
t /*change type*/
2 /*partition 2*/
82 /*Hex value for swap partition*/
p /*print*/
n /*new*/
p /*primary*/
3 /*third partition*/
enter /*default starting*/
size - +30G /*remaining 7 GB is for FreeBSD UNIX*/
w /*write to disk*/
4.d. Creating Filesystems
# mke2fs /dev/hda1 (boot as ext2 filesystem)
# mkreiserfs /dev/hda3 (root as reiserfs filesystem)
# mkswap /dev/hda2 (create swap)
# swapon /dev/hda2 (activate swap)
4.e. Mounting
# mount /dev/hda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/hda1 /mnt/gentoo/boot
# mkdir /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc
5.a. Installing a Stage Tarball
The date was set correctly and I didn't have to change the date.
5.b. Default: Using a Stage from the Internet
# cd /mnt/gentoo
lynx browser was not available in the CD and hence used links2 to open up the gentoo mirror site
# links2 http://www.gentoo.org/main/en/mirrors.xml
and downloaded the latest stage3-tarball, which was, stage3-x86-20040218.tar.bz2. Unpacked the stage tarball:
# tar -xvjpf stage3-x86-20040218.tar.bz2
5.e. Configuring the Compile Options
# nano -w /mnt/gentoo/etc/make.conf
CHOST="i686-pc-linux-gnu"
CFLAGS="-march=pentium3 -02 -fomit-frame-pointer"
USE=""
CXXFLAGS="${CFLAGS}"
VIDEO_CARDS="radeon"
6.a. Chrooting
# mirrorselect -a -s4 -o >> /mnt/gentoo/etc/make.conf
Used mirrorselect to select fast mirrors:
It added an entry for GENTOO_MIRRORS and it contained:
GENTOO_MIRRORS=http://gentoo.seren.com/gentoo
http://mirror.datapipe.net/gentoo ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo
# cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
# chroot /mnt/gentoo /bin/bash
# env-update
# source /etc/profile
Since I didn't use the portage snapshot from the CD, I had to obtain a recent snapshot from the Internet. So, I did:
# emerge sync
This took quite some time :) I then modified the USE variable in
/etc/make.conf.
USE="apm arts avi crypt cups dvd encode gif -gnome -gtk imlib jpeg kde libwww mikmod motif mpeg ncurses oggvorbis opengl oss pam pcmcia pdflib png python qt quicktime readline sdl slang spell svga tcpd truetype Xxml2 xmms xv zlib"
7.a. Timezone
# ls /usr/share/zoneinfo
# ln -sf /usr/share/zoneinfo/EST /etc/localtime
/* choose your zone and replace with EST */
7.b. Installing the Sources
# emerge mm-sources
/* has ACPI support and very good for Thinkpads. emerge obtained the 2.6.5-mm1 kernel sources */
# ls -l /usr/src/linux
/*
* You should see a symbolic link: /usr/src/linux -> linux-2.4.22
* If its not the case, then do
* #rm /usr/src/linux && ln -s /usr/src/linux-2.4.22 /usr/src/linux)
*/
I didn't see the /usr/src/linux link file. So, I created it by doing:
# ln -s /usr/src/linux-2.6.5-mm1/ /usr/src/linux
7.d. Alternative: Using genkernel
I wanted to compile the kernel using genkernel and hence I emerged it and ran it:
# emerge genkernel
# genkernel all
# emerge hotplug /* for hardware autodetection */
# rc-update add hotplug default
7.e. Installing Separate Kernel Modules
I installed the e1000 Gigabit Ethernet Adapters:
# emerge e1000
To allow e1000 to automatically load, I opened /etc/modules.autoload.d/kernel-2.6 file:
# nano -w /etc/modules.autoload.d/kernel-2.6
and "e1000" in the file.
# modules-update /* commit changes to /etc/modules.conf */
8.a. Filesystem Information
# nano -w /etc/fstab
/* The /etc/fstab file contains the following */
/dev/hda1 | /boot | ext2 | noauto,noatime | 1 | 2 |
/dev/hda3 | / | reiserfs | noatime | 0 | 1 |
/dev/hda2 | none | swap | swp | 0 | 0 |
/dev/cdroms/cdrom0 | /mnt/cdrom | iso9660 | noauto,ro | 0 | 0 |
none | /proc | proc | defaults | 0 | 0 |
none | /dev/shm | tmpfs | defaults | 0 | 0 |
8.b. Networking Information
# echo shaks > /etc/hostname
# echo linux > /etc/dnsdomainname
/* NIS domain not set */
# rc-update add domainname default
# nano -w /etc/conf.d/net
/*Configuring network*/
uncomment iface_eth0="dhcp"
# rc-update add net.eth0 default
I emerged the pcmcia-cs package:
# USE="-X" emerge pcmcia-cs
# rc-update add pcmcia default
9.b. Default: Using GRUB
/* using grub for x86 (recommended) */
# emerge grub
# grub
grub>root (hd0,0)
grub>setup (hd0)
grub>quit
# nano -w /boot/grub/grub.conf
/* contents of /boot/grub/grub.conf */
/* Code listing 6: grub.conf for GRP genkernel users */
default 0
timeout 30
splashimage=(hd0,0)/grub/splash.xpm.gz
title=Gentoo Linux 2.6.5-mm1
root (hd0,0)
kernel (hd0,0)/kernel-2.6.5-mm1 root=/dev/hda3 vga=791
initrd (hd0,0)/initrd-2.6.5-mm1
10.a. System Logger
# emerge syslog-ng /*system logger*/
# rc-update add syslog-ng default
10.b. Optional: Cron Daemon
# emerge vixie-cron /* cron daemon */ # rc-update add vixie-cron default
10.c. File System Tools
# emerge reiserfsprogs
11.a. User Administration
# passwd
# useradd shaks -m -G users,wheel,audio -s /bin/bash
/* -m adds a home directory, wheel group is essential to allow "su" command for the user, audio to allow sound*/
# passwd shaks
# etc-update
11.b. Reboot and Enjoy
# exit
# cd /
# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
# reboot
Gentoo is installed!!!
Desktop configuration
I emerged xfree first:
2.1 Emerging XFree86
# emerge xfree
# env-update && source /etc/profile
2.2 Running xf86config
I used /usr/bin/X11/xf86cfg to create the XF86Config file and get X up and running:
# /usr/bin/X11/xf86cfg
I could not emerge "xfree-drm" because it does not have support for 2.6 kernel yet. I also did not emerge the "ati-drivers". Touchpad and trackpoint work by default, although, tap click is disabled in the 2.6 kernel by default.
2.3 Emerge KDE
# emerge kde
This took 12 hours. After completion, I did:
# env-update
# source /etc/profile
Opened up /etc/rc.conf file and modified:
XSESSION="kde-3.2.1"
DISPLAYMANAGER=kdm
# rc-update add xdm default
I started KDE using:
# kdm
By default, the color depth is taken as 1 or 8 and hence I had to modify my /etc/X11/XF86Config file. I added "Modes 1024x768" for each SubSection of the "Screen" Section and a "DefaultDepth 24" to the file. My /etc/X11/XF86Config file.
Wireless
I have my in-built Intel PRO/Wireless Network Connection 802.11b working with the Linuxant driverloader drivers. I used the source (.tar.gz) file for installing the driverloader and followed the linuxant instructions, and it works great!
Sound
I have sound working now, took some time for me to figure things out. I had to check first if /dev/snd and /dev/sound were set to the audio group. I followed Gentoo's alsa-guide documentation. Under installation, I skipped kernel modules section as I already had the sound modules installed and compiled in the 2.6 kernel and moved to configuration of ALSA modules. I emerged alsa-utils:
2.7 Emerging alsa-utils
# emerge alsa-utils
Didn't change anything in /etc/modules.d/alsa except uncommented the line for snd-card-0 and inserted the alias for my sound card:
alias snd-card-0 snd-intel8x0
The /dev/mixer, /dev/dsp and /dev/midi settings were already uncommented in /etc/modules.d/alsa. I then did:
2.10: Running modules-update
# modules-update
The sound settings were properly configured in /etc/devfsd.conf. I then started alsa:
3.2: Starting ALSA
# /etc/init.d/alsasound start
It started fine, but I had to unmute Master and PCM as per the documentation:
3.4: Unmuting channels
# amixer set Master 100 unmute
# amixer set PCM 100 unmute
I tested if sound worked by playing pop.wav and it played it :)
# aplay $KDEDIR/share/sounds/pop.wav
I then decided to add alsa to startup boot,
3.1: Add ALSA to the boot runlevel
# rc-update add alsasound boot
Gigabit Ethernet
Ethernet worked by default during installation and I also emerged and installed the e1000 drivers for Gigabit ethernet.
Battery
I have battery status now with the 2.6 kernel.
CD-RW/DVD
My CD drive works on /mnt/cdrom. Haven't tested writing CDs or playing DVDs.
Touchpad/Trackpoint
The touchpad worked as soon as X was configured and the tap click is disabled by default in the 2.6 kernel. The trackpoint also works fine.
USB
USB works great! I use my sandisk 256 MB flash disk and Sony megavault with it. I also use my Sony DSC-P93 digital camera with gphoto2.
The 5 GB partition on /dev/hda4 was used to install GNU Hurd. I obtained a copy of Debian GNU/Hurd K8 CDs from Anand Babu, when he visited India, and gave us an introduction to "Hacking the GNU/Hurd".These are the steps that I followed to install GNU/Hurd on my IBM Thinkpad T41:
1.0 Boot from K8 CD
Inserted the K8 CD and used boot from CD-ROM in the BIOS.
I got a welcome screen and was asked to pass any boot options, if needed. I just clicked enter to boot the default kernel that came with the CD. I then got the installation menu
2.0 Keyboard Layout
I selected the US qwerty keyboard layout
3.0 Activate Swap
I already had /dev/hda2 as my swap. So, chose activate alternate swap
4.0 Initialize Hurd Partition
The /dev/hda4 partition of 5 GB is to be used for GNU Hurd. I chose to intialize this partition as Hurd.
5.0 Install the Base System
This option extracts the baseGNU.tgz package from the CD and installs it to the Hurd partition, in this case /dev/hda4.
I rebooted the system.
6.0 Add Hurd entry for grub
Added the following to /boot/grub/menu.lst:
kernel (hd0,2)/boot/gnumach.gz root=device:hd0s3 -s
module (hd0,2)/hurd/ext2fs.static --multiboot-command-line=${kernel-command-line} \
--host-priv-port=${host-port} --device-master-port=${device-port} \
--exec-server-task=${exec-task} -T typed ${root} $(task-create)$(task-resume)
module (hd0,2)/lib/ld.so.1 /hurd/exec $(exec-task=task-create)
Since, I had grub installed on my MBR, I entered in Gentoo and modified /boot/grub/menu.lst for Hurd. Note that "module(hd0,2)/hurd/ext2fs.static ... $(task-resume) is one single line.
I rebooted.
7.0 Run native-install
# export TERM=mach
# ./native-install
I had to reboot and enter into Hurd once again.
8.0 Run native-installer again
# export TERM=mach
# ./native-install
9.0 Add swap entry
Used "nano-tiny" editor to add swap entry to /etc/fstab file.
/dev/hd0s2 none swap sw 0 0.
I had to reboot. Now, to enter into Hurd after installation, I had to enter into multi-user mode. So, I removed the -s in the/boot/grub/menu.lst file from Gentoo in the kernel boot line for Hurd. Saved it and rebooted to enter into GNU Hurd :)
User Accounts
1.0 Logging in
Logged into GNU Hurd using:
login>login root #passwd
Set a new root passwd. I created a user account using:
2.0 Creating user accounts
# adduser
It will ask few questions before creating the user account
CD-ROM
As root, I did the following to set the translator for CDROM:
3.0 CDROM setup
# cd /dev
# ./MAKEDEV hd0s2 hd0s4 hd2
# mkdir /cdrom
# settrans -gp /cdrom /hurd/iso9660fs /dev/hd2
I could view the CD contents using "ls /cdrom". I did add an entry to /etc/fstab for the cdrom:
4.0 CDROM entry in /etc/fstab
/dev/hd2 /cdrom iso9660fs none,auto 0 0
I remove the translator using:
5.0 Removing CD translator
# settrans -g /cdrom
Software
I first had to update the base system using both the installation CDs:
6.0 Updating the system
# apt-get update
Using CD1, I did the following installs:
7.0 Packages from CD1
# apt-get install gcc
# apt-get install hurd-dev
# apt-get install build-essential
# apt-get install apt-file
Using CD2, I did the following installs:
8.0 Packages from CD1
# apt-get install mig