Jan's Linux Log
This blog started out as an install log of RedHat 9 on a Compaq Presario 2538cl laptop (linuxpresario.blogspot.com) . However, I soon started to include little logs to myself when I made configuration changes to software, etc. So, I've moved it over to our domain, and changed its name to Linux Log. Here you will find some tips & tricks related to Linux configuration on a laptop, as well as software related things that I run into. I log here things that worked for me, of course, your mileage may vary.
Any questions/comments? E-mail me at linux_atsign_boshoff|za|net.
Kernel
Working swsusp kernel
October 29, 2003
I now have a working 2.4.22 kernel with Software Suspend turned on! No firewire yet, but I don't need this yet, so I'm not messing around with it. My configuration file is available as well:
Download file
2.4.22 Kernel
October 09, 2003
I decided to give the kernel.org kernels a shot, instead of using Red Hat's kernels. Here's the log of how I set up the kernel.
This post will now supersede that of May 26th.
- Download the latest stable (2.4) kernel and appropriate patches:
- Kernel from kernel.org.
- ACPI Patch matching kernel version from ACPI4Linux project page.
- Software suspend patch from Software Suspend for Linux.
-
New NTFS driver patch from the Linux NTFS Project. It seems I'll have to wait on this driver. The software suspend patch does not support this driver yet. So, just go with the NTFS driver already present in the 2.4 kernel.
- Unpack the kernel and apply the patches:
- Kernel in /usr/src:
bzip2 -dc ~/Software/linux-2.4.22.tar.bz2 | tar xvf -
As RedHat likes to do, I created a symlink
ln -s /usr/src/linux-2.4.22 /usr/src/linux-2.4
- Apply ACPI patch from /usr/src/linux-2.4:
bzip2 -dc ~/Software/acpi-20030916-2.4.22.diff.bz2 | patch -p1
- Unpack the swsusp package, and then apply it from /usr/src/linux-2.4:
bzip2 -dc ~/Software/swsusp-2.0-rc1-whole | patch -p1
-
Apply the NTFS patch from /usr/src/linux-2.4:
bzip2 -dc ~/Software/linux-2.4.22-ntfs-2.1.4c.patch.bz2 | patch -p1
- make clean;make mrproper
- Copy my last .config file, which you can see here. I'm still in the process of streamlining this kernel for my laptop, since I don't have tons of time or experience, I'm not sure yet which components are safe to leave out.
make xconfig, just save and exit.
- make dep
- Change the version information in /usr/src/linux-2.4/Makefile to reflect the new version. (I just add "custom" to the end.)
- make bzImage
- make modules; make modules_install
- Copy the kernel (and corresponding config file to /boot):
cp /usr/src/linux-2.4/arch/i386/boot/bzImage /boot/vmlinuz-2.4.22custom
cp /usr/src/linux-2.4/.config /boot/config-2.4.22custom.
- mkinitrd initrd-kernel-version.img kernel-version
- Edit the GRUB configuration file and add the kernel entry, appending "resume /dev/hda6" to the kernel parameters. As the HOW-TO on the Software Suspend site suggests, I also added an entry with "resume /hda6 noresume", so you have the option of skipping the resume.
The kernel as configured with RedHat's .config file results in a hang on start-up at kudzu. The way around this for me was to disable firewire support. Since I've not needed this in Linux yet, I'll not worry about it for now. Maybe I can get it to work later.
Now it's a matter of getting Software Suspend to work, I haven't tried yet. It will have to wait until I have some time!
Latest RH Kernel
June 04, 2003
Installed the latest Red Hat kernel today. Followed the steps I laid out in the post on May 26th to apply the acpi patch. Also had to reinstall the linmodem drivers:
- rpm -e hsflinmodem-5.03.27lnxtbeta03042700-1
- rpm -i hsflinmodem-5.03.27lnxtbeta03042700-1.i386.rpm
- /usr/sbin/hsfconfig
Haven't checked whether the modem functions, but one thing that I have noticed, is that I can now open the hardware browser! I suspect that the firewire issue has been resolved in this kernel. Doing a /etc/init.d/kudzu start results in a successful new hardware check. This is very promising of course, except that after running it, the touchpad started to act a little loony. Hopefully this will not persist over a reboot.
ACPI Patched RH Kernel
May 26, 2003
Compiled ACPI Patched kernel today. Basically, the easiest way to do this is to follow the Linux Kernel HOWTO instructions:
- Used Red Hat Network to download the newest kernel and kernel sources.
- Downloaded the appropriate 2.4.20 ACPI patch from the ACPI4Linux Project page at Sourceforge.
- Applied the patch in the kernel source directories gzip -dc ~/acpi-20021212-2.4.20.diff.gz | patch -p1 from wihin /usr/src/linux-2.4. At one point it complained about a diff already being applied, I did not apply this one (hit ENTER twice to accept defaults).
- make clean
- make mrproper
- Copied the last kernel config file from /boot: cp /boot/config-2.4.20.13-9 .config
- make xconfig. I then enabled ACPI from the General Setup menu and disabled APM. I also noticed that an incorrect CPU was specified, so I corrected that in the CPU Type menu.
- make dep
- Edited /usr/src/linux-2.4/Makefile and changed the version information to reflect a new version.
- make bzImage
- make modules
- make modules_install gave an error the first time I ran it, complaining about a bat_gericom containing unresolved symbols. Gericom is a brand of laptop, and the module bat_gericom referenced some APM libraries, which were of course not compiled, since I configured the kernel with ACPI only. To fix this, I edited the Makefile in /usr/src/linux-2.4/drivers/char/ and commented out the line referring to Gericom: obj-$(CONFIG_BATTERY_GERICOM) += bat_gericom.o.
- Copied the kernel (in and corresponding config file to /boot: cp /usr/src/linux-2.4/arch/i386/boot/bzImage /boot/vmlinuz-2.4.20-18.9acpi, cp /usr/src/linux-2.4/.config /boot/config-2.4.20-18.9acpi
- mkinitrd initrd-kernel-version.img kernel-version (see the howto) and finally edited GRUB configuration file, /boot/grub/grub.conf to load the new kernel.
I now have battery status reported in the Gnome panel (by adding the gnome applet Battery Status Monitor), and Linux can turn off the laptop when you shut down the system. I've not played around with any of the other buttons yet (power and LCD brightness, volume etc.), but will do this is due time. For now it works fine.