3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/nixos/modules/system/boot/loader
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
..
generations-dir fix indentation in several nixos option descriptions 2016-12-16 18:29:25 +01:00
generic-extlinux-compatible extlinux-conf-builder: Choose whether to use DTBs on per-generation basis 2016-07-10 03:03:51 +03:00
grub nixos: Fix detection of btrfs root volume 2017-10-11 04:30:52 +02:00
init-script init-script-builder: handle containers without a kernel 2016-02-10 23:27:28 +00:00
raspberrypi raspberryPi boot loader: don't remove xx-initrd files 2017-02-12 02:48:57 +02:00
systemd-boot Include date and NixOS version in systemd-boot entries 2017-09-02 14:28:34 -04:00
efi.nix Use systemd-boot instead of gummiboot 2016-05-31 17:02:47 +02:00
loader.nix nixos: loader: added generic config.boot.loader.timeout option 2015-01-30 09:53:44 +01:00