1

I've been wondering how a linux pc (e.g. Debian) is restarted.

To an "outsider" a pc seems to be completely shut down just before it is started again; is it so?

I had a look at the source code of reboot command but didn't catch much.

Could someone care to explain?

I assume the BIOS is the one responsible for rebooting the computer, given that BIOS is always on, especially in that second when the computer seems switched off. However, I don't know for sure.

There could be a similar question about any other OS (Windows, macOS and whatnot) but I guess this is not the right forum. Nevertheless, I'd be curious to know whether other OS's handle reboot similarly to Linux.


Edit: My question is specifically about how exactly the transition from shutting down to starting again happens (without pressing a button), which is only (kind of?) mentioned in question How does the system shutdown of a linux kernel work internally? in the following passage of the first answer:

Finally go to rest in some machine-dependent way by calling machine_restart, machine_halt or machine_power_off.

Could someone elaborate at least on that? Thanks.

nikolas
  • 443
  • 2
  • 11
  • 2
    Possible duplicate of [How does the system shutdown of a linux kernel work internally?](https://unix.stackexchange.com/questions/122557/how-does-the-system-shutdown-of-a-linux-kernel-work-internally) – Yaron May 18 '17 at 08:49
  • 1
    Sorry, I searched but couldn't find the topic. I'll read that! – nikolas May 18 '17 at 08:54
  • 2
    http://lxr.linux.no/linux+v3.13.5/drivers/acpi/reboot.c – Mark Plotnick May 18 '17 at 11:03
  • I believe [this question](https://superuser.com/questions/294681/how-does-a-computer-restart-itself) is the closest one to mine and I find it very interesting indeed. I'd like to hear a linux specific answer to it though. – nikolas May 25 '17 at 09:00

0 Answers0