| 24 Apr 2023 |
@elvishjerricco:matrix.org | oddlama: rd.systemd.unit=rescue.target will boot you into rescue mode in initrd instead of actually booting | 15:16:46 |
@elvishjerricco:matrix.org | as a kernel param, that is | 15:17:00 |
@elvishjerricco:matrix.org | though networking won't be started in rescue mode, and annoyingly network.target is one of those ones that systemctl won't let you manually start | 15:17:37 |
oddlama | that will run instead of switch root, right? | 15:17:40 |
oddlama | So if I want a shell earlier then this doesn't work? | 15:17:44 |
@elvishjerricco:matrix.org | So I guess you might have to add a wants dependency between rescue.target and network.target or something? | 15:18:01 |
oddlama | In reply to @elvishjerricco:matrix.org though networking won't be started in rescue mode, and annoyingly network.target is one of those ones that systemctl won't let you manually start hmm that's unfortunate | 15:18:06 |
@elvishjerricco:matrix.org | In reply to @oddlama:matrix.org that will run instead of switch root, right? initrd will approach rescue.target instead of initrd.target | 15:18:21 |
@elvishjerricco:matrix.org | the earliest possible shell would be rd.systemd.unit=emergency.target, since emergency mode literally only starts a shell by default | 15:19:06 |
oddlama | Maybe by using emergency.target | 15:20:24 |
oddlama | Nvm you beat me to it | 15:20:33 |
oddlama | I guess I could just manually start the things I want to debug from the emergency shell then | 15:21:34 |
@elvishjerricco:matrix.org | yea, rescue or emergency mode in initrd will start very nearly nothing | 15:22:19 |
@elvishjerricco:matrix.org | it won't even try mounting /sysroot and friends because those go under initrd-fs.target instead of local-fs.target | 15:22:42 |
@elvishjerricco:matrix.org | * rescue won't even try mounting /sysroot and friends because those go under initrd-fs.target instead of local-fs.target | 15:22:56 |
@elvishjerricco:matrix.org | but btw a very convenient way to tell it "please just boot now" is systemctl default | 15:23:39 |
oddlama | hmm emergency is so early that my usb keyboard is not ininitialized 🫠| 15:24:34 |
@elvishjerricco:matrix.org | ah, yea that would be a reason to use rescue | 15:24:45 |
@lily:lily.flowers | In reply to @elvishjerricco:matrix.org the earliest possible shell would be rd.systemd.unit=emergency.target, since emergency mode literally only starts a shell by default I've had emergency.target do weird things, but I forget what exactly at the moment. When I want a shell that early I use emergency.service | 15:24:47 |
@elvishjerricco:matrix.org | get your kernel modules loaded | 15:24:48 |
@elvishjerricco:matrix.org | yea emergency mode really isn't meant to be manually targeted. It's really meant to be transitioned too in the event of boot failure | 15:25:34 |
@elvishjerricco:matrix.org | * yea emergency mode really isn't meant to be manually targeted. It's really meant to be transitioned to in the event of boot failure | 15:25:44 |
oddlama | that makes sense | 15:26:10 |
oddlama | is there a wiki page yet to collect some of this stuff? | 15:27:04 |
@elvishjerricco:matrix.org | not that I know of | 15:27:14 |
oddlama | Rescue works fine :) | 15:30:55 |
oddlama | Not sure why my sshd doesn't come up, systemd says it's started and exited, but there are no journal messages about any of it :/ | 15:31:55 |
@elvishjerricco:matrix.org | There's no reason that would come up on its own; you started it manually? | 15:32:48 |
oddlama | I just used boot.initrd.networking.ssh to configure it, and it is seemingly started before my zfs is unlocked | 15:33:44 |
oddlama | the rescue shell comes after unlocking | 15:34:04 |