I have a very very old laptop (Thinkpad i series 1300) which was produced around the years 1999-2000. Maybe I will mention it in many later posts because I spend quite a lot of time playing with this old machine.
Today the thing is to compile a custom kernel for it. This laptop is not very compatible with Linux distributions, even back to ten years ago. Now under CentOS, USB got lost. Under Ubuntu, USB works pretty well but it cannot detect the presence of my wireless card at all… So i decide to compile my own kernel which fits this old machine :-) This got me over 3 hours to compile. You can find a lot of articles talking about how to configure & compile on the Internet. Here I just post some of the problems I encountered in my experience.
First line error after rebooting:
Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(0,0)
I downloaded 22.214.171.124 from kernel.org, configured it using ‘make menuconfig’. Then use
make-kpkg -initrd --initrd
to get a deb package. After installing it, however, I found no initrd.img corresponding to my custom kernel in /boot/. Obviously I encountered a kernel panic after rebooting. This seems to be a bug in initramfs-tools (See http://www.mail-archive.com/[email protected]/msg763053.html).
The solution is to create a initrd.img by myself. For example
update-initramfs -c -t -k
Then add a initrd line in the grub.cfg file. Now we can boot into the new kernel.
Find root error:
ALERT! /dev/sda1 does not exist. Dropping to a shell!
When installing the custom kernel .deb package, grub-cfg would automatically run and generate a new grub.cfg file. However, on old machines using IDE hard drive, it seems that another bug lied here. In grub.cfg, the root parameter was set to “/dev/sda1” whereas I do not have any SCSI hard drive at all.
The solution is just modify grub.cfg to set “root=/dev/hda1”. Now system boot successfully and directly into X as well.
As for the wireless card…
Unfortunately the wireless card was still not recognized at all… The card should be supported by the prism/orinoco driver, which I have already compiled into the kernel. Well, the battle will continue :-)