Results 1 to 3 of 3
Does the MBR call one of these files? grub.conf, lilo.conf, menu.lst. I believe only one of these would be used by the Linux OS. Is the CMOS used before the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-14-2013 #1
- Join Date
- Jun 2011
Boot process details of a Linux server (MBR, GRUB, LILO, VMs)
Does the MBR call one of these files? grub.conf, lilo.conf, menu.lst. I believe only one of these would be used by the Linux OS.
Is the CMOS used before the BIOS during the Linux boot process? A Webopedia article said the CMOS is used second after the BIOS. The article is called "The System Boot Process Explained."
This article also said that the CMOS not the BIOS tells the computer which hard drive to boot from. But when I configure the boot sequence, I thought I've always done it from the BIOS. Does anyone agree or disagree with me? Does anyone think the above link is perfect? It may be, but I have my doubts.
When does the kernel start working during the boot process?
I would like detailed information about the boot process for a Linux server. Can anyone provide me with a paragraph synopsis?
How does the boot process work with a virtual machine? I thought the storage tended to be amoporphous. So the MBR's exact location could change.
- 01-14-2013 #2
- Join Date
- Apr 2009
- I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
Which file is used to locate the boot image is dependent upon the bootloader you have installed - LILO (antique/deprecated), Grub, Grub2, etc. A VM will depend upon the bootloader you used to install the OS image, so it is no different than the bare-metal operating system in effect (after all, it IS a VIRTUAL machine).
The BIOS resides in CMOS usually, or flash memory. In either case, the memory where the BIOS resides is in two parts. One is the basic BIOS functions (api's), and the other are the current BIOS settings. In order to be able to update your BIOS, all parts have to reside in memory that can be written to - either EEPROM or flash or other similar hardware. The BIOS settings (boot order, etc) have to exist in more easily writable memory, so these days that is usually some sort of flash (NAND or NOR) memory.
The standard boot process is simple. When the hardware boots, it executes a standard BIOS API function which will look at the BIOS settings for boot order, take the first available disk in the order provided, and load the first sector (512 bytes) on that device into RAM at a pre-specified address. It will then jump to that address + the current instruction offset, and start executing from there. What is there depends upon the boot loader... FWIW, I last wrote a standard PC boot loader about 20 years ago.
The latest in enhanced BIOS systems have changed this somewhat, but the principal remains.Sometimes, real fast is almost as good as real time.
Just remember, Semper Gumbi - always be flexible!
- 01-15-2013 #3
The BIOS is code. The CMOS RAM is data. The BIOS is code that executes immediately after the CPU comes out of reset. It uses data from the CMOS RAM to decide which drive to boot from, and a lot of other user-configurable stuff. The BIOS code is what produces the configuration screens that allow you to set all of the configuable parameters of the computer. The entries you choose get stored in CMOS RAM.
After doing a bit of setup and testing, the BIOS loads the first sector of data from the boot disk. This is called the MBR. The BIOS puts the MBR into a particular region of real-mode memory, makes a hasty check to see if it looks like a valid bit of code, and then executes the code. In a correctly set up computer, the code will be a bootloader, or at least part of one. The bootloader will know how to load some more of itself, and does so. At this point, different bootloaders (mainly Grub, Lilo, PXE and Isolinux for x86 Linux) use different methods to complete the boot. Eventually, they load a specified kernel into memory, usually from disk but sometimes from a network server, often including a RAM disk root filesystem. They invoke the kernel according to an entry point in the kernel object code, passing a commandline to the kernel. The kernel starts up all of the hardware that it finds and knows about from the drivers that were built into it. The kernel then mounts the root filesystem that was either specified by the bootloader or has built-in, and launches the first userspace program, usually called init. The RAM disk filesystem contains all of the basic necessities to complete the bootstrap. Some Linux software installers will create custom versions of the RAM disk (genrically known as the initrd) so that a generic kernel may be provided with system-specific driver collections according to that which was determined at installation. Customarily, the init process loads numerous processes that complete the detailed configuration of the computer, and finally invoke some system to enable users to login.
--- rod.Stuff happens. Then stays happened.