slackware-current/source/a/mkinitrd
Patrick J Volkerding cb18a69a27 Sun Dec 22 20:46:32 UTC 2024
a/mkinitrd-1.4.11-x86_64-60.txz:  Rebuilt.
  init: support having the cryptkey.bin keyfile in the initrd itself.
  Thanks to kursu. I took this as the simplest patch, written in the closest to
  the existing style. Honorable mention to Didier Spaier, opty, and RyNo (this
  actually might be based on RyNo's patch) for providing alternative approaches
  for consideration.
a/pkgtools-15.1-noarch-23.txz:  Rebuilt.
  Clean up after --dry-run better (although this matters less now that we'll be
  mounting a tmpfs on /var/lib/pkgtools/setup/tmp). Thanks to Mechanikx.
  While we're here, change tabs to spaces (only found in installpkg).
a/sysvinit-3.12-x86_64-1.txz:  Upgraded.
a/sysvinit-scripts-15.1-noarch-24.txz:  Rebuilt.
  rc.M: mount a tmpfs on /var/lib/pkgtools/setup/tmp.
ap/man-db-2.13.0-x86_64-3.txz:  Rebuilt.
  man-db.{csh,sh}: export MANROFFOPT=-c to fix colors with most pager.
  Thanks to eduardr.
l/imagemagick-7.1.1_42-x86_64-1.txz:  Upgraded.
l/libvncserver-0.9.15-x86_64-1.txz:  Upgraded.
l/python-Jinja2-3.1.5-x86_64-1.txz:  Upgraded.
l/python-urllib3-2.3.0-x86_64-1.txz:  Upgraded.
x/fontconfig-2.15.0-x86_64-4.txz:  Rebuilt.
  60-latin.conf: Make Liberation Serif, Liberation Sans, and Liberation Mono
  the preferred fonts, as they were in Slackware 15.0.
x/hack-fonts-ttf-3.003-noarch-4.txz:  Rebuilt.
  I like the Hack font, but I'm not sure that it's the best default for an all-
  purpose monospace system font. So what we'll do is add a new file in
  conf.avail called 58-hack-default-monospace.conf that if symlinked into
  /etc/fonts/conf.d/ will make Hack the default monospace font.
  I'm considering adding similar override .conf files for DejaVu and Noto.
2024-12-22 22:33:13 +01:00
..
_initrd-tree Fri Mar 31 18:01:09 UTC 2023 2023-03-31 21:43:36 +02:00
0001-Fix-LUKSTRIM-with-C-T-and-UUID.patch Sun Dec 15 18:20:57 UTC 2019 2019-12-16 08:59:48 +01:00
0002-bail-if-temp-dir-is-not-created.patch Fri Jul 16 18:53:33 UTC 2021 2021-07-17 08:59:52 +02:00
0003-blacklist.40-usb_modeswitch.rules.patch Tue Oct 12 19:22:20 UTC 2021 2021-10-13 08:59:43 +02:00
0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch Tue Jan 25 06:16:36 UTC 2022 2022-01-25 12:00:01 +01:00
0005-support-modules-compressed-with-xz.patch Wed Jan 26 20:46:44 UTC 2022 2022-01-27 08:59:55 +01:00
0006-coreutils-9.1-ensure-target-dir-exists.patch Tue Apr 26 19:45:46 UTC 2022 2022-04-27 06:59:51 +02:00
0007-kmod30.patch Sat Jul 9 18:50:24 UTC 2022 2022-07-10 01:00:16 +02:00
0008-fix-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch Tue Feb 28 21:33:32 UTC 2023 2023-02-28 23:45:27 +01:00
0009-exclude-99-nfs.rules.patch Thu Aug 10 05:48:31 UTC 2023 2023-08-10 08:29:19 +02:00
0010-fix-test-for-jfs-xfs-repair-tools.patch Tue Nov 21 21:15:30 UTC 2023 2023-11-21 23:50:07 +01:00
0011-fix-LUKS-handling.patch Tue Dec 10 23:53:46 UTC 2024 2024-12-11 01:28:40 +01:00
busybox-dot-config Sat Oct 5 21:24:49 UTC 2024 2024-10-06 00:04:43 +02:00
doinst.sh Thu Jul 25 20:22:54 UTC 2024 2024-07-25 23:16:46 +02:00
geninitrd Fri Dec 6 22:22:58 UTC 2024 2024-12-07 00:44:23 +01:00
geninitrd.default Wed Dec 18 22:12:02 UTC 2024 2024-12-19 00:01:31 +01:00
init Sun Dec 22 20:46:32 UTC 2024 2024-12-22 22:33:13 +01:00
mkinitrd Sun Nov 24 23:09:54 UTC 2024 2024-11-25 00:29:25 +01:00
mkinitrd.8 Tue Apr 26 19:45:46 UTC 2022 2022-04-27 06:59:51 +02:00
mkinitrd.conf.5 Tue Apr 26 19:45:46 UTC 2022 2022-04-27 06:59:51 +02:00
mkinitrd.conf.sample Mon May 28 19:12:29 UTC 2018 2018-05-31 23:39:35 +02:00
mkinitrd.SlackBuild Sun Dec 22 20:46:32 UTC 2024 2024-12-22 22:33:13 +01:00
mkinitrd.tempfile.to.mktemp.patch Mon Apr 27 20:27:30 UTC 2020 2020-04-28 08:59:53 +02:00
mkinitrd_command_generator.8 Sun Mar 3 22:03:39 UTC 2019 2019-03-04 08:59:47 +01:00
mkinitrd_command_generator.sh Fri Nov 8 22:17:50 UTC 2024 2024-11-09 00:53:08 +01:00
README.initrd Thu Jul 25 20:22:54 UTC 2024 2024-07-25 23:16:46 +02:00
remove-orphaned-initrds Wed Dec 18 00:32:07 UTC 2024 2024-12-18 02:07:06 +01:00
setup.01.mkinitrd Fri Dec 13 22:59:13 UTC 2024 2024-12-14 01:04:00 +01:00
slack-desc Mon May 28 19:12:29 UTC 2018 2018-05-31 23:39:35 +02:00

Slackware initrd mini HOWTO
by Patrick Volkerding, volkerdi@slackware.com
@DATE@

This document describes how to create and install an initrd, which may be 
required to use some features of the kernel.  Also see "man mkinitrd".

1.  What is an initrd?
2.  Why do 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.  Usually these modules are 
required to support the filesystem used by the root partition (ext3, 
reiserfs, xfs), or perhaps the controller that the hard drive is attached 
to (SCSI, RAID, etc).  Essentially, there are so many different options 
available in modern Linux kernels that it isn't practical to try to ship 
many different kernels to try to cover everyone's needs.  It's a lot more 
flexible to ship a generic kernel and a set of kernel modules for it.

3.  How do I build the initrd?

The easiest way to make the initrd is to use the mkinitrd script included 
in Slackware's mkinitrd package.  We'll walk through the process of 
upgrading to the generic @KERNEL_VERSION@ Linux kernel using the packages
found in Slackware's slackware/a/ directory.

First, make sure the kernel, kernel modules, and mkinitrd package are 
installed (the current version numbers might be a little different, so 
this is just an example):

  installpkg kernel-generic-@KERNEL_VERSION@-@ARCH@-@BUILD@.tgz
  installpkg kernel-modules-@KERNEL_VERSION@-@ARCH@-@BUILD@.tgz
  installpkg mkinitrd-@MKINITRD_VERSION@-@ARCH@-@BUILD@.tgz

Change into the /boot directory:

  cd /boot

Now you'll want to run "mkinitrd".  I'm using ext4 for my root
filesystem, and since mkinitrd should figure out any other modules
it requires, I shouldn't need to specify any others:

  mkinitrd -c -k @KERNEL_VERSION@ -m ext4

This should do two things.  First, it will create a directory
/boot/initrd-tree containing the initrd's filesystem.  Then it will
create an initrd (/boot/initrd.gz) from this tree.  If you wanted to,
you could make some additional changes in /boot/initrd-tree/ and
then run mkinitrd again without options to rebuild the image.  That's
optional, though, and only advanced users will need to think about that.

Here's another example:  Build an initrd image using Linux @KERNEL_VERSION@
kernel modules for a system with an ext3 root partition on /dev/sdb3:

  mkinitrd -c -k @KERNEL_VERSION@ -m ext3 -f ext3 -r /dev/sdb3


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-@KERNEL_VERSION@-generic
  initrd = /boot/initrd.gz
  root = /dev/sda6
  label = @LILO_KERNEL_NAME@
  read-only
# Linux bootable partition config ends

The initrd is loaded by the "initrd = /boot/initrd.gz" 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 such as syslinux also support the use of an initrd.
See the documentation for those programs for details on using an
initrd with them.

Some, such as GRUB, require the initrd to be named similarly to the
kernel. So, for this kernel:

/boot/vmlinuz-@KERNEL_VERSION@-generic

You would want to rename your initrd to this:

/boot/initrd-@KERNEL_VERSION@-generic.img

In fact, if you use the geninitrd script to make your initrd (which it
will pretty much do automatically for the generic kernel) it will name
it this way, and will make a compatibilty symlink initrd.gz.


---------

Have fun!