-4

How does the linux bootup process work? What is the file that is executed by the machine first to initialize all files and folders, like android, android use manifest for initializing?

1
  • 2
    Your attempt at a comparison in this question probably indicates you don't understand the Android boot process either. Android is a modified Linux system, mostly adding layers on top of it. Deep down there is the same boot loader / kernel / userspace layers and boot sequence as a normal *nix system.
    – Caleb
    Commented Jan 7, 2013 at 12:43

1 Answer 1

4

The PC bootup process is a fairly complicated affair.

First, the BIOS goes through several levels of self-tests to make sure its basic hardware and memory are in working order, and gives the user a chance to access its setup screen (and possibly other options such as boot sequence, but those aren't standardized.

Second, it checks its configured boot sequence for the first device to try booting from. This can be a hard drive, a USB boot disk, a network interface, a CD/DVD drive, and so on. If it doesn't manage to boot from the first option in the list, it tries the second, and then the third.

In the case of a disk drive, it looks for information in the first 512 bytes of the drive -- the so-called "boot sector" which contains information as to where to look for the boot loader, which takes the job from there.

In the case of unix/linux, the boot loader has the job of loading the kernel (and optionally the initial ramdisk), and telling it where to look for its root filesystem before standing back and letting the kernel do its thing.

The kernel then goes through its self-tests and diagnostics while it registers any hardware that it has drivers for, then attempts to mount the specified root filesystem and execute /sbin/init

Init then checks its configuration, launches startup programs, configures networks and services, spawns TTYs and basically gets the system ready for use.

Even this is a highly simplified description of the process; I recommend you do some digging via google for more in-depth examining of the PC booting process.

1
  • Unless you have (U)EFI in which case it's a whole 'nother can of worms ... :-)
    – kalaracey
    Commented Jan 20, 2013 at 15:48

Not the answer you're looking for? Browse other questions tagged .