mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-05-13 06:37:02 +00:00
nixos/make-disk-image: add ability to defer bootloader install until image has been flashed
This commit is contained in:
parent
f9c3076e58
commit
760b2b9048
1 changed files with 4 additions and 1 deletions
|
@ -12,6 +12,9 @@
|
||||||
# directly.
|
# directly.
|
||||||
partitioned ? true
|
partitioned ? true
|
||||||
|
|
||||||
|
# Whether to invoke switch-to-configuration boot during image creation
|
||||||
|
, installBootLoader ? true
|
||||||
|
|
||||||
, # The root file system type.
|
, # The root file system type.
|
||||||
fsType ? "ext4"
|
fsType ? "ext4"
|
||||||
|
|
||||||
|
@ -108,7 +111,7 @@ pkgs.vmTools.runInLinuxVM (
|
||||||
# Generate the GRUB menu.
|
# Generate the GRUB menu.
|
||||||
ln -s vda /dev/xvda
|
ln -s vda /dev/xvda
|
||||||
ln -s vda /dev/sda
|
ln -s vda /dev/sda
|
||||||
chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot
|
${optionalString installBootLoader "chroot /mnt ${config.system.build.toplevel}/bin/switch-to-configuration boot"}
|
||||||
|
|
||||||
umount /mnt/proc /mnt/dev /mnt/sys
|
umount /mnt/proc /mnt/dev /mnt/sys
|
||||||
umount /mnt
|
umount /mnt
|
||||||
|
|
Loading…
Add table
Reference in a new issue