mirror of
git://slackware.nl/current.git
synced 2024-11-16 07:48:02 +01:00
9951f6a1a8
a/kernel-firmware-20241108_ad74054-noarch-1.txz: Upgraded. a/kernel-generic-6.11.7-x86_64-1.txz: Upgraded. Unless disabled in /etc/default/geninitrd, automatically generate an initial ramdisk upon package installation or upgrade. a/mkinitrd-1.4.11-x86_64-46.txz: Rebuilt. geninitrd: also accept /opt/sbin/geninitrd as an override. Suggested by regdub. Since the installer sends different args to the setup scripts, we can't use $1 as the kernel file with setup.01.mkinitrd, so convert it into a variable in geninitrd instead (if needed). mkinitrd_command_generator.sh: pvdisplay will complain if there are any file descriptors besides stdin, stdout, and stderr, which will always be true when called from a package install script due to file locking. So send stderr from the two calls to pvdisplay to /dev/null. d/kernel-headers-6.11.7-x86-1.txz: Upgraded. k/kernel-source-6.11.7-noarch-1.txz: Upgraded. l/python-packaging-24.2-x86_64-1.txz: Upgraded. n/iptables-1.8.11-x86_64-1.txz: Upgraded. n/lftp-4.9.3-x86_64-1.txz: Upgraded. x/ibus-m17n-1.4.34-x86_64-1.txz: Upgraded. x/xbacklight-1.2.4-x86_64-1.txz: Upgraded. x/xf86-video-nouveau-1.0.18-x86_64-1.txz: Upgraded. x/xrandr-1.5.3-x86_64-1.txz: Upgraded. xfce/xfce4-weather-plugin-0.11.3-x86_64-1.txz: Upgraded. extra/xf86-video-fbdev/xf86-video-fbdev-0.5.1-x86_64-1.txz: Upgraded. isolinux/initrd.img: Rebuilt. kernels/*: Upgraded. usb-and-pxe-installers/usbboot.img: Rebuilt.
74 lines
2.6 KiB
Text
74 lines
2.6 KiB
Text
|
|
Slackware initrd mini HOWTO
|
|
by Patrick Volkerding, volkerdi@slackware.com
|
|
Fri Nov 8 21:16:06 UTC 2024
|
|
|
|
This document describes how to create and install an initrd.
|
|
Also see "man mkinitrd".
|
|
|
|
1. What is an initrd?
|
|
2. Why to I need an initrd?
|
|
3. How do I build the initrd?
|
|
4. Now that I've built an initrd, how do I use it?
|
|
|
|
|
|
1. What is an initrd?
|
|
|
|
Initrd stands for "initial ramdisk". An initial ramdisk is a very small
|
|
Linux filesystem that is loaded into RAM and mounted as the kernel boots,
|
|
and before the main root filesystem is mounted.
|
|
|
|
2. Why do I need an initrd?
|
|
|
|
The usual reason to use an initrd is because you need to load kernel
|
|
modules before mounting the root partition, or because you need additional
|
|
userspace support for doing so (as with LVM). Modern Linux is practically
|
|
expected to be using an initrd, so even in cases where it *works* to boot
|
|
without one, you're probably less likely to run into bugs by using one.
|
|
|
|
3. How do I build the initrd?
|
|
|
|
Just installing the kernel package will automatically run the geninitrd
|
|
script to produce an initrd, so normally you won't need to build one --
|
|
it will be done for you. However, if you need to generate an initrd you
|
|
can do so by just running "geninitrd" which will build an initrd for the
|
|
newest kernel in /boot. You can also specify the kernel to build an initrd
|
|
for on the command line, like this:
|
|
|
|
geninitrd /boot/vmlinuz-6.11.7
|
|
|
|
If you need specific modules, or you'd like to use a different initrd
|
|
generator than Slackware's mkinitrd, or to make other adjustments, see
|
|
the /etc/default/geninitrd configuration file. You can also disable
|
|
automatic initrd generation if you don't want it.
|
|
|
|
4. Now that I've built an initrd, how do I use it?
|
|
|
|
Now that you've got an initrd (/boot/initrd.gz), you'll want to load
|
|
it along with the kernel at boot time. If you use LILO for your boot
|
|
loader you'll need to edit /etc/lilo.conf and add a line to load the
|
|
initrd. Here's an example section of lilo.conf showing how this is
|
|
done:
|
|
|
|
# Linux bootable partition config begins
|
|
image = /boot/vmlinuz-generic
|
|
initrd = /boot/initrd-generic.img
|
|
root = /dev/sda6
|
|
label = Slackware
|
|
read-only
|
|
# Linux bootable partition config ends
|
|
|
|
The initrd is loaded by the "initrd = /boot/initrd-generic.img" line.
|
|
Just add the line right below the line for the kernel image you use.
|
|
Save the file, and then run LILO again ('lilo' at the command line).
|
|
You'll need to run lilo every time you edit lilo.conf or rebuild the
|
|
initrd.
|
|
|
|
Other bootloaders also support the use of an initrd.
|
|
See the documentation for those programs for details on using an
|
|
initrd with them.
|
|
|
|
|
|
---------
|
|
|
|
Have fun!
|