* A test for installing NixOS on software RAID. Doesn't quite work
yet though - GRUB fails mysteriously on the second reboot. svn path=/nixos/trunk/; revision=21808
This commit is contained in:
parent
7484774172
commit
ec33622b48
@ -152,6 +152,7 @@ let
|
|||||||
installer.lvm = t.installer.lvm.test;
|
installer.lvm = t.installer.lvm.test;
|
||||||
installer.separateBoot = t.installer.separateBoot.test;
|
installer.separateBoot = t.installer.separateBoot.test;
|
||||||
installer.simple = t.installer.simple.test;
|
installer.simple = t.installer.simple.test;
|
||||||
|
installer.swraid = t.installer.swraid.test;
|
||||||
kde4 = t.kde4.test;
|
kde4 = t.kde4.test;
|
||||||
login = t.login.test;
|
login = t.login.test;
|
||||||
openssh = t.openssh.test;
|
openssh = t.openssh.test;
|
||||||
|
@ -173,7 +173,7 @@ let
|
|||||||
|
|
||||||
# Did /boot get mounted, if appropriate?
|
# Did /boot get mounted, if appropriate?
|
||||||
# !!! There is currently no good way to wait for the
|
# !!! There is currently no good way to wait for the
|
||||||
# `filesystems' tash to finish.
|
# `filesystems' task to finish.
|
||||||
$machine->waitForFile("/boot/grub/grub.cfg");
|
$machine->waitForFile("/boot/grub/grub.cfg");
|
||||||
|
|
||||||
# Did the swap device get activated?
|
# Did the swap device get activated?
|
||||||
@ -209,6 +209,9 @@ let
|
|||||||
|
|
||||||
in {
|
in {
|
||||||
|
|
||||||
|
# !!! `parted mkpart' seems to silently create overlapping partitions.
|
||||||
|
|
||||||
|
|
||||||
# The (almost) simplest partitioning scheme: a swap partition and
|
# The (almost) simplest partitioning scheme: a swap partition and
|
||||||
# one big filesystem partition.
|
# one big filesystem partition.
|
||||||
simple = makeTest
|
simple = makeTest
|
||||||
@ -282,5 +285,27 @@ in {
|
|||||||
'';
|
'';
|
||||||
fileSystems = rootFS;
|
fileSystems = rootFS;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
swraid = makeTest
|
||||||
|
{ createPartitions =
|
||||||
|
''
|
||||||
|
$machine->mustSucceed(
|
||||||
|
"parted /dev/vda mklabel msdos",
|
||||||
|
"parted /dev/vda -- mkpart primary 1M 1000M", # md0 (root), first device
|
||||||
|
"parted /dev/vda -- mkpart primary 1024M 2024M", # md0 (root), second device
|
||||||
|
"parted /dev/vda -- mkpart primary 2048M 2548M", # md1 (swap), first device
|
||||||
|
"parted /dev/vda -- mkpart primary 2560M 3060M", # md1 (swap), second device
|
||||||
|
"udevadm settle",
|
||||||
|
# Note that GRUB2 doesn't work with version 1.2 metadata.
|
||||||
|
"mdadm --create --force /dev/md0 --metadata 0.90 --level=raid1 --raid-devices=2 /dev/vda1 /dev/vda2",
|
||||||
|
"mdadm --create --force /dev/md1 --metadata 1.2 --level=raid1 --raid-devices=2 /dev/vda3 /dev/vda4",
|
||||||
|
"mkswap -f /dev/md1 -L swap",
|
||||||
|
"swapon -L swap",
|
||||||
|
"mkfs.ext3 -L nixos /dev/md0",
|
||||||
|
"mount LABEL=nixos /mnt",
|
||||||
|
);
|
||||||
|
'';
|
||||||
|
fileSystems = rootFS;
|
||||||
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user