LinuxCommandLibrary

grub

TLDR

Enter GRUB shell

$ sudo grub
copy
Install GRUB to disk
$ sudo grub-install /dev/sda
copy
Update GRUB configuration
$ sudo update-grub
copy
Generate config file
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
copy
Check GRUB version
$ grub-install --version
copy

SYNOPSIS

grub [options]
grub-install [options] device

DESCRIPTION

GRUB (GRand Unified Bootloader) is the standard bootloader for Linux systems. It loads the kernel and initrd, presenting a boot menu for system selection.
GRUB 2 supports multiple filesystems, LVM, RAID, and encrypted partitions. It provides rescue mode for system recovery and scripting for advanced configurations.
GRUB boots operating systems.

PARAMETERS

--root-directory DIR

Install to alternate root.
--boot-directory DIR
Boot directory location.
--target TARGET
Target platform.
--recheck
Probe devices again.
--removable
Install for removable media.
--help
Display help information.

CAVEATS

Misconfiguration can prevent booting. Keep rescue media available. GRUB 2 differs from legacy GRUB.

HISTORY

GRUB was created as part of the GNU Project. GRUB 2 was released in 2002 as a complete rewrite with enhanced features.

SEE ALSO

Copied to clipboard