diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-26 15:52:05 -0400 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-07-26 16:02:33 -0400 |
commit | 87ae76866537cb1a09e202a439c0fb4eb3d93fb9 (patch) | |
tree | eb670f2b2141e4f4debc7757af8e5be4edd084e3 /tests/installer.nix | |
parent | 1a2b3cc5e4209fdf15ab1abf17ace8c08b48ddf8 (diff) | |
download | nixpkgs-87ae76866537cb1a09e202a439c0fb4eb3d93fb9.tar nixpkgs-87ae76866537cb1a09e202a439c0fb4eb3d93fb9.tar.gz nixpkgs-87ae76866537cb1a09e202a439c0fb4eb3d93fb9.tar.bz2 nixpkgs-87ae76866537cb1a09e202a439c0fb4eb3d93fb9.tar.lz nixpkgs-87ae76866537cb1a09e202a439c0fb4eb3d93fb9.tar.xz nixpkgs-87ae76866537cb1a09e202a439c0fb4eb3d93fb9.tar.zst nixpkgs-87ae76866537cb1a09e202a439c0fb4eb3d93fb9.zip |
Fix the LVM installer test
GRUB 2 doesn't want to boot off a LVM disk: machine# installing the GRUB 2 boot loader on /dev/vda... machine# Path `/boot/grub' is not readable by GRUB on boot. Installation is impossible. Aborting. machine# /nix/store/7yc535h1lim1a5gkhjb3fr6c8193dv8w-install-grub.pl: installation of GRUB on /dev/vda failed In theory GRUB 2 supports booting from LVM, but we probably need to generate the right grub.conf (see https://wiki.archlinux.org/index.php/GRUB2#LVM). http://hydra.nixos.org/build/2904680
Diffstat (limited to 'tests/installer.nix')
-rw-r--r-- | tests/installer.nix | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/tests/installer.nix b/tests/installer.nix index c6b84c1d955..b16206547a4 100644 --- a/tests/installer.nix +++ b/tests/installer.nix @@ -47,7 +47,7 @@ let ''} boot.loader.grub.device = "${grubDevice}"; boot.loader.grub.extraConfig = "serial; terminal_output.serial"; - boot.initrd.kernelModules = [ "ext3" "virtio_console" ]; + boot.initrd.kernelModules = [ "ext3" "ext4" "xfs" "virtio_console" ]; fileSystems = [ ${fileSystems} ]; swapDevices = [ { label = "swap"; } ]; @@ -187,7 +187,7 @@ let # And just to be sure, check that the machine still boots after # "nixos-rebuild switch". - my $machine = createMachine({ hda => "harddisk" }); + my $machine = createMachine({ hda => "harddisk", hdaInterface => "${iface}" }); $machine->waitForJob("network-interfaces"); $machine->shutdown; ''; @@ -250,28 +250,32 @@ in { }; # Create two physical LVM partitions combined into one volume group - # that contains the logical swap and root partitions. + # that contains the logical swap and root partitions. Uses a lvm = makeTest { createPartitions = '' $machine->mustSucceed( "parted /dev/vda mklabel msdos", - "parted /dev/vda -- mkpart primary 1M 2048M", # first PV + "parted /dev/vda -- mkpart primary ext2 1M 30MB", # /boot + "parted /dev/vda -- mkpart primary 31M 2048M", # first PV "parted /dev/vda -- set 1 lvm on", "parted /dev/vda -- mkpart primary 2048M -1s", # second PV "parted /dev/vda -- set 2 lvm on", "udevadm settle", - "pvcreate /dev/vda1 /dev/vda2", - "vgcreate MyVolGroup /dev/vda1 /dev/vda2", + "pvcreate /dev/vda2 /dev/vda3", + "vgcreate MyVolGroup /dev/vda2 /dev/vda3", "lvcreate --size 1G --name swap MyVolGroup", "lvcreate --size 2G --name nixos MyVolGroup", "mkswap -f /dev/MyVolGroup/swap -L swap", "swapon -L swap", - "mkfs.ext3 -L nixos /dev/MyVolGroup/nixos", + "mkfs.xfs -L nixos /dev/MyVolGroup/nixos", "mount LABEL=nixos /mnt", + "mkfs.ext4 -L boot /dev/vda1", + "mkdir /mnt/boot", + "mount LABEL=boot /mnt/boot", ); ''; - fileSystems = rootFS; + fileSystems = rootFS + bootFS; }; swraid = makeTest |