Boot kernel Why do I have to start bootloader first?

Source: Internet
Author: User


There is a reference:

Here is my understanding, based on the above supplement, if there is wrong or need to supplement the place, please correct me.

1, the Linux first design is on the Inter X86, has the BIOS. And bootloader is embedded devices only, part of the function is to replace the BIOS. Complete boot and load of the kernel.
2, based on the above considerations, the operating system at the beginning of the design is based on BIOS guidance and implementation, so the operating system is purely independent. Think of notebooks and desktops    can install the same Windows system, but the BIOS must be different (hardware design is not the same, the BIOS is provided by the motherboard design vendors).    can also be understood on embedded devices.
3, operating system startup is a complex process, relying solely on hardware timing trigger is impossible to complete. Operating systems are generally placed in nonvolatile storage media, such as mechanical hard disk (HDD), Solid State Drive (SSD), Emmc,nand-flash, etc., can also be loaded through the network, provided that the code can drive the corresponding hardware or network operation, that is, the driver ( Sometimes it is necessary to support the corresponding file system read and write). And this part of the work is done by the BIOS or bootloader.
4, there is also a GRUB between the BIOS and the OS, and, to be exact, bootloader is equivalent to Bios+grub.
   As for why grub is needed, my understanding is (I'm not familiar with this):
   (1) The boot of the operating system needs to pass parameters, the BIOS does not, grub can do, bootloader can do.
   (2) disks generally have multiple partitions, and the operating system must not be placed in the first sector (that is, where 0 starts). Where to put it, Grub knows.
        The BIOS starts reading the program from this place 0. So grub is the equivalent of a doorman.
        Startup and Recovery on Windows, you can choose the operating system that is started by default, which means that if you install a dual system, you need to modify grub (to increase the boot program).
        You can then select the operating system that starts by default, or you can set additional parameters.
     

After discussing with colleagues, my colleague made a point of view:

1, in order to better start and the fixed part of the proposed, the kernel is often to move, upgrade failure is very headache things; boot basic do not move, so Uimage upgrade failure is simple, so sometimes need 3-stage startup,
It is also the idea of grub to separate the boot from the change. Third equipment is basically 3-section start, MIPS cn7130 is also, HiSilicon internal also has a own boot, also belongs to 3 section type start.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.