NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
16.59k stars 13.07k forks source link

Digital Ocean image does not build #308404

Open lugeha opened 2 months ago

lugeha commented 2 months ago

Describe the bug

d87c4e1a720f827996c282d0e194850a8903cebe 3f71d1bc02b6100222e440a6ad0571d8e0db4896

Break system.build.digitalOceanImage as boot.loader.grub.device must be defined in make-disk-image.nix

Simply defining boot.loader.grub.device does not work as the entry is then duplicated in boot.loader.grub.devices which then enables boot.loader.grub.mirroredBoots causing the build to fail as well.

Either there is an unintended side effect of the single device being added to devices, or this is by design.

Replacing boot.loader.grub.devices with boot.loader.grub.device has the same effect on the aforementioned commits, but also lets the image be built.

I have verified this in repl, as well as building the target.

https://github.com/lugeha/nixpkgs/commit/1d4f0d18709baa9643a2484d05f9fa7f8f3cf5d9

I can submit it as a PR if this is the desired solution.

alejandro-angulo commented 1 month ago

I think I'm running into this same issue. Here's the output I'm seeing

Booting from ROM...
Probing EDD (edd=off to disable)... oloading kernel modules...
mounting Nix store...
mounting host's temporary directory...
starting stage 2 (/nix/store/hwp2r3d1w6zzsvca7ir4yaw1v8kqxwgk-vm-run-stage2)
tune2fs 1.47.0 (5-Feb-2023)
Setting maximal mount count to -1
Setting interval between checks to 0 seconds
Setting time filesystem last checked to Mon May 27 06:45:15 2024

dirname: missing operand
Try 'dirname --help' for more information.
mkdir: missing operand
Try 'mkdir --help' for more information.
[    2.428712] reboot: Power down

I worked around this by adding the following to my configuration:

boot.loader.grub.devices = lib.mkForce ["/dev/vda"];
boot.loader.grub.device = "/dev/vda";