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/mkinitrd/mkinitrd | |
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/mkinitrd/mkinitrd')
-rw-r--r-- | source/a/mkinitrd/mkinitrd | 23 |
1 files changed, 20 insertions, 3 deletions
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 |