Linux kernel 2.4.16 On 11 December 2001, I installed the source code for the SuSE kernel from the CD, but couldn't find it on the harddrive, as it's not in /usr/src/linux. I decided to build a new experimental kernel from scratch, primarily to obtain firewire support, but also to get a slimmer and more precisely customized kernel. For the second build, see here. For a third build, consider the following:
Because SuSE relies on a huge number of modules, the actual kernel is not that big. You could consider using it, in an updated form of course, provided the gigadrive can be supported. Guides
You find the configuration of the running kernel via less /proc/config.gz. It's beautiful to watch the kernel components -- about 90% of the items listed I don't need on this particular configuration. So it's tempting to make a second kernel that is identical to the current one, but radically slimmed down. Software Kernel configuration Determine the kernel version that is running on your system with the command
You can use the command
to find the name of the kernel RPM package that is installed on your system. to either remove the existing kernel package from your system using the command
If you download a new kernel rpm package from SuSE, you can install it with the command
The mide-December kernel build I picked up 2.4.16 from ftp://ftp.chpc.lkams.kernel.org/pub/linux/kernel/ instead of http://www.kernel.org and instructions at http://www.linuxdoc.org/HOWTO/Kernel-HOWTO-4.html (actually, go to page 4). I saved the new kernel source in /usr/src and then bravely entered: tar zxpvf linux-2.4.16.tar.gz The new kernel unpacked beautifully; I opened the README file, and found that I should domake menuconfig Exciting stuff! I had nothing in /usr/src/linux before, so this will be interesting -- hopefully, it won't mess up SuSE! I used less /proc/config.gz to compare the current kernel with the new one, using the help system (press ?) and doing my best: Processor * My processor 300a is a Mendocino core and I chose Pentium Pro/Celeron/Pentium II (SuSE had M586) PCI and PCMCIA * PCI access mode is Bios (SuSE had any) Power management n Power management support -- because the processor gets a hlt command anyway if nothing happens, Firewire and scsi * config blk dev ide scsi -- you need this for the CDRW: add hdx=scsi as a boot parameter!! Networking n config net fastroute -- I leave it off, but this could be tried File systems * SMB fs -- Windows printer and file sharing. For connecting Linux to Windows and Macs see http://www.eats.com/linux_mac_win.html Advanced n etworking
Configuring the kernel was an interesting experience -- I customized it to my machine, which was an uncommon pleasure. It should be much smaller than SuSE's kernel, which is 901,244 long -- or 900KB, just below one MB. From the new one, when the compiling was done, I got: Root device is (3, 8) So that's just marginally
smaller than SuSE! However, I have all the components included; there
are no modules. I then copied the file /usr/src/linux/arch/i386/boot/bzImage
to /boot and called it vmlinuz.2.4.16.
I also discovered vmlinuz.config, which is SuSE's configuration file,
which I could have used to start out with. Well, this wasn't very hard
and so far no problems -- of course, it may not work. I incorporated it
into Lilo as a third Linux system, calling it linus. Now here we go --
this shouldn't really be too hard! Linux version 2.4.16 Pretty sensational stuff. It looks like Linux found my devices and installed them, just like that -- no configuration necessary! Of course, I don't know if this will work, but keyboard, monitor, mouse, NIC all work perfectly. Silence in church: Gscanbus shows the videocamera working !!!! For the rest of the story, see dvgrab. Boot configuration To make the kernel boot, you need to add it to /etc/lilo.conf -- pointing to the bzImage that you copied to /boot under a name such as vmlinuz.2.4.16. Each kernel may need different boot files; I don't yet know how to manage this -- and it's a bummer to have to spend time learning SuSE rather than Linux. As long as you use SuSE, follow SuSE's kernel help.
Speculations on factors involved in integrating the new kernel into
SuSE's setup:
This illuminating explanation is found in /sbin/init.d.README: The scripts for controlling the system are placed in /etc/init.d/ (they have been moved accordingly to the Linux Standard Base (LSB) specification). These scripts are executed directly or indirectly by /sbin/init, the father of all processes. The configuration of /sbin/init is given by the file /etc/inittab (see inittab(5)). At boot time, the boot level master script /etc/init.d/boot is called to initialise the system (e.g. file system check, ...). It also executes some hardware init scripts linked into /etc/init.d/boot.d/. Then it calls /etc/init.d/boot.local, which executes the local commands. After system startup, /sbin/init will normally switch on the default run level given in /etc/inittab. It calls the run level master script /etc/init.d/rc to start or stop services provided by the other scripts under /etc/init.d/. [It then goes on to explain how run levels are defined.] /etc/init.d/skeleton -- This script is a model for writing your own. You can use insserv(8) to include your own script into a run level. For now, I'll try just leaving out the initrd from lilo.conf and see if that stops the module calls, which produce silly errors on the new kernel: modprobe: Can't open dependencies file /lib/modules/2.4.16/modules.dep (No such file or directory) Indeed there is not -- somehow, the SuSE config files is making it think there is a module there, but I don't know what. Here is SuSE's own recipe for replacing a kernel -- http://www.securityfocus.com/advisories/3637. Note that this involves ftp'ing an rpm package containing the kernel. When I tried to make a new initrd file First, some comments on the configuration files -- I was just discovering them at this time. In Yast2, go to system administration and change configuration file -- I don't recall now which file this changes, but it's a key file in /etc. Among other things, you can define whether you want KDM to load at boot. If you say no, but KDM remains your default X11 application, you start the KDE desktop by typing startx. I had trouble with startx -- if I started X11 in root, I couldn't also start it in steen. Obviously a configuration issue, but here again I'm out of my depth. When you've made configuration changes outside of Yast or Yast2, make sure you run
I doubt this is a very secure way of maintaining coherence, but not running it is worse. /etc/rc.config seems to load the modules -- I could never figure this out. /etc./rc.config.d -- a directory full of rc files:
/etc/rc.d contains lots of files -- the README file says "The scripts for controlling the system are placed in /etc/init.d/" "These scripts are executed directly or indirectly by /sbin/init, the father of all processes. The configuration of /sbin/init is given by the file /etc/inittab (see inittab(5))." Now, /etc/inittab "is the main configuration file of /etc/init, which is executed by the kernel on startup. It describes what scripts are used for the different run-levels" (from the etc/inittab file). So this seems to be the key to the boot process. /etc/inittab has an entry for /etc/init.d/boot, the first script that starts at bootup. It starts . /etc/rc.status and . /etc/rc.config One of the first things done by /etc/init.d/boot is to load kerneld, which is the daemon that relentless attempts to load modules. I recklessly commented those lines away on 17 December 2001. /etc/init.d/boot includes a call to /etc/init.d/boot.local -- this is where you can put your own commands. E.g.? All the error messages I never see are written to /var/log/boot.msg So I made changes to /etc/init.d/boot and saved them. To follow up, I need to remake initrd, the inital RAM disk. The command is mk_initrd and takes -h for help. I gave it:
and it responded:
Now, no file was created. This likely is what made my Linux system unbootable. As SuSE puts it,
Note that somewhere along the line the whole system stopped working -- this is not the way to proceed.
|
![]() |
|||||
|
|
|
|
|
|
![]() |