0
  • OS: GNU + Linux
  • Boot partition: /dev/sda1

After the MBR makes its decision on which is the active partition (boot partition), it gives control to the Kernel Boot Loader, generally GRUB, to load the kernel image, which is located in /boot/vmlinuz. But here the device sda1 is still not mounted, at this particular step. Also all the GRUB configuration files are in the /boot/grub directory.

I am thinking that to access files, one must first mount that device, which contains the file, to a directory in the root file system. Correct me if I am wrong?

So how will GRUB get its configuration files and the kernel image vmlinuz, without sda1 being mounted?

Greenonline
  • 1,759
  • 7
  • 16
  • 21
Sumanth
  • 1
  • 2
  • Grub knows how to read the filesystem on sda1. You don't need to mount a filesystem to read (or write) it. For example, think of the commands `debugfs` and `xfs_db`. – berndbausch Feb 14 '21 at 15:53
  • That is the old BIOS boot process. Grub has core.img with more code to find / (root) partition in sectors just after MBR. If using newer gpt but old BIOS boot, core.img must be in separate bios_grub partition as sectors after protective MBR with gpt do not exist. New systesm, since 2012 now use UEFI. – oldfred Feb 14 '21 at 16:06
  • Are you asking a practical question (How do I …), or a theoretical question (e.g. How is it possible…)? – ctrl-alt-delor Feb 14 '21 at 17:19
  • I suggest you read https://en.wikipedia.org/wiki/Power-on_self-test , https://en.wikipedia.org/wiki/BIOS , https://en.wikipedia.org/wiki/Master_boot_record , https://en.wikipedia.org/wiki/GUID_Partition_Table , https://en.wikipedia.org/wiki/UEFI . One will have the Answer. Read the others to understand that one. – waltinator Feb 14 '21 at 18:48

0 Answers0