When the GRUB bootloader boots Linux, it pass the name of the root partition (where /sbin/init is) to the kernel through the root= kernel parameter in order for the initrd to be able to mount the real root filesystem later.
When we use the
grub-install tool, we pass as arguments only the block device where the MBR should be installed and the place where the GRUB image and configuration files should be placed, we do not specify the root partirion with what the kernel will be booted.
How exactly GRUB determines the root partition of the system when it's installed? How is that implemented?