Last night I was about to reimplement my tiny initrd initd in Rust, and start playing with some configuration. Or something along those lines.
We'll see, I'm going to wing it: close my eyes, type, see where it leads.
Discussion
Last night I was about to reimplement my tiny initrd initd in Rust, and start playing with some configuration. Or something along those lines.
We'll see, I'm going to wing it: close my eyes, type, see where it leads.
The hard part about fsck is that I can't just run /sbin/fsck, because I need its output not on stdout / stderr, but both of those on /dev/console.
Hm. Maybe I can... redirect stdout/stderr there from my main()! And then fsck becomes reasonably simple.
Ok, fine. command.stdout(Stdio::from(console)) gets the job done.
Hrm. The rust init causes a panic somewhere. But the !@#!@# console doesn't let me scroll back more than one page.
Disabling kern.dump_on_panic still puts me into the debugger.
I think the hardest part about my mini-initd will be
fsck. Who would have thought it would be fucking hard. It's not like it's in the name.