During Linux booting how is the contents of grub.conf read since the file system is not mounted yet?
Asked
Active
Viewed 750 times
1
-
1If I am correct as soon as MBR is loaded it executes first 512 KB of your boot-able disk and Grub has understanding of file system whereas Lilo does not understand file system. Also Grub is in the first partition on the first hard drive, which is (hd0,0) by default until not modified or changed. initrd plays major role for loading basic drivers on the ram while boot up process. Hope this makes some sense. – Pratap Dec 20 '12 at 09:31
1 Answers
4
Grub is able to read from your root file system all by itself. It is in essence a miniature operating system: it has driver code to talk to (some of) your hardware, and it has file system code to understand the layout of your filesystem.
Take a look in /boot/grub. The *.mod files are driver modules: ata.mod for ATA hard drives, ext2.mod for ext2/3 file systems, ...
![](../../users/profiles/352.webp)
Kristof Provost
- 323
- 2
- 5
-
-
I could see the *.mod files for Grub 2 on my ubuntu desktop, but not on Redhat server /boot/grub/ directory. – nitins Dec 21 '12 at 05:30
-
It's possible that the grub modules are in a different location on RedHat, or even that they build grub differently. I don't have access to a RedHat system to check. – Kristof Provost Dec 21 '12 at 09:20