| 11 Apr 2022 |
@elvishjerricco:matrix.org | (this was on the latest version of the handover branch, with the udev branch and my zfs thing merged in) | 10:36:14 |
@janne.hess:helsinki-systems.de | Oof | 10:39:24 |
@janne.hess:helsinki-systems.de | Can you order yourself after the nixos activation service? | 10:39:40 |
@elvishjerricco:matrix.org | why would I? | 10:39:53 |
@janne.hess:helsinki-systems.de | So the new root is already prepared | 10:40:37 |
@janne.hess:helsinki-systems.de | And init is properly set | 10:40:55 |
@elvishjerricco:matrix.org | That's not the issue. I don't need the new root prepared. It looks like a unit failing just causes it to get very confused. Like I can see it's trying to go to emergency mode, but then going for switch-root anyway. | 10:42:06 |
@elvishjerricco:matrix.org | I think that since going to emergency mode means using systemctl isolate, it's preventing nixos activation from getting started | 10:42:47 |
@elvishjerricco:matrix.org | Not sure why it tries for emergency mode and then switch root nonetheless... | 10:43:03 |
@elvishjerricco:matrix.org | 🔐 Enter key for tank/bar: ***
[FAILED] Failed to start Import ZFS pool "tank".
See 'systemctl status zfs-import-tank.service' for details.
Mounting /sysroot/bar...
Mounting /sysroot/foo...
[FAILED] Failed to mount /sysroot/bar.
See 'systemctl status sysroot-bar.mount' for details.
[DEPEND] Dependency failed for Local File Systems.
[ OK ] Started Emergency Shell.
[ OK ] Reached target Emergency Mode.
Stopping Dispatch Password Requests to Console...
Starting Create Volatile Files and Directories...
[ OK ] Stopped Dispatch Password Requests to Console.
[FAILED] Failed to mount /sysroot/foo.
See 'systemctl status sysroot-foo.mount' for details.
[ OK ] Finished Create Volatile Files and Directories.
[ OK ] Stopped Dispatch Password …ts to Console Directory Watch.
[ OK ] Reached target Initrd File Systems.
Starting Cleaning Up and Shutting Down Daemons...
[ OK ] Finished Cleaning Up and Shutting Down Daemons.
[ OK ] Stopped target Emergency Mode.
[ OK ] Stopped target Initrd Root Device.
[ OK ] Stopped target Path Units.
[ OK ] Stopped target Slice Units.
[ OK ] Stopped target Socket Units.
[ OK ] Stopped target Swaps.
[ OK ] Stopped target Timer Units.
[ OK ] Stopped Apply Kernel Variables.
[ OK ] Stopped Load Kernel Modules.
[ OK ] Stopped Create Volatile Files and Directories.
[ OK ] Stopped Wait for udev To Complete Device Initialization.
[ OK ] Stopped Coldplug All udev Devices.
Stopping Rule-based Manage…for Device Events and Files...
[ OK ] Stopped Emergency Shell.
[ OK ] Reached target Switch Root.
Starting Switch Root...
[ !! ] Failed to execute /sbin/init
sh-5.1#
| 10:45:02 |
@elvishjerricco:matrix.org | I have this setup to decrypt and mount three datasets | 10:45:30 |
@elvishjerricco:matrix.org | and set them to neededForBoot to put it in stage `1 | 10:45:44 |
@elvishjerricco:matrix.org | * and set them to neededForBoot to put it in stage 1 | 10:45:48 |
@janne.hess:helsinki-systems.de | Ah, this | 10:47:46 |
@elvishjerricco:matrix.org | you've seen this? | 10:48:30 |
@elvishjerricco:matrix.org | I do kinda wonder if we should set it to always start emergency.target if a unit fails | 10:50:01 |
@janne.hess:helsinki-systems.de | In reply to @elvishjerricco:matrix.org you've seen this? Not really | 11:21:27 |
@janne.hess:helsinki-systems.de | I mean not exactly like this | 11:21:37 |
@janne.hess:helsinki-systems.de | Maybe we should switch some WantedBy to RequiredBy? | 11:21:49 |
@elvishjerricco:matrix.org | Maybe. Not sure which ones we'd change. Also, what happens if initrd-switch-root.service can't be started because a required dependency failed? | 11:27:15 |
@elvishjerricco:matrix.org | But if we just want to treat all failures as emergencies, then we can put OnFailure=emergency.target and OnFailureJobMode=isolate in /etc/systemd/system/service.d/fail.conf | 11:28:11 |
@elvishjerricco:matrix.org | (and mount.d and target.d etc..) | 11:29:29 |
@janne.hess:helsinki-systems.de | yeah that seems reasonable enough | 11:38:41 |
@janne.hess:helsinki-systems.de | I now have a working VM test for mdraid, LVM raid, LVM thin pools and LVM vdo 🥳 | 15:19:33 |
@elvishjerricco:matrix.org | Awesome | 15:20:10 |
@janne.hess:helsinki-systems.de | now I only need dm-verity and then the only dm thing left is LUKS | 15:20:43 |
@elvishjerricco:matrix.org | And that should bring us pretty close to feature parity with traditional initrd. I think we'd just have networking and all the fancier LUKS things left to do | 15:24:38 |
@janne.hess:helsinki-systems.de | yeah, with your ZFS code we should be pretty complete for like 90% of the use cases | 15:27:32 |
@janne.hess:helsinki-systems.de | while having lunch I also figured we could disable lvm2 by default 🤷 | 15:27:47 |
@janne.hess:helsinki-systems.de | more options == more good | 15:27:50 |