Do you have a question? Post it now! No Registration Necessary
Subject
- Posted on
who creates the file system ?
- 12-18-2004
- Uday Mullangi
December 18, 2004, 5:57 am

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
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

Re: who creates the file system ?

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.

Site Timeline
- » GRUB
- — Next thread in » Embedded Linux
-
- » ---Parallel port testing
- — Previous thread in » Embedded Linux
-
- » Crosscompiling for ARM: reloc type R_ARM_ABS32 is not supported for PIC - ...
- — Newest thread in » Embedded Linux
-
- » Re: Re-installed Windows 7 Ultimate (Integrated Edition) also Swap Channel...
- — The site's Newest Thread. Posted in » Electronics Design
-