nixos/systemd/initrd: make systemd mount root as rw if gpt-auto is set
This commit is contained in:
parent
53c8f2940d
commit
e2e43f6ce7
|
@ -392,7 +392,10 @@ in {
|
||||||
|
|
||||||
boot.kernelParams = [
|
boot.kernelParams = [
|
||||||
"root=${config.boot.initrd.systemd.root}"
|
"root=${config.boot.initrd.systemd.root}"
|
||||||
] ++ lib.optional (config.boot.resumeDevice != "") "resume=${config.boot.resumeDevice}";
|
] ++ lib.optional (config.boot.resumeDevice != "") "resume=${config.boot.resumeDevice}"
|
||||||
|
# `systemd` mounts root in initrd as read-only unless "rw" is on the kernel command line.
|
||||||
|
# For NixOS activation to succeed, we need to have root writable in initrd.
|
||||||
|
++ lib.optional (config.boot.initrd.systemd.root == "gpt-auto") "rw";
|
||||||
|
|
||||||
boot.initrd.systemd = {
|
boot.initrd.systemd = {
|
||||||
initrdBin = [pkgs.bash pkgs.coreutils cfg.package.kmod cfg.package];
|
initrdBin = [pkgs.bash pkgs.coreutils cfg.package.kmod cfg.package];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user