* 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,14 +114,15 @@ echo "running udev..."
|
||||||
export UDEV_CONFIG_FILE=@udevConf@
|
export UDEV_CONFIG_FILE=@udevConf@
|
||||||
mkdir -p /dev/.udev # !!! bug in udev?
|
mkdir -p /dev/.udev # !!! bug in udev?
|
||||||
udevd --daemon
|
udevd --daemon
|
||||||
|
udevadm control --env=STARTUP=1
|
||||||
udevadm trigger
|
udevadm trigger
|
||||||
|
udevadm control --env=STARTUP=
|
||||||
udevadm settle
|
udevadm settle
|
||||||
|
|
||||||
echo "starting device mapper and LVM..."
|
echo "starting device mapper and LVM..."
|
||||||
dmsetup mknodes
|
lvm vgscan
|
||||||
lvm vgscan --ignorelockingfailure
|
lvm vgchange -ay
|
||||||
lvm vgchange -ay --ignorelockingfailure
|
|
||||||
|
|
||||||
if test -n "$debug1devices"; then fail; fi
|
if test -n "$debug1devices"; then fail; fi
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -133,7 +133,7 @@ let
|
||||||
|
|
||||||
cp -pd ${pkgs.e2fsprogs}/lib/lib*.so.* $out/lib
|
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/dmsetup $out/bin/dmsetup
|
||||||
cp ${pkgs.lvm2}/sbin/lvm $out/bin/lvm
|
cp ${pkgs.lvm2}/sbin/lvm $out/bin/lvm
|
||||||
cp ${pkgs.lvm2}/lib/libdevmapper.so.*.* $out/lib
|
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-cdrom_id.rules $out/
|
||||||
cp ${pkgs.udev}/libexec/rules.d/60-persistent-storage.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.udev}/libexec/rules.d/80-drivers.rules $out/
|
||||||
|
cp ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/
|
||||||
|
|
||||||
for i in $out/*.rules; do
|
for i in $out/*.rules; do
|
||||||
substituteInPlace $i \
|
substituteInPlace $i \
|
||||||
|
@ -221,7 +222,9 @@ let
|
||||||
--replace vol_id ${extraUtils}/bin/vol_id \
|
--replace vol_id ${extraUtils}/bin/vol_id \
|
||||||
--replace cdrom_id ${extraUtils}/bin/cdrom_id \
|
--replace cdrom_id ${extraUtils}/bin/cdrom_id \
|
||||||
--replace /sbin/blkid ${extraUtils}/bin/blkid \
|
--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
|
done
|
||||||
|
|
||||||
# Remove rule preventing creation of a by-label symlink
|
# Remove rule preventing creation of a by-label symlink
|
||||||
|
|
Loading…
Reference in a new issue