1

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

  • 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. – Pratap Dec 20 '12 at 9:31
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, ...

  • I agree with your answer – Pratap 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

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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