* Fix the GRUB 1 installer test. Note that GRUB 1 doesn't
automatically detect /dev/vd* devices, so users have to fix /boot/grub/device.map manually. svn path=/nixos/trunk/; revision=33832
This commit is contained in:
parent
f8e36664a6
commit
6ef5e0e5b3
@ -152,11 +152,15 @@ let
|
|||||||
"${ config { inherit fileSystems testChannel grubVersion; } }",
|
"${ config { inherit fileSystems testChannel grubVersion; } }",
|
||||||
"/mnt/etc/nixos/configuration.nix");
|
"/mnt/etc/nixos/configuration.nix");
|
||||||
|
|
||||||
|
# Hack to get GRUB 1 to install on virtio. GRUB 1 has a patch
|
||||||
|
# from Gentoo to support virtio, but it's incomplete: it doesn't
|
||||||
|
# detect /dev/vd* automatically. And we don't care enough about
|
||||||
|
# GRUB 1 to fix it.
|
||||||
|
$machine->mustSucceed("mkdir -p /mnt/boot/grub; echo '(hd0) /dev/vda' > /mnt/boot/grub/device.map");
|
||||||
|
|
||||||
# Perform the installation.
|
# Perform the installation.
|
||||||
$machine->mustSucceed("nixos-install >&2");
|
$machine->mustSucceed("nixos-install >&2");
|
||||||
|
|
||||||
$machine->mustSucceed("cat /mnt/boot/grub/grub.cfg >&2");
|
|
||||||
|
|
||||||
$machine->shutdown;
|
$machine->shutdown;
|
||||||
|
|
||||||
# Now see if we can boot the installation.
|
# Now see if we can boot the installation.
|
||||||
@ -165,20 +169,18 @@ 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' task to finish.
|
# `filesystems' task to finish.
|
||||||
$machine->waitForFile("/boot/grub/grub.cfg");
|
$machine->waitForFile("/boot/grub");
|
||||||
|
|
||||||
# Did the swap device get activated?
|
# Did the swap device get activated?
|
||||||
# !!! Idem.
|
# !!! Idem.
|
||||||
$machine->waitUntilSucceeds("cat /proc/swaps | grep -q /dev");
|
$machine->waitUntilSucceeds("cat /proc/swaps | grep -q /dev");
|
||||||
|
|
||||||
$machine->mustSucceed("nix-env -i coreutils >&2");
|
$machine->mustSucceed("nix-env -f /etc/nixos/nixpkgs -i coreutils >&2");
|
||||||
$machine->mustSucceed("type -tP ls | tee /dev/stderr") =~ /.nix-profile/
|
$machine->mustSucceed("type -tP ls | tee /dev/stderr") =~ /.nix-profile/
|
||||||
or die "nix-env failed";
|
or die "nix-env failed";
|
||||||
|
|
||||||
$machine->mustSucceed("nixos-rebuild switch >&2");
|
$machine->mustSucceed("nixos-rebuild switch >&2");
|
||||||
|
|
||||||
$machine->mustSucceed("cat /boot/grub/grub.cfg >&2");
|
|
||||||
|
|
||||||
$machine->shutdown;
|
$machine->shutdown;
|
||||||
|
|
||||||
# And just to be sure, check that the machine still boots after
|
# And just to be sure, check that the machine still boots after
|
||||||
|
Loading…
x
Reference in New Issue
Block a user