diff --git a/dracut/copy-kmods.sh b/dracut/copy-initramfs.sh similarity index 56% rename from dracut/copy-kmods.sh rename to dracut/copy-initramfs.sh index a6b4b14..b5c43dc 100644 --- a/dracut/copy-kmods.sh +++ b/dracut/copy-initramfs.sh @@ -2,11 +2,5 @@ # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*- # ex: ts=8 sw=4 sts=4 et filetype=sh -# Copy all modules from initramfs to new rootfs. -KVER=$(uname -r) -mkdir -p $NEWROOT/usr/lib/modules -cp -a /usr/lib/modules/$KVER/kernel/* $NEWROOT/usr/lib/modules/$KVER/kernel/ -depmod -b $NEWROOT/usr - # Copy the initramfs back to the new rootfs for proper shutdown. cp /run/initramfs/live/boot/initrd.lz $NEWROOT/boot/initramfs-${KVER}.img diff --git a/dracut/module-setup.sh b/dracut/module-setup.sh index 3ec42a9..61fac22 100644 --- a/dracut/module-setup.sh +++ b/dracut/module-setup.sh @@ -14,8 +14,7 @@ install() { inst /usr/bin/chroot inst /usr/bin/chmod inst /usr/bin/sed - inst /usr/sbin/depmod inst_hook pre-pivot 01 "$moddir/adduser.sh" inst_hook pre-pivot 02 "$moddir/display-manager-autologin.sh" - inst_hook pre-pivot 03 "$moddir/copy-kmods.sh" + inst_hook pre-pivot 03 "$moddir/copy-initramfs.sh" }