4 ms·
Linux in single user mode
by trueismywork 2y ago
Linux in single user mode
- mschuster91 2y agoThat's still multi-process though, there's an awful lot of background tasks running in pretty much every non-fossil kernel version, not to mention userspace daemons (udev, dbus, dhcp) without which most normal userspace stuff doesn't even work.
- Brian_K_White 2y agoNone of that exists in single user. When you say init=/bin/foo, then that's it, the only process is /bin/foo.
- ryandrake 2y ago/bin/foo is the initial process. It can fork and/or exec other processes, right?
- Brian_K_White 2y agoSure the facility to fork still exists. So what? Observing that the kernel still provides fork() is like observing that the cpu still provides JMP. It won't fork random processes you don't explicitly tell it to. I thought it was obvious that if you don't want unsolicited processes, then don't specify /bin/init as /bin/foo. The practical example is /bin/sh, but it could be any other executable. Up to you to specify a binary that does what you want, and doesn't require a bunch of other processes like gdbus to function itself. init=/bin/sh is more or less like ms-dos loading command.com
- gtirloni 2y agoIt's obvious but many people here seem to be confusing the Linux kernel with kernel+systemd and complaining Linux has many processes like it's not customizable.
- p_l 2y agoAs much as DOS allowed multiple processes, even if only one was executed at the time and there was no multitasking outside of ill-fated MS-DOS 4.0 and various Concurrent DOS products.
- ForOldHack 2y agoYou were not there. Multitasking? Xenix. Multitasking DOS? DOS Merge. Pre-emptive multitasking? AmigaOS. DOS 4.0M was task switching. OS/2 2.0? I'm being extremely facetious. Give me a date, and I will tell you what existed. Nothing mainstream existed until windows 3.1. at least on x86/32 There also was OLEC on windows 2, that did run in real mode, but the only thing that took advantage of it was the demos, and samples: no commercial product used it.
- p_l 2y agoDOS still allowed you to run child processes, and TSRs were a thing that sometimes caused funny behaviours. My point was that running your own chosen process as PID1 (or, to be more practical, a minimal init or maybe system v init with single entry for process to run) matches the requirements of running small set of processes just as well as DOS (if you need more, it's IMO more worthwhile to start getting a build of some RTOS for your platform)