who creates the file system ?

Hi,

If we use LILO/GRUB as a bootloader and hard disk as a boot device, LILO/GRUB should be present in the MBR location(Assuming i do not have multi boot OS option) and LILO/GRUB code extracts the vmlinux image from /boot directory. This means that there is a filesystem already created. Who does the creation of filesystem on the disk? Will the BIOS create the file system before putting the stage1 of the GRUB bootloader (or) the stage1 of the GRUB bootloader creates the file system?

Thanks Uday

Reply to
Uday Mullangi
Loading thread data ...

OK so far.

not have

LILO/GRUB can be anywhere the BIOS will look for a boot program. Modern BIOS have many options and will search through two or three alternates before giving up here are just a few: 1. USB device - memory stick, FDD, HDD, CDROM, etc. 2. Floppy disk. 3. CDROM - (el torito HDD emulation, FDD emulation, no-emulation). 4. Alternate boot devices on add-in cards.

Or some other directory, but /boot is the customary place for the kernel boot image to be.

Yes.

Uday Mullangi does.

No and No. You have to do it (create the file system). The first stage of GRUB doesn't know anything about file systems, when you install it, the installer saves the block address of stage1_5 which knows about the file system you are using. If you move stage1_5, you have to re-install GRUB.

See "info grub":

GRUB consists of several images: two essential stages, optional stages called "Stage 1.5", and two network boot images. Here is a short overview of them. *Note Internals::, for more details. `stage1' This is an essential image used for booting up GRUB. Usually, this is embedded in an MBR or the boot sector of a partition. Because a PC boot sector is 512 bytes, the size of this image is exactly 512 bytes. All `stage1' must do is to load Stage 2 or Stage 1.5 from a local disk. Because of the size restriction, `stage1' encodes the location of Stage 2 (or Stage 1.5) in a block list format, so it never understand any filesystem structure. `stage2' This is the core image of GRUB. It does everything but booting up itself. Usually, this is put in a filesystem, but that is not required.

LILO works the same way. First stage prints LI on the console second stage prints LO.

Reply to
Craig Bergren

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.