nixpkgs/nixos/modules/installer/tools
aszlig f4e742594d
nixos: Fix detection of btrfs root volume
Regression introduced by 801c920e95.

Since then, the btrfsSimple subtest of the installer VM test fails with:

Btrfs did not return a path for the subvolume at /

The reason for this is that the output for "btrfs subvol show" has
changed between version 4.8.2 and 4.13.1.

For example the output of "btrfs subvol show /" in version 4.8.2 was:

/ is toplevel subvolume

In version 4.13.1, the output now is the following and thus the regular
expressions used in nixos-generate-config.pl and install-grub.pl now
match (which results in the error mentioned above):

/
        Name:                   <FS_TREE>
        UUID:                   -
        Parent UUID:            -
        Received UUID:          -
        Creation time:          -
        Subvolume ID:           5
        Generation:             287270
        Gen at creation:        0
        Parent ID:              0
        Top level ID:           0
        Flags:                  -
        Snapshot(s):

In order to fix this I've changed nixos-generate-config.pl and
install-grub.pl, because both use "btrfs subvol show" in a similar vein,
so the regex for parsing the output now doesn't match anymore whenever
the volume path is "/", which should result in the same behaviour as we
had with btrfs-progs version 4.8.2.

Tested against the btrfsSimple, btrfsSubvols and btrfsSubvolDefault
subtests of the installer VM test and they all succeed now.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2017-10-11 04:30:52 +02:00
..
nixos-build-vms Remove some obsolete references to <nixos> 2015-08-05 17:37:08 +02:00
auto-upgrade.nix auto-upgrade: add proxy support 2017-08-30 01:25:47 +02:00
get-version-suffix Revert adding .git-revision unconditionally 2016-08-09 14:15:06 +02:00
nix-fallback-paths.nix nix: 1.11.14 -> 1.11.15 2017-09-15 16:38:33 +02:00
nixos-generate-config.pl nixos: Fix detection of btrfs root volume 2017-10-11 04:30:52 +02:00
nixos-install.sh Merge pull request #28777 from copumpkin/installer-chroot 2017-09-26 12:23:19 -07:00
nixos-option.sh module system: extensible option types 2016-11-06 00:05:58 +01:00
nixos-prepare-root.sh nixos-prepare-root: force symlink at /run 2017-05-01 16:10:58 +02:00
nixos-rebuild.sh nixos-rebuild: Respect empty NIX_REMOTE 2017-07-07 11:58:10 +02:00
nixos-version.sh nixos-version: fix syntax error and add -h (#16906) 2016-07-13 09:11:32 +02:00
tools.nix Refactor nixos-install to separate out filesystem build logic 2017-04-16 16:09:41 +00:00