Dies ist eine alte Version des Dokuments!
An initrd allows to use the smaller generic kernel instead of the huge kernel
On a locally available (with phsical access to keyboard and display) machine with ext4 on /
the following should suffice:
cp -a /boot /boot.bak cd /boot mkinitrd -c -k 3.14.18-smp -m ext4 # use your kernel version here!
Now Edit lilo.conf :
image = /boot/vmlinuz -> image = /boot/vmlinuz-generic-smp add initrd = /boot/initrd.gz
There is no need to update symlinks in /boot
if you made sure, your lilo.conf point to the right generic kernel verion
An finally run lilo
According to linuxquestions the virtio kernel modules are necessary for KVM in the initrd.gz. A simple call like described in README.initrd, eg mkinitrd -c -k 3.10.17 -m ext4
will not include the virtio modules (tested) ⇒ Use /usr/share/mkinitrd/mkinitrd_command_generator.sh
In http://docs.slackware.com/howtos:slackware_admin:systemupgrade mkinitrd_command_generator.sh is mentioned as well
cp -a /boot /boot.bak cd /boot /usr/share/mkinitrd/mkinitrd_command_generator.sh > generated_mkinitrd_command chmod +x generated_mkinitrd_command ./generated_mkinitrd_command chmod -x generated_mkinitrd_command # Compare generic kernel version number in /boot with version number in lilo.conf! lilo reboot
To use the recommended generic instead of the huge kernel you have to build an initrd. This section is based on slackware-13.1/README.initrd
Make a copy of /boot
dir to be on the save side: cp -a /boot /boot.org
Create the initial ramdisk filesystem /boot/initrd.gz
with
mkinitrd -c -k 2.6.33.4-smp -m ext3 -f ext3 -r /dev/sda2
In this example we have an ext3
root „/
“ partition on /dev/sda2
(see ls -al /dev/root
) for a kernel of version 2.6.33.4-smp
(See uname -r
).
Or
mkinitrd -c -k 2.6.33.4-smp -m reiserfs
for Reiserfs, or
mkinitrd -c -k 2.6.33.4-smp -m ext4 -f ext4 -r /dev/sda2
for ext4 on /dev/sda2
It is not necessary to change the symlinks in /boot
Add a new image-section at the beginning of the image sections to /etc/lilo.config
:
image = /boot/vmlinuz-generic-smp-2.6.33.4-smp initrd = /boot/initrd.gz root= /dev/sda2 label = LinuxGeneric read-only
Run lilo
and restart.
slackpkg
), a new initrd.gz
must be created. And if initrd.gz
is modified, lilo
must be started again!