Exercise 2: Why grub-install's Target Differs Between BIOS and UEFI — Possible Solution ==================================================================== Explanation: Per the chapter's own explanation, this difference exists because BIOS and UEFI genuinely write GRUB to disk in two structurally different ways, echoing grub1-5's own material on the two firmware models. On BIOS, grub-install /dev/sdX writes boot.img directly into the MBR's own boot sector on the WHOLE disk device -- there is no filesystem or partition-level concept involved at this step, just raw bytes written to a fixed physical location at the very start of the disk, which is exactly why the command targets the whole device rather than any specific partition. On UEFI, grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=GRUB does something entirely different: it writes a real GRUB EFI binary as an ordinary FILE inside the FAT-formatted EFI System Partition (specified via --efi-directory), and separately registers a new entry in UEFI's own persistent NVRAM boot list (labeled via --bootloader-id) so firmware knows this new bootloader exists and can be selected. This is a filesystem-level operation on a specific partition, plus a separate firmware-registration step -- genuinely nothing like writing raw bytes to a disk's first sector. Because the two mechanisms accomplish "install GRUB" in fundamentally different ways -- raw sector write vs. file-plus-NVRAM-registration -- grub-install needs to be told explicitly which one to perform, which is exactly what the --target flag and its accompanying arguments specify. WHY THIS WORKS AS AN ANSWER ------------------------------ This explains the actual mechanical difference in what each command writes and where (raw MBR bytes on the whole device vs. a real file plus an NVRAM entry), directly tying the syntax difference back to grub1-5's own BIOS-vs-UEFI material rather than treating the two commands as arbitrary syntax variations.