Userland? I monit, init
Tue, 23 Jan 2018 23:58:57 +0000
[ ObTitleCommentary: sorry ]
This week really is not much more than the "there is no progress to report since last week but I am writing anyway just to maintain the weekly schedule" post I threatened last week
"The question is,", said Humpty Dumpty, "which is to be PID 1".
- DO WANT processes restarted when they die
- DO WANT the option for services to be restarted (or some other remedial action taken) when they become unhealthy. For example, the wireless driver in my GL-MT300A periodically gets confused and I would like to automate restarting it. Note that "services" here is used in a quite broad sense that doesn't necessarily mean "processes"
- DO NOT WANT systemd (not because I'm especially anti-systemd, but it does a lot of things that desktops want and I don't know yet that I need all of them because this is not a desktop)
tl;dr I'm playing with the busybox init applet plus Monit run from an
inittab entry. Haven't got very far yet: not had time.
Running the rootfs in ram
You may remember that a few weeks ago I was describing how I thought I ought to be able to use the MTD "phram" driver to download and use a root filesystem without having to write it into flash? For the record, it did work, it was just that the console bug made it impossible to test.
Well, it did work until I switched to the 4.9 kernel, in which the
memmap= parameter has no effect, and even then it carried on
apparently working for a while until I tried running a few more
processes, and then I started getting filesystem corruption. Another
one for the "obvious in hindsight" tally, when I checked the boot
messages. So, I had to backport that code from 4.14
<6>Determined physical RAM map: <6> memory: 04000000 @ 00000000 (usable) <6>User-defined physical RAM map: <6> memory: 04000000 @ 00000000 (usable) <6> memory: 00b00000 @ 01178000 (reserved) <5>Kernel command line: console=ttyATH0 panic=10 oops=panic init=/bin/init phram.phram=rootfs,0x81178000,10Mi root=/dev/mtdblock0 memmap=11M$0x1178000 ath79-wdt.from_boot=n ath79-wdt.timeout=30 ethaddr=90:A2:DA:F9:07:5A machtype=AP121 mem=64M
No time because ...
Because other things. One of them is that I'm moving my shell host from Debian to NixOS [*] and have been having fun with setting up email. Now running nixos-mailserver and fairly happy with it, but more on that subject forthcoming after I've refined my notmuch configuration a bit.
[*] Once upon a time it was running debian stable. Then while I wasn't looking it became oldstable. Then I did a dist-upgrade and that upgraded Puppet to a version that no longer understood my Puppet manifest and then I decided that it was time to start again