LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Blogs > QueenZ
User Name
Password

Notices

Rate this Entry

Linux Boot Process

Posted 07-19-2010 at 06:21 AM by QueenZ

The beautiful thing about Linux is that you can actually get to know it. I’m writing my own Desktop Environment right now so it should be really great.
  1. First your computer runs whatever it finds on ROM, usually it is your firmware (BIOS/EFI)
  2. BIOS contains the Boot Sector Loader. What this does is it loads the first 512 byte sector (Master Boot Record at address 0000:7C00) into your RAM. It is a very small program that loads the rest of the boot loader. Since it’s small size, it had to be written in assembly.
    Note: boot sector program can also run the kernel directly without loading the second stage of the boot loader.
  3. The Boot Sector Program runs the second stage of the Boot Loader (GRUB/LILO). Boot Loader is at lease twice as big as the boot sector program (the modern boot loaders are even bigger). The boot loader provides you with a menu between different OS’s installed on your computer. It can be a command line interface menu or a graphical menu with animations and background images.
  4. The Boot Loader contains the OS loader which loads the kernel into the memory. The kernel can be passed different arguments which can be done while in the boot loader or in the configuration file of your boot loader. After this, the boot loader give full control to kernel (the main part of the OS).
  5. Once the Boot Loader has given full control to the Operating System, the kernel takes care of your hardware configuration and at the end lunches the “init” program, found in “/sbin/init”.
    Note for geeks: You can give kernel the “init=” parameter to specify a different init program.
  6. Init will then run a bunch of tasks/jobs/programs needed for a normal environment (/etc/init.d). Lastly it will run a Display Manager (DM) like Gnome Display Manager (GDM) or KDE Display Manager (KDM), X Display Manager (XDM).
    Your Display Manager will weather prompt you with login and password or log you in automatically into your Desktop Environment. It also gives you a choice between different desktop environments like GNOME, KDE, LXDE etc.
    Note for geeks: Display Manager will read the contents of ”/usr/share/xsessions” to give you a list of Desktop Environments. Gnome Display Manager will by default read the “~/.dmrc” file.
  7. Once you’re logged into your Desktop Environment it will load the Window Manager and the rest of the desktop as well as all of the startup applications. Now you are ready to start using your computer

Please correct me if I'm wrong.. =)

-Martin
Posted in Uncategorized
Views 6212 Comments 2
« Prev     Main     Next »
Total Comments 2

Comments

  1. Old Comment
    opensource DE? already have some code completed?
    what are the reasons you started writing your own DE but not joined project like xfce in order to improve it? you aren't satisfied by ANY currently available DE?

    step 6 may be finished without DE loading. and you are ready to use your computer there, once you log into console.
    Im running Gentoo Linux with xfce, I always manually do "startxfce4" if I need GUI.
    Posted 07-19-2010 at 06:31 AM by Web31337 Web31337 is offline
  2. Old Comment
    Yes, I'm not hiding my code. Very little code completed, I started writing my own DE because it's kind of a school project that i have to do... not that i don't like any DE's. I just wanted to try and write my own since my teacher suggested it..

    Thanks, you're right, it isn't necessary to run a desktop environment.
    Posted 07-19-2010 at 07:24 AM by QueenZ QueenZ is offline
 

  



All times are GMT -5. The time now is 12:30 AM.

Main Menu
Advertisement

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration