grub-bios-setup
Installs GRUB to a BIOS boot partition
TLDR
Set up a device to boot with GRUB
Install even if problems are detected
Install GRUB in a specific directory
SYNOPSIS
grub-bios-setup [OPTION...] DEVICE
PARAMETERS
--directory=DIR
Use DIR as the root directory. Defaults to /boot/grub.
--target=TARGET
Set the installation target. TARGET can be i386-pc (for installing to MBR) or other specific architectures. Defaults to i386-pc.
--recheck
Probe all disk devices again. Useful if device names have changed.
--force
Proceed even if problems are detected.
--skip-fs-probe
Skip probing filesystems, may speed up the setup in some situations
DEVICE
The device where GRUB should be installed (e.g., /dev/sda or /dev/sda1).
DESCRIPTION
The grub-bios-setup command installs the GRand Unified Bootloader (GRUB) boot image to a specified device without using operating system facilities. This is typically done to make a drive bootable.
It writes GRUB's boot code to the Master Boot Record (MBR) or a partition's boot sector and installs the necessary files in the /boot/grub directory.
Important: Running this command incorrectly can render your system unbootable. It's crucial to understand the options and ensure you're targeting the correct device.
The user is expected to know which device is the system drive and/or target drive. Incorrect usage could lead to data loss.
CAVEATS
Installing GRUB to the wrong device can render your system unbootable. Ensure you're targeting the correct drive. Using the --force option should be done with extreme caution. Also, the partition must be formatted with a filesystem that grub-bios-setup can access and read.
EXAMPLE USAGE
To install GRUB to the MBR of the first hard drive (/dev/sda), run:grub-bios-setup /dev/sda
To install to the first partition on the first drive:grub-bios-setup /dev/sda1
TROUBLESHOOTING
If you encounter errors, double-check the target device and ensure that the /boot/grub directory exists and contains the necessary GRUB modules. Consider using the --recheck option if device names might have changed. Consult the GRUB documentation for specific error messages.
HISTORY
grub-bios-setup evolved alongside GRUB as a crucial component for system boot management. It became essential with the rise of BIOS-based systems, offering a low-level method for installing the bootloader to devices. Early versions focused on basic functionality, while later iterations incorporated features for improved error handling and target architecture support. Its development has been closely tied to the evolution of GRUB itself.
SEE ALSO
grub-install(8), grub-mkconfig(8), grub-update(8)