Create a udev rule for /dev/root
In the installation CD, this ensures that systemd will see a proper udev node for /dev/root. Fixes #4399. Borrowed from http://lists.freedesktop.org/archives/systemd-devel/2014-July/020988.html
This commit is contained in:
parent
bd19f65ebf
commit
058bf4ccc4
@ -368,6 +368,14 @@ exec 3>&-
|
|||||||
@postMountCommands@
|
@postMountCommands@
|
||||||
|
|
||||||
|
|
||||||
|
# Emit a udev rule for /dev/root to prevent systemd from complaining.
|
||||||
|
eval $(udevadm info --export --export-prefix=ROOT_ --device-id-of-file=$targetRoot || true)
|
||||||
|
if [ "$ROOT_MAJOR" -a "$ROOT_MINOR" -a "$ROOT_MAJOR" != 0 ]; then
|
||||||
|
mkdir -p /run/udev/rules.d
|
||||||
|
echo 'ACTION=="add|change", SUBSYSTEM=="block", ENV{MAJOR}=="'$ROOT_MAJOR'", ENV{MINOR}=="'$ROOT_MINOR'", SYMLINK+="root"' > /run/udev/rules.d/61-dev-root-link.rules
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
# Stop udevd.
|
# Stop udevd.
|
||||||
udevadm control --exit || true
|
udevadm control --exit || true
|
||||||
|
|
||||||
|
@ -346,9 +346,6 @@ in
|
|||||||
(isYes "BLK_DEV_INITRD")
|
(isYes "BLK_DEV_INITRD")
|
||||||
];
|
];
|
||||||
|
|
||||||
# Prevent systemd from waiting for the /dev/root symlink.
|
|
||||||
systemd.units."dev-root.device".text = "";
|
|
||||||
|
|
||||||
boot.initrd.supportedFilesystems = map (fs: fs.fsType) fileSystems;
|
boot.initrd.supportedFilesystems = map (fs: fs.fsType) fileSystems;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user