Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question

closed as too broad by Anthon, slm, Zelda, Martin von Wittich, Karlson Jan 24 '14 at 14:42

There are either too many possible answers, or good answers would be too long for this format. Please add details to narrow the answer set or to isolate an issue that can be answered in a few paragraphs.If this question can be reworded to fit the rules in the help center, please edit the question.

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 Jan 7 '13 at 12:43
up vote 4 down vote accepted

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.

share|improve this answer
Unless you have (U)EFI in which case it's a whole 'nother can of worms ... :-) – kalaracey Jan 20 '13 at 15:48

Not the answer you're looking for? Browse other questions tagged or ask your own question.