OS learning note two (start-up and partitioning of x86)

zhaozj2021-02-16  48

This is also a translated article, where is http://www.nondot.org/sabre/os/files/booting/x86bootstrapping.html worth noting: The following NetBSD may have been outdated, because probably in NetBSD When the -1.3, it has been modified to be loaded with a block-list (standing one night: http://www.douzhe.com/project/fbsd2/7.htm) Explain here: start a computer The process of loading the operating system is often called "bootstrap process" or simply called "booting".

) And separate library files (libsa), and complete settings by additional program (InstallBoot). Preface: This article will try our best to tell the partitions, startup sequences, and procedures for these management above the Intel 80x86 platform. Maybe it is possible The example begins to explain the simplest way to explain the partition and start order, and appropriately add some complicated things appropriately. We will start from a single operation system and will gradually introduce complex examples. Author The damage caused by the article does not bear any responsibility, because the author's purpose is just to provide a reference. I am trying to write a unified series of documents, read it is like your own adventure, because you can see how the computer is found Its target partition. Please tell you about this idea. I may prevent boring will continue to provide common examples in the article. Although I think I should write these in front like normal people, but here It is indeed a FAQ. At the same time, this will also lead to a very bad article structure. Procedure of the processor: The INTEL X86 series starts from the hardware RESET, initializing all Cache, Register, and Buffer set the value to The value required. Soon to real mode. EIP is set to 0000FFF0H, and the CS points to the basement fff0000h as the segment selector. Because the execution of the program is started by fffffff0h (CS: EIP) ---- 即 物 物存 (EPROM ) Top 60bytes. This EPROM is usually used by low-end addresses, but will be re-mapped to high-end addresses (such as Intel 430hx) by the system. It is worth noting that the corresponding sub-address here is Relationships are different from the corresponding relationships in the following programming. Typically, this EPROM in the PC will set up the IDT below the real mode and jump to the BIOS to execute. Single operating system, single disk: the easiest configuration is Single operating system below single disk environment, for example, you may have only one netbsd on your unique SCSI disk (do you use not SCSI? Startup step: 1.BIOS loader generates a 0x19 interrupt, This interrupt is usually loaded with the first sector of the floppy drive or the hard drive (CHS 0: 0: 1 address) to 0000: 7C00. In this example, the first sector is the primary Bootstrap Loader BIOS checks if the last two BYTE of this sector is AA55H (standing for one night: See how to learn notes), if not, you may get a BIOS-related information (such as non-departmental dish or non-starting disc ) Or the system will be suspended. 2. 2nd Boo One of the main tasks of TSTrap Loader is to load the second-level Bootstrap Loader. The first bootstrap loader's code is in / usr / mdec / ?? Boot, here is in / usr / mdec / sdboot. This is the code inside a directory. Generated, here is / sys / arch / i386 / boot /. First Bootstrap Loader Check the first sector of the disk and see what is called a hard partition table. It will check a partition system The SYSTEM ID of the hard disk partition table is 165 which will read the first to the 14th sector of this NetBSD hard disk partition. Here, it will read 0: 0: 1 to 0: 0: 14. It These data (including itself and secondary Bootstrap Loader) are read together for 0000: 1000h (FreeBSD and Mach will read higher address segments). Select here because the bottom of 4K is used to make BIOS temporary temporary storage Region (Scratch Area). If there is no secondstrap loader, you may see the following error message returned by NetBSD: "There is no bonced partition" or "read error". If everything is normal, the execution will jump to just now Loading the code location - i.e. 2 Bootstrap Loader.3.NetBSD's second-level Bootstrap Loader can be identified by the prompt provided by itself. It is implemented by / usr / mdec / ?? Boot, here is / USR / MDEC / SDBOOT typical prompts are as follows: >>

转载请注明原文地址:https://www.9cbs.com/read-19246.html

New Post(0)