A minor fix to /sbin/mkinitrd
by mumahendras3 from LinuxQuestions.org on (#4YCXZ)
The mkinitrd.conf man page said that in order to not use udev in the initrd, one can set UDEV="0" in /etc/mkinitrd.conf. But in /sbin/mkinitrd script, the relevant "if" test uses Code:[ ! -z "$UDEV" ] which makes UDEV="0" also means to include udev in the initrd. I think it should have been Code:[ "$UDEV" = "1" ]Below is the diff.
Code:--- mkinitrd 2019-09-05 11:37:08.000000000 +0700
+++ mkinitrd.new 2020-01-25 01:31:07.165012754 +0700
@@ -592,7 +592,7 @@
fi
# Include udev in initrd
-if [ ! -z "$UDEV" ]; then
+if [ "$UDEV" = "1" ]; then
cp /sbin/udev* $SOURCE_TREE/sbin/
cp -a /lib/udev $SOURCE_TREE/lib/
# But we don't want all of /lib/udev(I'm sorry if it's already fixed before)


Code:--- mkinitrd 2019-09-05 11:37:08.000000000 +0700
+++ mkinitrd.new 2020-01-25 01:31:07.165012754 +0700
@@ -592,7 +592,7 @@
fi
# Include udev in initrd
-if [ ! -z "$UDEV" ]; then
+if [ "$UDEV" = "1" ]; then
cp /sbin/udev* $SOURCE_TREE/sbin/
cp -a /lib/udev $SOURCE_TREE/lib/
# But we don't want all of /lib/udev(I'm sorry if it's already fixed before)