Comments (7)
I just tested again with the same config, and couldn't reproduce the issue. I was doing it from an installed nixos though, not a live USB, which makes me wonder if that was the issue, maybe if something could have been pointing to a path on the USB's store?
I will try to test again from a USB later and report back!
from disko.
@lilyinstarlight any idea?
from disko.
Can you provide the difference in /etc/fstab
? nixos-rebuild build
will produce a result/ link and cat result/etc/fstab
contains the mount configuration.
from disko.
@lilyinstarlight any idea?
Nope, I've no idea. Evaluating that disko.nix locally in a minimal config gives mostly the same fileSystems
config so I don't know how one would be working but not the other
The only differences in the evaluated config really are the inclusion of the @snapshot
subvolume in the disko-based config, the subvol=
options being like subvol=/@
in the disko-based config instead of subvol=@
, and the use of /dev/sdaN
in the disko-based config instead of using by-uuid
None of those differences should matter afaik. In case anyone else notices something I don't, here's the evaluated config JSON from using the snippets provided:
config.fileSystems
{
"/": {
"autoFormat": false,
"autoResize": false,
"depends": [],
"device": "/dev/mapper/nixos",
"encrypted": {
"blkDev": null,
"enable": false,
"keyFile": null,
"label": null
},
"formatOptions": "",
"fsType": "btrfs",
"label": null,
"mountPoint": "/",
"neededForBoot": false,
"noCheck": false,
"options": [
"compress=zstd",
"noatime",
"subvol=/@"
]
},
"/boot": {
"autoFormat": false,
"autoResize": false,
"depends": [],
"device": "/dev/sda1",
"encrypted": {
"blkDev": null,
"enable": false,
"keyFile": null,
"label": null
},
"formatOptions": "",
"fsType": "vfat",
"label": null,
"mountPoint": "/boot",
"neededForBoot": false,
"noCheck": false,
"options": [
"defaults"
]
},
"/home": {
"autoFormat": false,
"autoResize": false,
"depends": [],
"device": "/dev/mapper/nixos",
"encrypted": {
"blkDev": null,
"enable": false,
"keyFile": null,
"label": null
},
"formatOptions": "",
"fsType": "btrfs",
"label": null,
"mountPoint": "/home",
"neededForBoot": false,
"noCheck": false,
"options": [
"compress=zstd",
"noatime",
"subvol=/@home"
]
},
"/nix": {
"autoFormat": false,
"autoResize": false,
"depends": [],
"device": "/dev/mapper/nixos",
"encrypted": {
"blkDev": null,
"enable": false,
"keyFile": null,
"label": null
},
"formatOptions": "",
"fsType": "btrfs",
"label": null,
"mountPoint": "/nix",
"neededForBoot": false,
"noCheck": false,
"options": [
"compress=zstd",
"noatime",
"subvol=/@nix"
]
},
"/snapshots": {
"autoFormat": false,
"autoResize": false,
"depends": [],
"device": "/dev/mapper/nixos",
"encrypted": {
"blkDev": null,
"enable": false,
"keyFile": null,
"label": null
},
"formatOptions": "",
"fsType": "btrfs",
"label": null,
"mountPoint": "/snapshots",
"neededForBoot": false,
"noCheck": false,
"options": [
"compress=zstd",
"noatime",
"subvol=/@snapshots"
]
},
"/swap": {
"autoFormat": false,
"autoResize": false,
"depends": [],
"device": "/dev/mapper/nixos",
"encrypted": {
"blkDev": null,
"enable": false,
"keyFile": null,
"label": null
},
"formatOptions": "",
"fsType": "btrfs",
"label": null,
"mountPoint": "/swap",
"neededForBoot": false,
"noCheck": false,
"options": [
"defaults",
"subvol=/@swap"
]
}
}
config.boot.initrd.luks.devices
{
"nixos": {
"allowDiscards": false,
"bypassWorkqueues": false,
"crypttabExtraOpts": [],
"device": "/dev/sda2",
"fallbackToPassword": false,
"fido2": {
"credential": null,
"credentials": [],
"gracePeriod": 10,
"passwordLess": false
},
"gpgCard": null,
"header": null,
"keyFile": null,
"keyFileOffset": null,
"keyFileSize": null,
"name": "nixos",
"postOpenCommands": "",
"preLVM": true,
"preOpenCommands": "",
"yubikey": null
}
}
from disko.
I have just tested it and it works fine after updating the configuration to the latest disko release and setting .grub.enabledCryptodisk
to true
Although, the btrfs swap subvolume isn't mounted automatically as swap space. After some reading it seems that one should use that subvolume to keep there the swap file. However, it is not clear to me how to make that swapfile mounted on boot, since the etc/fstab
configuration is managed by the disko module.
from disko.
I just set this in my configuration:
swapDevices = [{
device = "/swapfile";
}];
after creating the swapfile with btrfs filesystem mkswapfile -s 50g /swapfile
not sure if we want declarative swapfile creating in disko? probably yes, but not sure how the interface should look like
from disko.
Sorry I didn't report back on this issue for a while - I can confirm what ghostbuster said, which is that the issue seems to have been solved in the meantime, although I'm not quite sure what fixed it. And regarding the swapfile, I did exactly the same thing. Feel free to close!
from disko.
Related Issues (20)
- Using disko to generate raspberry pi sd card images
- Random boot failues due to partition confusion because disko now relies on `by-partlabel` HOT 8
- ZFS Features Support: Dataset property inheritance HOT 2
- Converting an existing system to use disko? HOT 5
- GRUB Mirrored boot entries with disko HOT 2
- zpool create error: one or more vdevs refer to the same device HOT 1
- How to test luks setup with `--vm-test` HOT 5
- device already has a partition, skipping creating zpool zroot HOT 1
- Can't automount ZFS dataset without using mountpoint="legacy" HOT 1
- `disko-install` should error out immediately if it was invoked without `sudo` HOT 1
- [DOC] add demo/example config for subvolumes on btrfs on lvm on luks
- Add docs for upgrade from legacy table to gpt HOT 3
- QUESTION: neededForBoot option HOT 1
- Random Boot failures due to failing to mount /usr/bin HOT 4
- Size range HOT 1
- encrypted swap and hibernation HOT 2
- Generate an .iso unattended install image HOT 17
- typo in the docs?
- how to to pass flake `self` using `specialArgs`? HOT 2
- disko-install: error: infinite recursion encountered HOT 13
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from disko.