diff options
author | Patrick J Volkerding <volkerdi@slackware.com> | 2022-04-26 19:45:46 +0000 |
---|---|---|
committer | Eric Hameleers <alien@slackware.com> | 2022-04-27 06:59:51 +0200 |
commit | ee861a17268a54a17b3b321d9a1ff82ed547e606 (patch) | |
tree | 023e30445780134e9caadb2d3e8d7b7df8172617 /source/a | |
parent | f0048b99862439c8f968371f12dade3470e803ab (diff) | |
download | current-ee861a17268a54a17b3b321d9a1ff82ed547e606.tar.gz current-ee861a17268a54a17b3b321d9a1ff82ed547e606.tar.xz |
Tue Apr 26 19:45:46 UTC 202220220426194546
a/mkinitrd-1.4.11-x86_64-29.txz: Rebuilt.
Support mounting additional partitions from the initrd - useful for anyone
still stuck with a separated /usr. ;-) Thanks to PiterPunk.
Ensure that the target directory exists before trying to copy a module into
it (workaround for coreutils 9.1 behavior change).
ap/vim-8.2.4830-x86_64-1.txz: Upgraded.
l/SDL2-2.0.22-x86_64-1.txz: Upgraded.
l/elfutils-0.187-x86_64-1.txz: Upgraded.
l/fluidsynth-2.2.7-x86_64-1.txz: Upgraded.
n/gnupg2-2.2.35-x86_64-1.txz: Upgraded.
xap/vim-gvim-8.2.4830-x86_64-1.txz: Upgraded.
xap/xpdf-4.04-x86_64-1.txz: Upgraded.
Diffstat (limited to 'source/a')
-rw-r--r-- | source/a/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch | 12 | ||||
-rw-r--r-- | source/a/mkinitrd/init | 11 | ||||
-rw-r--r-- | source/a/mkinitrd/mkinitrd | 23 | ||||
-rw-r--r-- | source/a/mkinitrd/mkinitrd.8 | 10 | ||||
-rwxr-xr-x | source/a/mkinitrd/mkinitrd.SlackBuild | 4 | ||||
-rw-r--r-- | source/a/mkinitrd/mkinitrd.conf.5 | 15 |
6 files changed, 68 insertions, 7 deletions
diff --git a/source/a/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch b/source/a/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch new file mode 100644 index 000000000..6eb0b2a44 --- /dev/null +++ b/source/a/mkinitrd/0006-coreutils-9.1-ensure-target-dir-exists.patch @@ -0,0 +1,12 @@ +--- ./mkinitrd.orig 2022-01-26 14:33:29.000000000 -0600 ++++ ./mkinitrd 2022-04-26 13:55:17.511004239 -0500 +@@ -778,6 +778,9 @@ + echo "$LINE" >> $SOURCE_TREE/load_kernel_modules + fi + ++ # Ensure that the destination directory for the module exists: ++ mkdir -p "$(dirname $SOURCE_TREE/$SRCMOD)" ++ + # Try to add the module to the initrd-tree. This should be done + # even if it exists there already as we may have changed compilers + # or otherwise caused the modules in the initrd-tree to need diff --git a/source/a/mkinitrd/init b/source/a/mkinitrd/init index 7e238ac61..2969c2272 100644 --- a/source/a/mkinitrd/init +++ b/source/a/mkinitrd/init @@ -341,6 +341,17 @@ else /bin/sh fi +# Mount additional filesystems +if [ -f /addfstab ]; then + while read DEV MNTPNT FS OPTS DUMP PASSNO ; do + if echo $DEV | grep -qE '(LABEL|UUID)=' ; then + DEV=$(findfs $DEV) + fi + echo $DEV "/mnt/"$MNTPNT $FS "ro,"$OPTS $DUMP $PASSNO >> /etc/fstab + done < /addfstab + mount -a +fi + # Need to make sure OPTIONS+="db_persist" exists for all dm devices # That should be handled in /sbin/mkinitrd now /sbin/udevadm info --cleanup-db diff --git a/source/a/mkinitrd/mkinitrd b/source/a/mkinitrd/mkinitrd index 3c90f06bd..75d7ced66 100644 --- a/source/a/mkinitrd/mkinitrd +++ b/source/a/mkinitrd/mkinitrd @@ -57,6 +57,9 @@ # to add libargon2 and libgcc_s for cryptsetup LUKS2 support; add # jfs and xfs repair tools to initrd if those filesystems are used; # fixes and enhancements to docs +# Modified by Piter Punk <piterpunk@slackware.com> 25 April 2022 +# Add support to specify additional filesystems to be mounted by +# initrd. Useful for those that have a separated '/usr' MKINITRD_VERSION=1.4.11 @@ -127,8 +130,11 @@ initrd, and the script is easy to modify. Be creative. :-) -B Add /sbin/btrfs to enable scanning for a root filesystem that is part of a Btrfs multi-device filesystem. -M Add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd - -P Prepend the output image with the microcode CPIO archive given in arguments. + -P Prepend the output image with the microcode CPIO archive given in + arguments. -R Add support for RAID partitions + -MNT Additional filesystems to be mounted by initrd. Multiple mount + entries can be specified in a list separated by colon (:). -V Display version number A simple example: Build an initrd for a reiserfs root partition: @@ -428,8 +434,11 @@ while [ ! -z "$1" ]; do exit 1 fi shift 2 - ;; - + ;; + -MNT) + MOUNT_LIST="$2" + shift 2 + ;; -R) RAID=1 shift @@ -664,6 +673,14 @@ if [ ! -z "$CRYPT" -o ! -z "$LVM" ]; then $SOURCE_TREE/lib/udev/rules.d/95-dm-initrd.rules fi +# If there is additional filesystems to be mounted, copy their configuration +# from system's /etc/fstab: +if [ ! -z "$MOUNT_LIST" ]; then + for MOUNT_POINT in $(echo $MOUNT_LIST | tr : \ ); do + grep '^[^#[:space:]]\+[[:space:]]\+'$MOUNT_POINT'[[:space:]]' /etc/fstab + done > $SOURCE_TREE/addfstab +fi + # Make module directories: for kver in $(echo ${KERNEL_VERSION} | tr ':' '\n') ; do if [ ! -d $SOURCE_TREE/lib/modules/$kver ]; then diff --git a/source/a/mkinitrd/mkinitrd.8 b/source/a/mkinitrd/mkinitrd.8 index 92bd18aa9..3436bfc2e 100644 --- a/source/a/mkinitrd/mkinitrd.8 +++ b/source/a/mkinitrd/mkinitrd.8 @@ -7,7 +7,7 @@ .ie \\n(.$=0:((0\\$1)*2u>(\\n(.lu-\\n(.iu)) .TP .el .TP "\\$1" .. -.TH MKINITRD 8 "27 March 2010" "Slackware Version 13.1" +.TH MKINITRD 8 "25 April 2022" "Slackware Version 15.0" .SH NAME mkinitrd \- create or rebuilt an initrd (initial ramdisk) using initramfs (simple cpio+gzip). .SH SYNOPSIS @@ -221,6 +221,14 @@ available on the system. .B \-M This option add the files in /etc/modprobe.d/ and /lib/modprobe.d/ to the initrd. .TP +.B \-MNT mount_point_list +List of filesystems to be mounted by initrd. Useful if libraries or commands that +are outside the root filesystem are needed in early boot. Multiple filesystems can +be listed separated by colon (:), e.g. + + -MNT /usr:/usr/local + +.TP .B \-V Display version information and exit. .SH EXAMPLES diff --git a/source/a/mkinitrd/mkinitrd.SlackBuild b/source/a/mkinitrd/mkinitrd.SlackBuild index 7fd28b3da..456e4481a 100755 --- a/source/a/mkinitrd/mkinitrd.SlackBuild +++ b/source/a/mkinitrd/mkinitrd.SlackBuild @@ -25,7 +25,7 @@ cd $(dirname $0) ; CWD=$(pwd) PKGNAM=mkinitrd VERSION=${VERSION:-1.4.11} BB=1.32.1 -BUILD=${BUILD:-28} +BUILD=${BUILD:-29} # Automatically determine the architecture we're building on: if [ -z "$ARCH" ]; then @@ -126,6 +126,8 @@ chmod 755 $PKG/sbin/mkinitrd ( cd $PKG/sbin ; zcat $CWD/0003-blacklist.40-usb_modeswitch.rules.patch.gz | patch -p1 --verbose || exit 1) || exit 1 # Support modules compressed with xz: ( cd $PKG/sbin ; zcat $CWD/0005-support-modules-compressed-with-xz.patch.gz | patch -p1 --verbose || exit 1) || exit 1 +# Ensure target directory for the module exists (cp regression workaround for coreutils-9.1): +( cd $PKG/sbin ; zcat $CWD/0006-coreutils-9.1-ensure-target-dir-exists.patch.gz | patch -p1 --verbose || exit 1) || exit 1 rm -f $PKG/sbin/mkinitrd.orig # Use -R if we detect the root partition is a partition of a RAID device: ( cd $PKG/usr/share/mkinitrd ; zcat $CWD/0004-check-if-BASEDEV-is-a-partition-of-a-RAID-volume.patch.gz | patch -p1 --verbose || exit 1) || exit 1 diff --git a/source/a/mkinitrd/mkinitrd.conf.5 b/source/a/mkinitrd/mkinitrd.conf.5 index b28a6e080..82f1faeed 100644 --- a/source/a/mkinitrd/mkinitrd.conf.5 +++ b/source/a/mkinitrd/mkinitrd.conf.5 @@ -1,7 +1,7 @@ -.\" mkinitrd.5 Robby Workman <rworkman@slackware.com> +.\" mkinitrd.conf.5 Robby Workman <rworkman@slackware.com> .\" 28 August 2010 " -.TH MKINITRD.CONF 5 "27 March 2010" "Slackware 13.1" +.TH MKINITRD.CONF 5 "25 April 2022" "Slackware 15.0" .SH NAME .B mkinitrd.conf(5) .SH SYNOPSIS @@ -239,6 +239,17 @@ Examples: .br MICROCODE_ARCH="/boot/intel-ucode.cpio" +.TP 5 +.I MOUNT_LIST +Lists additional filesystems to be mounted by initrd. Useful if libraries or +commands that are outside root filesystem are needed in early boot. Multiple +filesystems can be listed separated by colon (:). Device, filesystem type and +options are copied from /etc/fstab. +.br +Example: +.br +MOUNT_LIST="/usr:/usr/local" + .SH FILES .I /etc/mkinitrd.conf .br |