disko | 365 Members | |
| disko - declarative disk partitioning - https://github.com/nix-community/disko | 95 Servers |
| Sender | Message | Time |
|---|---|---|
| 27 Apr 2025 | ||
| Copied from #Nix / NixOS : I’m trying to set up LUKS–style Btrfs full disk encryption on my older BIOS desktop with a layout generated from disko. I try to install it, but I get an error that says installation of GRUB on /dev/sda failed: No such file or directory.The command I used: sudo nix --extra-experimental-features nix-command --extra-experimental-features flakes run 'github:nix-community/disko/latest#disko-install' -- --flake '/etc/nixos#koolthing' --disk main /dev/sdaThe relevant NixOS configuration: The entire disko configuration in its flake: | 08:29:02 | |
| I’m pretty sure /dev/sda was listed in lsblk hmm I can check a little later | 08:30:41 | |
Which disk devices do you have? Usually they match /dev/sd* or /dev/nvme*. | 08:31:19 | |
| I have a 465.8 GB SSD showing up as /dev/sda, and it has a BIOS partition /dev/sda1, and a root partition that doesn’t take up the whole drive, just 300 GB | 08:55:18 | |
You do have device = "/dev/vdb"; in your configuration though. Not sure how that interacts with the CLI. | 08:56:50 | |
Why do I have to specify--disk NAME PATH when those are already in the configuration? | 08:57:49 | |
* Why do I have to specify--disk NAME DEVICE when those are already in the configuration? | 08:57:57 | |
* Why do I have to specify --disk NAME DEVICE when those are already in the configuration? | 08:58:03 | |
| Oh okay, I’ll take a look at that | 08:58:56 | |
| Alright I fixed that in the disko configuration, but I’m still getting the error | 09:04:36 | |
| Probably a good start though | 09:04:41 | |
| I’ll see if I can mess with the GRUB configuration | 09:05:02 | |
I doubt nodev will work | 09:05:50 | |
| Yeah, same thing | 09:07:55 | |
Got it to go through!boot.loader.grub.enableCryptodisk = true | 09:15:19 | |
| Now I probably just have to load a kernel module | 09:18:23 | |
| 14:15:25 | ||
| 14:43:05 | ||
| Does it make sense to add additional
Will this work correctly? | 14:44:29 | |
| To clarify the filesystems I want to add lives on a different block device from disko's main disk. | 14:53:15 | |
| Why even bother adding them to disko at all? | 14:56:36 | |
from here: https://nixos.wiki/wiki/Bootloader | 14:58:39 | |
| you need boot.loader.grub.device = "nodev"; when you have uefi+grub | 14:58:55 | |
I'm not adding them to disko, but directly to NixOS's fileSystems option | 15:02:36 | |
| Like, I have two devices, one for my OS and the other is just for my old data storage. I want disko to format and manage only the OS device and let NixOS normally mount the data storage device. | 15:04:10 | |
| Hi ! So i'm trying to use disko to generate both a vm image and a raw image. It works, but the thing is I want to put secrets on some ext4 partition mounted over /etc/secrets. For the raw image, no problem. | 16:19:51 | |
| For the VM image, I use virtualisation.vmVariantWithDisko.sharedDirectories to avoid putting secrets into the nix store (it works nicely with a classical vm) | 16:20:29 | |
| But with disko, i'm getting some error :
I believe this is because the disko vm image actually respects my partitions formats, but that's a bit of a problem for my specific usecase. I can remove the /etc/secrets partition definition in disko, and it works, but do I have any other option ? | 16:21:57 | |
| I am a little lost trying to get disko working in this setup https://github.com/tcurdt/nixos-hetzner/blob/main/install-nixos.sh
| 17:52:49 | |
| That's when I use v1.9.0 ... latest gives a different error | 17:53:12 | |