Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

grub2: Properly disable zfs by default #99386

Merged
merged 1 commit into from Jan 23, 2021
Merged

Conversation

mohe2015
Copy link
Contributor

@mohe2015 mohe2015 commented Oct 2, 2020

Motivation for this change

Make the system derivation smaller.
Minimal closure size change: 773,395648 MB -> 672,400544 MB (If I measured correctly)

Things done

I don't know if this is the proper change or if this breaks peoples system.
https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/tasks/filesystems/zfs.nix#L450 seems to enable zfsSupport if needed. https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix#L16 overrides zfsSupport to true if needed and the default is used otherwise (https://github.com/NixOS/nixpkgs/blob/master/nixos/modules/system/boot/loader/grub/grub.nix#L21).

  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@Mic92
Copy link
Member

Mic92 commented Jan 18, 2021

@GrahamcOfBorg test zfs

@mohe2015
Copy link
Contributor Author

@Mic92 I don't really understand the logs but it seems like the grub tests didn't run. Should I rebase or something? Also is it normal that the logs for the zfs tests are empty for me?

@Mic92
Copy link
Member

Mic92 commented Jan 21, 2021

Yeah. I think it should be $ nix-build tests/installer.nix -A zfsroot

@mohe2015

This comment has been minimized.

@mohe2015
Copy link
Contributor Author

# after:
nix build .#nixosConfigurations.minimal.config.system.build.toplevel
nix path-info -S .#nixosConfigurations.minimal.config.system.build.toplevel
2901287440

# before:
nix build .#nixosConfigurations.minimal.config.system.build.toplevel
nix path-info -S .#nixosConfigurations.minimal.config.system.build.toplevel
2894064048

which is only like 6 MB difference. Although this is a much less minimal system which is likely the reason for that. (TODO @mohe2015 test with a more minimal system)

For the test nix-build --option sandbox false nixos/tests/installer.nix -A zfsroot I got an out of memory error:

