Эх сурвалжийг харах

Add another script for dracut to copy kmods from initramfs to the new rootfs.

Juan RP 12 жил өмнө
parent
commit
7601096f1a

+ 7 - 0
dracut/copy-kmods.sh

@@ -0,0 +1,7 @@
+#!/bin/sh
+# -*- 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.
+mkdir -p $NEWROOT/usr/lib/modules
+cp -a /usr/lib/modules/* $NEWROOT/usr/lib/modules

+ 1 - 0
dracut/module-setup.sh

@@ -15,4 +15,5 @@ install() {
     inst /usr/bin/sed
     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"
 }