From the course: Exploring Linux Internals: Advanced Insights and Practical Applications

Unlock this course with a free trial

Join today to access over 25,300 courses taught by industry experts.

Where GRUB is stored

Where GRUB is stored

- So we have just talked about BIOS versus UEFI and the location of GRUB. Well, that's a little bit confusing, so I would like to tell you a bit more about where exactly you can find the GRUB configuration. If you're on a BIOS disc, the first 512 bytes on the disc are the boot sector. And in this boot sector, 446 bytes are used for the GRUB code. That's a GRUB stage one loader. 64 bytes are used for the partition table. And in these 64 bytes you can store four partitions and not more. Two bytes are used for the magic code, and the magic code is just a generic identifier. And the next 32 sectors on this contain core GRUB components such as the core file and the modules that it is using. If you want to see what is going on on BIOS systems, you can use hexadecimal utilities like xxd or hexdump. And I will show you in just a little bit. But first, let's talk about UEFI systems. So on the UEFI system, the UEFI information is on the EFI system partition, and that's the vfat formatted…

Contents