Home > Articles > Operating Systems, Server > Linux/UNIX/Open Source

GNU or Linux?

  • Print
  • + Share This
Like this article? We recommend

Booting the System

Modern GNU/Linux distributions begin the boot process from the GRand Unified Bootloader (GRUB), which is part of the GNU project. (Well, technically, they begin the boot process in the BIOS or other firmware, although this is common to all operating systems that can run on the hardware.) GRUB is not specific to Linux. It can boot many other operating systems, and is the standard way of booting several operating systems on x86, including OpenSolaris and the Xen hypervisor. Even if you're running Xen with a NetBSD domain-0 (no Linux anywhere), you'll still be running GRUB.

GRUB then hands over control to the kernel, which continues initializing the system and configuring drivers. The kernel then passes control to a userland process, traditionally called init on UNIX-like systems. This process is responsible for creating all other processes that run on the system.

On Linux systems, init is a very small program that does little more than run a script. On some distributions it's being replaced by Upstart, a program that's not part of either Linux or GNU, and that has a more complex event-driven model. The scripts run by init or Upstart are sets of commands that are interpreted by the shell.

The POSIX specification contains a description of the minimal functionality of this shell. If you want to write portable shell scripts, you can restrict yourself to this functionality, and you'll end up with scripts that will run on any UNIX-like system.

Most init scripts, however, are not written to be portable. They use extensions provided by the shell found in most Linux distributions—Bash, the GNU shell.

  • + Share This
  • 🔖 Save To Your Account