nixpkgs/nixos/modules/system/boot
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
..
loader nixos: Fix detection of btrfs root volume 2017-10-11 04:30:52 +02:00
coredump.nix
emergency-mode.nix
initrd-network.nix
initrd-ssh.nix
kernel.nix Revert "boot.kernelParams: dedup and sort" 2017-08-26 15:45:24 +01:00
kexec.nix
luksroot.nix nixos/fileystems: Fix boot fails with encrypted fs 2017-09-14 05:27:41 +02:00
modprobe.nix
networkd.nix nixos/systemd-networkd: allow [Link] section in .network files 2017-07-29 21:25:21 +02:00
pbkdf2-sha512.c
plymouth.nix
resolved.nix
shutdown.nix
stage-1-init.sh nixos/bcachefs: init module 2017-08-31 05:39:31 -05:00
stage-1.nix swap: extend randomEncryption to plainOpen and ability to select cipher 2017-07-26 20:57:10 +03:00
stage-2-init.sh stage-2: shellsheck recommendations 2017-04-05 21:40:57 +02:00
stage-2.nix
systemd-lib.nix nixos: escape brackets in systemd units 2017-04-12 15:56:26 +02:00
systemd-nspawn.nix systemd-nspawn: relax PrivateUsers check 2017-05-27 08:27:47 +01:00
systemd-unit-options.nix systemd: better document enabled, wantedBy, and requiredBy (#29453) 2017-09-16 12:48:16 +02:00
systemd.nix nixos: skip restarting systemd-logind to not break x11 2017-09-27 22:28:27 +01:00
timesyncd.nix
tmp.nix