* Added boot.initrd.lvm flag for use NixOS with LVM2 root partition.
* Added sis support for xserver. svn path=/nixos/trunk/; revision=8924
This commit is contained in:
parent
58b29cd565
commit
cd1023c50d
@ -73,6 +73,13 @@ udevd --daemon
|
|||||||
udevtrigger
|
udevtrigger
|
||||||
udevsettle
|
udevsettle
|
||||||
|
|
||||||
|
if type -p dmsetup > /dev/null; then
|
||||||
|
echo "dmsetup found, starting device mapper and lvm"
|
||||||
|
dmsetup mknodes
|
||||||
|
vgscan --ignorelockingfailure
|
||||||
|
vgchange -ay --ignorelockingfailure
|
||||||
|
fi
|
||||||
|
|
||||||
if test -n "$debug1devices"; then fail; fi
|
if test -n "$debug1devices"; then fail; fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -177,6 +177,14 @@
|
|||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
name = ["boot" "initrd" "lvm"];
|
||||||
|
default = false;
|
||||||
|
description = "
|
||||||
|
Whether to include lvm in the initial ramdisk. You should use this option
|
||||||
|
if your ROOT device is on lvm volume.
|
||||||
|
";
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
name = ["boot" "initrd" "enableSplashScreen"];
|
name = ["boot" "initrd" "enableSplashScreen"];
|
||||||
|
@ -52,10 +52,18 @@ rec {
|
|||||||
inherit (pkgsStatic) utillinux;
|
inherit (pkgsStatic) utillinux;
|
||||||
inherit (pkgsDiet) udev;
|
inherit (pkgsDiet) udev;
|
||||||
e2fsprogs = pkgs.e2fsprogsDiet;
|
e2fsprogs = pkgs.e2fsprogsDiet;
|
||||||
|
devicemapper = if config.get ["boot" "initrd" "lvm"] then pkgs.devicemapperStatic else null;
|
||||||
|
lvm2 = if config.get ["boot" "initrd" "lvm"] then pkgs.lvm2Static else null;
|
||||||
allowedReferences = []; # prevent accidents like glibc being included in the initrd
|
allowedReferences = []; # prevent accidents like glibc being included in the initrd
|
||||||
}
|
}
|
||||||
"
|
"
|
||||||
ensureDir $out/bin
|
ensureDir $out/bin
|
||||||
|
if [ -n $devicemapper ]; then
|
||||||
|
cp $devicemapper/sbin/dmsetup.static $out/bin/dmsetup
|
||||||
|
cp $lvm2/sbin/lvm.static $out/bin/lvm
|
||||||
|
ln -s lvm $out/bin/vgscan
|
||||||
|
ln -s lvm $out/bin/vgchange
|
||||||
|
fi
|
||||||
cp $utillinux/bin/mount $utillinux/bin/umount $utillinux/sbin/pivot_root $out/bin
|
cp $utillinux/bin/mount $utillinux/bin/umount $utillinux/sbin/pivot_root $out/bin
|
||||||
cp -p $e2fsprogs/sbin/fsck* $e2fsprogs/sbin/e2fsck $out/bin
|
cp -p $e2fsprogs/sbin/fsck* $e2fsprogs/sbin/e2fsck $out/bin
|
||||||
cp $udev/sbin/udevd $udev/sbin/udevtrigger $udev/sbin/udevsettle $out/bin
|
cp $udev/sbin/udevd $udev/sbin/udevtrigger $udev/sbin/udevsettle $out/bin
|
||||||
|
@ -36,7 +36,7 @@ import ../upstart-jobs/gather.nix {
|
|||||||
# Makes LVM logical volumes available.
|
# Makes LVM logical volumes available.
|
||||||
(import ../upstart-jobs/lvm.nix {
|
(import ../upstart-jobs/lvm.nix {
|
||||||
inherit modprobe;
|
inherit modprobe;
|
||||||
inherit (pkgs) lvm2;
|
inherit (pkgs) lvm2 devicemapper;
|
||||||
})
|
})
|
||||||
|
|
||||||
# Activate software RAID arrays.
|
# Activate software RAID arrays.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{modprobe, lvm2}:
|
{modprobe, lvm2, devicemapper}:
|
||||||
|
|
||||||
{
|
{
|
||||||
name = "lvm";
|
name = "lvm";
|
||||||
@ -12,9 +12,10 @@ script
|
|||||||
# Load the device mapper.
|
# Load the device mapper.
|
||||||
${modprobe}/sbin/modprobe dm_mod || true
|
${modprobe}/sbin/modprobe dm_mod || true
|
||||||
|
|
||||||
|
${devicemapper}/sbin/dmsetup mknodes
|
||||||
# Scan for block devices that might contain LVM physical volumes
|
# Scan for block devices that might contain LVM physical volumes
|
||||||
# and volume groups.
|
# and volume groups.
|
||||||
#${lvm2}/sbin/vgscan
|
${lvm2}/sbin/vgscan --mknodes
|
||||||
|
|
||||||
# Make all logical volumes on all volume groups available, i.e.,
|
# Make all logical volumes on all volume groups available, i.e.,
|
||||||
# make them appear in /dev.
|
# make them appear in /dev.
|
||||||
|
@ -60,6 +60,7 @@ let
|
|||||||
xorg.xf86inputmouse
|
xorg.xf86inputmouse
|
||||||
]
|
]
|
||||||
++ optional (videoDriver == "vesa") xorg.xf86videovesa
|
++ optional (videoDriver == "vesa") xorg.xf86videovesa
|
||||||
|
++ optional (videoDriver == "sis") xorg.xf86videosis
|
||||||
++ optional (videoDriver == "i810") xorg.xf86videoi810
|
++ optional (videoDriver == "i810") xorg.xf86videoi810
|
||||||
++ optional (videoDriver == "intel") xorg.xf86videointel;
|
++ optional (videoDriver == "intel") xorg.xf86videointel;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user