* Use the LVM udev rules in stage 1. This makes
/dev/disk/by-{label,uuid} paths available for LVM volumes. svn path=/nixos/trunk/; revision=19334
This commit is contained in:
parent
5c66611f3e
commit
ac8a2ae577
|
@ -114,13 +114,14 @@ echo "running udev..."
|
|||
export UDEV_CONFIG_FILE=@udevConf@
|
||||
mkdir -p /dev/.udev # !!! bug in udev?
|
||||
udevd --daemon
|
||||
udevadm control --env=STARTUP=1
|
||||
udevadm trigger
|
||||
udevadm control --env=STARTUP=
|
||||
udevadm settle
|
||||
|
||||
echo "starting device mapper and LVM..."
|
||||
dmsetup mknodes
|
||||
lvm vgscan --ignorelockingfailure
|
||||
lvm vgchange -ay --ignorelockingfailure
|
||||
lvm vgscan
|
||||
lvm vgchange -ay
|
||||
|
||||
if test -n "$debug1devices"; then fail; fi
|
||||
|
||||
|
|
|
@ -133,7 +133,7 @@ let
|
|||
|
||||
cp -pd ${pkgs.e2fsprogs}/lib/lib*.so.* $out/lib
|
||||
|
||||
# Copy dmsetup and lvm, if we need it.
|
||||
# Copy dmsetup and lvm.
|
||||
cp ${pkgs.lvm2}/sbin/dmsetup $out/bin/dmsetup
|
||||
cp ${pkgs.lvm2}/sbin/lvm $out/bin/lvm
|
||||
cp ${pkgs.lvm2}/lib/libdevmapper.so.*.* $out/lib
|
||||
|
@ -211,6 +211,7 @@ let
|
|||
cp ${pkgs.udev}/libexec/rules.d/60-cdrom_id.rules $out/
|
||||
cp ${pkgs.udev}/libexec/rules.d/60-persistent-storage.rules $out/
|
||||
cp ${pkgs.udev}/libexec/rules.d/80-drivers.rules $out/
|
||||
cp ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/
|
||||
|
||||
for i in $out/*.rules; do
|
||||
substituteInPlace $i \
|
||||
|
@ -221,7 +222,9 @@ let
|
|||
--replace vol_id ${extraUtils}/bin/vol_id \
|
||||
--replace cdrom_id ${extraUtils}/bin/cdrom_id \
|
||||
--replace /sbin/blkid ${extraUtils}/bin/blkid \
|
||||
--replace /sbin/modprobe ${extraUtils}/bin/modprobe
|
||||
--replace /sbin/modprobe ${extraUtils}/bin/modprobe \
|
||||
--replace '$env{DM_SBIN_PATH}/blkid' ${extraUtils}/bin/blkid \
|
||||
--replace 'ENV{DM_SBIN_PATH}="/sbin"' 'ENV{DM_SBIN_PATH}="${extraUtils}/bin"'
|
||||
done
|
||||
|
||||
# Remove rule preventing creation of a by-label symlink
|
||||
|
|
Loading…
Reference in a new issue