News for hackers. Stuff that matters.
Re:Writing a BIOS bootloader for 64-bit mode from scratch by mschuster91 on Sunday July 14, 2024 @08:51AM (#40960667)
That'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.
Re:Writing a BIOS bootloader for 64-bit mode from scratch by Brian_K_White on Sunday July 14, 2024 @09:35AM (#40960876)
None of that exists in single user. When you say init=/bin/foo, then that's it, the only process is /bin/foo.
Re:Writing a BIOS bootloader for 64-bit mode from scratch by ryandrake on Sunday July 14, 2024 @09:43AM (#40960927)
/bin/foo is the initial process. It can fork and/or exec other processes, right?
Re:Writing a BIOS bootloader for 64-bit mode from scratch by Brian_K_White on Sunday July 14, 2024 @12:36PM (#40961847)
Sure 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

Re:Writing a BIOS bootloader for 64-bit mode from scratch by gtirloni on Sunday July 14, 2024 @02:59PM (#40962601)
It'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.
Re:Writing a BIOS bootloader for 64-bit mode from scratch by p_l on Monday July 15, 2024 @08:06AM (#40967090)
As 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.
Re:Writing a BIOS bootloader for 64-bit mode from scratch by ForOldHack on Tuesday July 16, 2024 @10:51AM (#40977175)
You 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.

Re:Writing a BIOS bootloader for 64-bit mode from scratch by p_l on Tuesday July 16, 2024 @03:36PM (#40979560)
DOS 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)