LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Booting Process (https://www.linuxquestions.org/questions/linux-newbie-8/booting-process-189890/)

muthiahm 06-04-2004 11:59 PM

Booting Process
 
Hi Friends,

I am doing a research work in linux. Now only i have started and i am finding difficult to understand the booting process. Can anyone explain me about that.

Regards
Muthiah.M

Kristijan 06-05-2004 01:33 AM

What exactly don't you understand, can you be more specific?

scott_R 06-05-2004 02:08 AM

www.tldp.org has some excellent information on this. Booting isn't really complicated, but it's pretty arcane once you get past the basics. This is because you are dealing more with hardware than software. As each peice of hardware is different, the boot process varies greatly. The most obvious problem is legacy. Older computers may still exist for a certain operating system, and that operating system needs to be able to adapt to the older boot processes. Therefore, you have a number of truely inefficient operations at boot time, to adapt to this possibility.

Honestly though, the biggest problem in understanding booting is the fact that you have to have excellent knowledge of the bios/processor/motherboard system, and how they interact. You need to know what commands are available, what aren't, what is efficient, tricks and traps, and so on. If you're new to this subject, I wish you luck. This is the kind of thing people spend years learning.

motub 06-05-2004 04:04 AM

The (very veru basic) outline of the boot process is:

1) The machine is powered on and checks for basic hardware. This is called the POST (Power On Self Test) and is controlled by the physical jumper settings on your motherboard and the motherboard's BIOS settings.

2) Once the machine knows what physical hardware (memory, ports, hard drives, removeable drives) it has connected, it begins the search for an OS to load. Since at this point all it knows is hardware, it seeks the first drive partition with a 'bootable' flag (usually the first primary partition of the master device on the primary IDE channel) in order to read the MBR (Master Boot Record). The MBR is a loader which contains pointers, created by a bootloader, to indicate where the bootloader should next look for the bulk of the information as to what OSes exist on the system and where each OSes boot files are located.

3) Once the bootloader has initialized, it then reads its own configuration file and presents a menu if necessary; when a choice is made from this menu, or if no menu is necessary because only one OS esixts on the system, it then loads the boot files referenced in the configuration file for that menu entry, or which are hard-coded ino the botloader itself in the case of Windows.

4) Now control is passed to the kernel of the booting OS, which initializes and detects the available hardware for use by the OS. When the hardware has been detected, any configuration for the individual parts is initialized, usually via a system service or daemon (sound services, USB services, network daemons such as DHCP, Samba file sharing, etc).

5) When that process is complete, it's pretty much time for the OS to get personal, and offer to log a user in, or do so automatically. Once a user is logged in, the personal desktop configuration files are read, and per-user services are started.

6) Finally, your desktop is presented to you in all its glory, and you can get on with computing.

Hope this helps-- any readers who see major gaps or errors in this text, please correct me. I was just testing my understanding of the boot process by typing this, so if my understanding is incomplete, I'm more than happy to learn ;) .

scott_R 06-05-2004 04:46 AM

Okay, you're pretty new at this, and willing to admit it, so that's a good sign. Still, you're glossing over some of the major things that happen as a computer boots. For one thing, there's rarely a clean handover of responsibilities, where one segment ends, and another one begins. Usually, there's some grey area there.

I'm not sure what you're aiming for, but step 4 is the most critical part. Think of how many items are involved. Now, the hardware is almost an abstract point. At stage 4, the user is becoming more critical.

motub 06-05-2004 07:53 AM

Thanks Scott, but of course I glossed over some of the major things that happen and presented it as generally more clearly defined than the process really is... the original question was quite general and non-specific, and I had no intention of writing a book on the subject (not being a software engineer, and not being paid to write a book for any purpose in any case :) ).

But obviously someone "having difficulty understanding the boot process" has to first know what the boot process actually is. So that's what I tried to explain in a simple and understandable way for someone who might not be technically oriented and only had seen the boot process without knowing anything about what was actually happening.

I was mostly wondering if there were any gross errors of fact in the summary I posted.

muthiahm 06-10-2004 03:54 AM

Thank You Friends,


Regards,
Muthiah.M


All times are GMT -5. The time now is 05:08 AM.