Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

During Linux booting how is the contents of grub.conf read since the file system is not mounted yet?

share|improve this question
1  
If 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. –  PratapSingh Dec 20 '12 at 9:31

1 Answer 1

up vote 4 down vote accepted

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

share|improve this answer
    
I agree with your answer –  PratapSingh Dec 20 '12 at 9:29
    
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 5: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 9:20

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.