machine # echo timestamp > s-output
machine # g++ -std=gnu++98 -fno-PIE -c  -DIN_GCC_FRONTEND -g -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -Ic -I../../gcc-10.2.0/gcc -I../../gcc-10.2.0/gcc/c -I../../gcc-10.2.0/gcc/../include -I../../gcc-10.2.0/gcc/../libcpp/include -I/nix/store/zgia3vv0n19dq2qd611hx5wd2p8chlm7-gmp-6.2.1-dev/include -I/nix/store/aj66ai6mcwdvjbcnzzbchq6qrg8m22vw-mpfr-4.1.0-dev/include -I/nix/store/drcgch4nld0f2y4gmfykzqh35w7if4m3-libmpc-1.2.0/include  -I../../gcc-10.2.0/gcc/../libdecnumber -I../../gcc-10.2.0/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-10.2.0/gcc/../libbacktrace -I/nix/store/iv1cb1p17cdz8qp0r84b3him7zvidcif-isl-0.20/include  -o c/c-convert.o -MT c/c-convert.o -MMD -MP -MF c/.deps/c-convert.TPo ../../gcc-10.2.0/gcc/c/c-convert.c
machine # g++ -std=gnu++98 -fno-PIE -c  -DIN_GCC_FRONTEND -g -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -Ic -I../../gcc-10.2.0/gcc -I../../gcc-10.2.0/gcc/c -I../../gcc-10.2.0/gcc/../include -I../../gcc-10.2.0/gcc/../libcpp/include -I/nix/store/zgia3vv0n19dq2qd611hx5wd2p8chlm7-gmp-6.2.1-dev/include -I/nix/store/aj66ai6mcwdvjbcnzzbchq6qrg8m22vw-mpfr-4.1.0-dev/include -I/nix/store/drcgch4nld0f2y4gmfykzqh35w7if4m3-libmpc-1.2.0/include  -I../../gcc-10.2.0/gcc/../libdecnumber -I../../gcc-10.2.0/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-10.2.0/gcc/../libbacktrace -I/nix/store/iv1cb1p17cdz8qp0r84b3him7zvidcif-isl-0.20/include  -o c/c-aux-info.o -MT c/c-aux-info.o -MMD -MP -MF c/.deps/c-aux-info.TPo ../../gcc-10.2.0/gcc/c/c-aux-info.c
machine # g++ -std=gnu++98 -fno-PIE -c  -DIN_GCC_FRONTEND -g -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -Ic -I../../gcc-10.2.0/gcc -I../../gcc-10.2.0/gcc/c -I../../gcc-10.2.0/gcc/../include -I../../gcc-10.2.0/gcc/../libcpp/include -I/nix/store/zgia3vv0n19dq2qd611hx5wd2p8chlm7-gmp-6.2.1-dev/include -I/nix/store/aj66ai6mcwdvjbcnzzbchq6qrg8m22vw-mpfr-4.1.0-dev/include -I/nix/store/drcgch4nld0f2y4gmfykzqh35w7if4m3-libmpc-1.2.0/include  -I../../gcc-10.2.0/gcc/../libdecnumber -I../../gcc-10.2.0/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-10.2.0/gcc/../libbacktrace -I/nix/store/iv1cb1p17cdz8qp0r84b3him7zvidcif-isl-0.20/include  -o c/c-objc-common.o -MT c/c-objc-common.o -MMD -MP -MF c/.deps/c-objc-common.TPo ../../gcc-10.2.0/gcc/c/c-objc-common.c
machine # g++ -std=gnu++98 -fno-PIE -c  -DIN_GCC_FRONTEND -g -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -Ic -I../../gcc-10.2.0/gcc -I../../gcc-10.2.0/gcc/c -I../../gcc-10.2.0/gcc/../include -I../../gcc-10.2.0/gcc/../libcpp/include -I/nix/store/zgia3vv0n19dq2qd611hx5wd2p8chlm7-gmp-6.2.1-dev/include -I/nix/store/aj66ai6mcwdvjbcnzzbchq6qrg8m22vw-mpfr-4.1.0-dev/include -I/nix/store/drcgch4nld0f2y4gmfykzqh35w7if4m3-libmpc-1.2.0/include  -I../../gcc-10.2.0/gcc/../libdecnumber -I../../gcc-10.2.0/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-10.2.0/gcc/../libbacktrace -I/nix/store/iv1cb1p17cdz8qp0r84b3him7zvidcif-isl-0.20/include  -o c/c-parser.o -MT c/c-parser.o -MMD -MP -MF c/.deps/c-parser.TPo ../../gcc-10.2.0/gcc/c/c-parser.c
machine # g++ -std=gnu++98 -fno-PIE -c  -DIN_GCC_FRONTEND -g -DIN_GCC     -fno-exceptions -fno-rtti -fasynchronous-unwind-tables -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual -Wno-format -Wmissing-format-attribute -Woverloaded-virtual -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -fno-common  -DHAVE_CONFIG_H -I. -Ic -I../../gcc-10.2.0/gcc -I../../gcc-10.2.0/gcc/c -I../../gcc-10.2.0/gcc/../include -I../../gcc-10.2.0/gcc/../libcpp/include -I/nix/store/zgia3vv0n19dq2qd611hx5wd2p8chlm7-gmp-6.2.1-dev/include -I/nix/store/aj66ai6mcwdvjbcnzzbchq6qrg8m22vw-mpfr-4.1.0-dev/include -I/nix/store/drcgch4nld0f2y4gmfykzqh35w7if4m3-libmpc-1.2.0/include  -I../../gcc-10.2.0/gcc/../libdecnumber -I../../gcc-10.2.0/gcc/../libdecnumber/bid -I../libdecnumber -I../../gcc-10.2.0/gcc/../libbacktrace -I/nix/store/iv1cb1p17cdz8qp0r84b3him7zvidcif-isl-0.20/include  -o c/c-fold.o -MT c/c-fold.o -MMD -MP -MF c/.deps/c-fold.TPo ../../gcc-10.2.0/gcc/c/c-fold.c
machine # [ 1221.560081] makeinfo invoked oom-killer: gfp_mask=0x100cca(GFP_HIGHUSER_MOVABLE), order=0, oom_score_adj=0
machine # [ 1221.562955] CPU: 7 PID: 5992 Comm: makeinfo Tainted: P           O      5.4.91 #1-NixOS
machine # [ 1221.564144] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014
machine # [ 1221.564144] Call Trace:
machine # [ 1221.564144]  dump_stack+0x64/0x7c
machine # [ 1221.564144]  dump_header+0x4a/0x1df
machine # [ 1221.564144]  out_of_memory.cold+0xa/0x7e
machine # [ 1221.564144]  __alloc_pages_slowpath+0xc70/0xd80
machine # [ 1221.564144]  ? __switch_to_asm+0x40/0x70
machine # [ 1221.564144]  __alloc_pages_nodemask+0x2e8/0x330
machine # [ 1221.564144]  alloc_pages_vma+0x80/0x260
machine # [ 1221.564144]  __read_swap_cache_async+0x15a/0x1f0
machine # [ 1221.564144]  swap_cluster_readahead+0x21c/0x2a0
machine # [ 1221.564144]  ? pagecache_get_page+0x32/0x2b0
machine # [ 1221.564144]  do_swap_page+0x1f5/0x800
machine # [ 1221.564144]  ? ptep_set_access_flags+0x2f/0x40
machine # [ 1221.564144]  ? do_wp_page+0x1bc/0x550
machine # [ 1221.564144]  __handle_mm_fault+0x7fc/0x1170
machine # [ 1221.564144]  ? __switch_to_asm+0x34/0x70
machine # [ 1221.564144]  handle_mm_fault+0xc0/0x1e0
machine # [ 1221.564144]  do_user_addr_fault+0x1c4/0x440
machine # [ 1221.564144]  async_page_fault+0x34/0x40
machine # [ 1221.564144] RIP: 0033:0x7ffff7d5c81a
machine # [ 1221.564144] Code: 00 00 8b 70 f8 48 8b 55 00 48 8d 48 f8 4c 8b 4d 10 89 b4 24 c8 00 00 00 41 0f b6 f4 89 74 24 28 8b b4 24 c8 00 00 00 23 72 18 <4d> 8b 04 f1 4d 85 c0 0f 84 8b fc ff ff 48 85 c9 74 38 48 63 50 fc
machine # [ 1221.564144] RSP: 002b:00007fffffff4160 EFLAGS: 00010202
machine # [ 1221.564144] RAX: 0000000000a80bf0 RBX: 0000000008abcbc0 RCX: 0000000000a80be8
machine # [ 1221.564144] RDX: 0000000008ab4ca0 RSI: 0000000000000004 RDI: 000000002000000c
machine # [ 1221.564144] RBP: 0000000008abace0 R08: 0000000000000000 R09: 0000000008abcbc0
machine # [ 1221.564144] R10: 00000000b5faf976 R11: 0000000008f23b18 R12: 0000000000000400
machine # [ 1221.564144] R13: 000000000151c060 R14: 000000000151c060 R15: 0000000000000000
machine # [ 1221.590569] Mem-Info:
machine # [ 1221.592064] active_anon:113921 inactive_anon:114385 isolated_anon:0
machine # [ 1221.592064]  active_file:377 inactive_file:415 isolated_file:0
machine # [ 1221.592064]  unevictable:0 dirty:0 writeback:0 unstable:0
machine # [ 1221.592064]  slab_reclaimable:7963 slab_unreclaimable:37473
machine # [ 1221.592064]  mapped:765 shmem:7 pagetables:1286 bounce:0
machine # [ 1221.592064]  free:19575 free_pcp:748 free_cma:0
machine # [ 1221.610694] Node 0 active_anon:455684kB inactive_anon:457540kB active_file:680kB inactive_file:1600kB unevictable:0kB isolated(anon):0kB isolated(file):0kB mapped:2092kB dirty:0kB writeback:0kB shmem:28kB shmem_thp: 0kB shmem_pmdmapped: 0kB anon_thp: 0kB writeback_tmp:0kB unstable:0kB all_unreclaimable? no
machine # [ 1221.625248] Node 0 DMA free:6432kB min:472kB low:588kB high:704kB active_anon:3860kB inactive_anon:3420kB active_file:12kB inactive_file:4kB unevictable:0kB writepending:0kB present:15992kB managed:15908kB mlocked:0kB kernel_stack:0kB pagetables:8kB bounce:0kB free_pcp:0kB local_pcp:0kB free_cma:0kB
machine # [ 1221.636690] lowmem_reserve[]: 0 1458 1458 1458 1458
machine # [ 1221.639747] Node 0 DMA32 free:70928kB min:56868kB low:68012kB high:79156kB active_anon:452228kB inactive_anon:453664kB active_file:864kB inactive_file:2112kB unevictable:0kB writepending:0kB present:1556320kB managed:1507792kB mlocked:0kB kernel_stack:4064kB pagetables:5136kB bounce:0kB free_pcp:1564kB local_pcp:12kB free_cma:0kB
machine # [ 1221.653553] lowmem_reserve[]: 0 0 0 0 0
machine # [ 1221.656095] Node 0 DMA: 26*4kB (UME) 23*8kB (UME) 34*16kB (UME) 35*32kB (UME) 10*64kB (UME) 15*128kB (UME) 5*256kB (UME) 1*512kB (E) 0*1024kB 0*2048kB 0*4096kB = 6304kB
machine # [ 1221.664154] Node 0 DMA32: 1819*4kB (UMEH) 1980*8kB (UMEH) 1125*16kB (UMEH) 774*32kB (UMEH) 18*64kB (UMH) 1*128kB (H) 3*256kB (H) 1*512kB (H) 0*1024kB 0*2048kB 0*4096kB = 68444kB
machine # [ 1221.669434] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=1048576kB
machine # [ 1221.675711] Node 0 hugepages_total=0 hugepages_free=0 hugepages_surp=0 hugepages_size=2048kB
machine # [ 1221.680718] 4117 total pagecache pages
machine # [ 1221.683167] 3404 pages in swap cache
machine # [ 1221.686474] Swap cache stats: add 514022, delete 510619, find 75272/131448
machine # [ 1221.689380] Free swap  = 8kB
machine # [ 1221.691576] Total swap = 999420kB
machine # [ 1221.694176] 393078 pages RAM
machine # [ 1221.694957] 0 pages HighMem/MovableOnly
machine # [ 1221.695918] 12153 pages reserved
machine # [ 1221.697239] 0 pages cma reserved
machine # [ 1221.699577] Tasks state (memory values in pages):
machine # [ 1221.701459] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
machine # [ 1221.703919] [    581]     0   581    10047      108    69632       72          -250 systemd-journal
machine # [ 1221.708500] [    591]     0   591     5583        7    61440      408         -1000 systemd-udevd
machine # [ 1221.712235] [    751]     0   751    56161        4    61440      202             0 sh
machine # [ 1221.716411] [    758]     0   758    22980       14    65536      169             0 zed
machine # [ 1221.723344] [    807]     0   807     2428       21    57344      134             0 systemd-logind
machine # [ 1221.728170] [    829]     4   829     1612       82    53248       47          -900 dbus-daemon
machine # [ 1221.731102] [   1107] 64015  1107   249559        0   147456      103             0 nscd
machine # [ 1221.732858] [   1127]     0  1127      795       34    45056       66             0 dhcpcd
machine # [ 1221.735718] [   1200]     0  1200     1120        2    53248       93             0 login
machine # [ 1221.742776] [   1217]     0  1217    55889        2    57344      130             0 nixos-install
machine # [ 1221.748587] [   1225]     0  1225   328820        1  1474560   157908             0 nix-build
machine # [ 1221.754478] [   1269]     0  1269     2194        2    53248      142         -1000 sshd
machine # [ 1221.759494] [   1277]  1000  1277     2801        9    61440      286             0 systemd
machine # [ 1221.764010] [   1279]  1000  1279    42024       37    81920      555             0 (sd-pam)
machine # [ 1221.769450] [   1296]  1000  1296    56441        2    57344      477             0 bash
machine # [ 1221.775147] [   2383] 30001  2383     1165        3    36864      437             0 bash
machine # [ 1221.778865] [  25274] 30001 25274     1201        3    36864      586             0 make
machine # [ 1221.784624] [  25284] 30001 25284      896        3    32768      174             0 bash
machine # [ 1221.789038] [  25296] 30001 25296     1208        3    36864      594             0 make
machine # [ 1221.794234] [  25301] 30001 25301      916        3    32768      196             0 bash
machine # [ 1221.800011] [  25343] 30001 25343     1382        3    36864      745             0 make
machine # [ 1221.806361] [   5583] 30001  5583      938        3    32768      227             0 bash
machine # [ 1221.811120] [   5607] 30001  5607     3863     1873    57344     1390             0 make
machine # [ 1221.815473] [   5987] 30001  5987      824        0    32768      118             0 bash
machine # [ 1221.821665] [   5992] 30001  5992    41097    14735   352256    24311             0 makeinfo
machine # [ 1221.825175] [   6325] 30001  6325      824        0    32768      118             0 bash
machine # [ 1221.831469] [   6326] 30001  6326    44499    17012   380928    25428             0 makeinfo
machine # [ 1221.834477] [   7484] 30001  7484    16562     4187   155648    11060             0 genattrtab
machine # [ 1221.840570] [   7492] 30001  7492      820        3    32768      115             0 bash
machine # [ 1221.843614] [   7494] 30001  7494    84654    69027   704512    14297             0 genautomata
machine # [ 1221.848409] [   7678] 30001  7678     1280        0    36864       60             0 g++
machine # [ 1221.852600] [   7689] 30001  7689    55661    38593   471040     8029             0 cc1plus
machine # [ 1221.857789] [   7694] 30001  7694     1280       48    36864        0             0 g++
machine # [ 1221.860603] [   7703] 30001  7703    51221    42226   438272        0             0 cc1plus
machine # [ 1221.864666] [   7785] 30001  7785     1280       50    36864        0             0 g++
machine # [ 1221.869236] [   7802] 30001  7802    39554    30330   339968        0             0 cc1plus
machine # [ 1221.875993] [   7806] 30001  7806     1280       48    36864        0             0 g++
machine # [ 1221.881875] [   7815] 30001  7815    17137     7668   163840        0             0 cc1plus
machine # [ 1221.887051] Kernel panic - not syncing: Out of memory: compulsory panic_on_oom is enabled
machine # [ 1221.889701] CPU: 7 PID: 5992 Comm: makeinfo Tainted: P           O      5.4.91 #1-NixOS
machine # [ 1221.892749] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014
machine # [ 1221.894971] Call Trace:
machine # [ 1221.902974]  dump_stack+0x64/0x7c
machine # [ 1221.906138]  panic+0x101/0x2c8
machine # [ 1221.908325]  out_of_memory.cold+0x2f/0x7e
machine # [ 1221.908325]  __alloc_pages_slowpath+0xc70/0xd80
machine # [ 1221.908325]  ? __switch_to_asm+0x40/0x70
machine # [ 1221.917400]  __alloc_pages_nodemask+0x2e8/0x330
machine # [ 1221.917400]  alloc_pages_vma+0x80/0x260
machine # [ 1221.922024]  __read_swap_cache_async+0x15a/0x1f0
machine # [ 1221.922024]  swap_cluster_readahead+0x21c/0x2a0
machine # [ 1221.922024]  ? pagecache_get_page+0x32/0x2b0
machine # [ 1221.922024]  do_swap_page+0x1f5/0x800
machine # [ 1221.936746]  ? ptep_set_access_flags+0x2f/0x40
machine # [ 1221.936746]  ? do_wp_page+0x1bc/0x550
machine # [ 1221.936746]  __handle_mm_fault+0x7fc/0x1170
machine # [ 1221.936746]  ? __switch_to_asm+0x34/0x70
machine # [ 1221.936746]  handle_mm_fault+0xc0/0x1e0
machine # [ 1221.936746]  do_user_addr_fault+0x1c4/0x440
machine # [ 1221.936746]  async_page_fault+0x34/0x40
machine # [ 1221.936746] RIP: 0033:0x7ffff7d5c81a
machine # [ 1221.936746] Code: Bad RIP value.
machine # [ 1221.936746] RSP: 002b:00007fffffff4160 EFLAGS: 00010202
machine # [ 1221.966702] RAX: 0000000000a80bf0 RBX: 0000000008abcbc0 RCX: 0000000000a80be8
machine # [ 1221.966702] RDX: 0000000008ab4ca0 RSI: 0000000000000004 RDI: 000000002000000c
machine # [ 1221.972792] RBP: 0000000008abace0 R08: 0000000000000000 R09: 0000000008abcbc0
machine # [ 1221.974486] R10: 00000000b5faf976 R11: 0000000008f23b18 R12: 0000000000000400
machine # [ 1221.977807] R13: 000000000151c060 R14: 000000000151c060 R15: 0000000000000000
machine # [ 1221.981514] ------------[ cut here ]------------
machine # [ 1221.982175] sched: Unexpected reschedule of offline CPU#4!
machine # [ 1221.982513] WARNING: CPU: 5 PID: 0 at arch/x86/kernel/apic/ipi.c:67 native_smp_send_reschedule+0x34/0x40
machine # [ 1221.982513] Modules linked in: af_packet ip6table_nat iptable_nat nf_nat xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c xt_tcpudp cfg80211 ip6t_rpfilter rfkill 8021q ipt_rpfilter ip6table_raw iptable_raw xt_pkttype ppdev edac_core kvm_amd kvm irqbypass ip6table_filter crct10dif_pclmul crc32_pclmul ghash_clmulni_intel ip6_tables aesni_intel crypto_simd evdev cryptd input_leds glue_helper led_class joydev psmouse serio_raw mousedev iptable_filter mac_hid sch_fq_codel bochs_drm drm_vram_helper ttm drm_kms_helper drm fb_sys_fops syscopyarea intel_agp sysfillrect intel_gtt i2c_piix4 sysimgblt loop parport_pc agpgart ata_generic qemu_fw_cfg parport floppy i2c_core pata_acpi button zfs(PO) zunicode(PO) zzstd(O) zlua(O) zcommon(PO) znvpair(PO) zavl(PO) icp(PO) spl(O) tun tap macvlan bridge stp llc ip_tables x_tables autofs4 overlay 9p fscache ext4 crc32c_generic crc16 mbcache hid_generic jbd2 usbhid hid sr_mod cdrom 9pnet_virtio virtio_net 9pnet virtio_blk atkbd net_failover
machine # [ 1221.982513]  libps2 failover crc32c_intel uhci_hcd ehci_hcd ata_piix usbcore libata usb_common scsi_mod i8042 virtio_pci rtc_cmos serio dm_mod virtio_rng rng_core virtio_console virtio_balloon virtio_ring virtio
machine # [ 1221.982513] CPU: 5 PID: 0 Comm: swapper/5 Tainted: P           O      5.4.91 #1-NixOS
machine # [ 1221.982513] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.13.0-48-gd9c812dda519-prebuilt.qemu.org 04/01/2014
machine # [ 1221.982513] RIP: 0010:native_smp_send_reschedule+0x34/0x40
machine # [ 1221.982513] Code: 05 11 51 0c 01 73 15 48 8b 05 28 2f d7 00 be fd 00 00 00 48 8b 40 30 e9 1a 21 9b 00 89 fe 48 c7 c7 38 da 53 9d e8 80 17 6c 00 <0f> 0b c3 66 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 48 8b 05 f4 2e
machine # [ 1221.982513] RSP: 0018:ffffa05cc0180ed0 EFLAGS: 00010086
machine # [ 1221.982513] RAX: 0000000000000000 RBX: ffff94e25db5b640 RCX: 0000000000000006
machine # [ 1221.982513] RDX: 0000000000000007 RSI: 0000000000000086 RDI: ffff94e25db575c0
machine # [ 1221.982513] RBP: 0000000000000000 R08: 00000000000002f4 R09: ffffa05cc0180d60
machine # [ 1221.982513] R10: 0000000000000000 R11: ffffa05cc0180d65 R12: 0000011c7eea44e8
machine # [ 1221.982513] R13: ffffa05cc008be28 R14: ffff94e25db5dc38 R15: ffff94e25db5e080
machine # [ 1221.982513] FS:  0000000000000000(0000) GS:ffff94e25db40000(0000) knlGS:0000000000000000
machine # [ 1221.982513] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
machine # [ 1221.982513] CR2: 000055a238149d28 CR3: 000000005aacc000 CR4: 0000000000340ee0
machine # [ 1221.982513] Call Trace:
machine # [ 1221.982513]  <IRQ>
machine # [ 1221.982513]  update_process_times+0x7f/0x90
machine # [ 1221.982513]  tick_sched_handle+0x34/0x50
machine # [ 1221.982513]  tick_sched_timer+0x51/0xb0
machine # [ 1221.982513]  ? can_stop_idle_tick+0x90/0x90
machine # [ 1221.982513]  __hrtimer_run_queues+0x128/0x2a0
machine # [ 1221.982513]  hrtimer_interrupt+0x10e/0x280
machine # [ 1221.982513]  smp_apic_timer_interrupt+0x6e/0x130
machine # [ 1221.982513]  apic_timer_interrupt+0xf/0x20
machine # [ 1221.982513]  </IRQ>
machine # [ 1221.982513] RIP: 0010:tick_nohz_idle_enter+0x43/0x50
machine # [ 1221.982513] Code: 9c 70 63 48 83 bb b0 00 00 00 00 75 1f 80 4b 4c 01 e8 51 12 ff ff 80 4b 4c 04 48 89 43 78 e8 04 3c fa ff fb 66 0f 1f 44 00 00 <5b> c3 0f 0b eb dd 0f 1f 80 00 00 00 00 0f 1f 44 00 00 53 48 c7 c3
machine # [ 1221.982513] RSP: 0018:ffffa05cc008bed8 EFLAGS: 00000246 ORIG_RAX: ffffffffffffff13
machine # [ 1221.982513] RAX: 0000011c83c2bc8e RBX: ffff94e25db5e080 RCX: 0000011c83c1357a
machine # [ 1221.982513] RDX: 0000000000018714 RSI: 0000011c83c1357a RDI: fffffffffff0d166
machine # [ 1221.982513] RBP: 0000000000000005 R08: 0000011c83c2bc8e R09: 00000001000e1087
machine # [ 1221.982513] R10: 0000000000000000 R11: 0000000000100000 R12: 0000000000000000
machine # [ 1221.982513] R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
machine # [ 1221.982513]  ? tick_nohz_idle_enter+0x3c/0x50
machine # [ 1221.982513]  do_idle+0x3b/0x240
machine # [ 1221.982513]  cpu_startup_entry+0x19/0x20
machine # [ 1221.982513]  start_secondary+0x15f/0x1b0
machine # [ 1221.982513]  secondary_startup_64+0xa4/0xb0
machine # [ 1221.982513] ---[ end trace aa88c89dbe0f01fd ]---
machine # [ 1221.977807] Kernel Offset: 0x1b800000 from 0xffffffff81000000 (relocation range: 0xffffffff80000000-0xffffffffbfffffff)
machine # [ 1221.977807] Rebooting in 1 seconds..

I already set the memory higher (-m qemu parameter in nixos/tests/installer.nix) but this didn't work.

@Mic92
Copy link
Member

Mic92 commented Jan 23, 2021

Right the installer test seems broken.

@Mic92 Mic92 merged commit 38833ce into NixOS:master Jan 23, 2021
@quyse
Copy link
Contributor

quyse commented Mar 14, 2021

I don't know if this is the proper change or if this breaks peoples system.

It seems it is now required to set boot.initrd.supportedFilesystems = ["zfs"], otherwise Grub says "unknown filesystem". Probably boot.loader.grub.zfsSupport = true would also work. At least in 20.09 it was enough to set boot.supportedFilesystems = ["zfs"] (i.e. non-initrd option), as the wiki says https://nixos.wiki/wiki/NixOS_on_ZFS#How_to_use_it .

Not sure if improvements can be easily made here, but detecting automatically if filesystems contain zfs entry would make installation much easier.

@mohe2015 mohe2015 deleted the smaller-system branch March 20, 2021 22:57
mohe2015 added a commit to mohe2015/nixpkgs that referenced this pull request Mar 20, 2021
… grub if they didn't add zfs to boot.initrd.supportedFilesystems

See NixOS#99386
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants