Get the App
SLTechnology News&Howtos  ›  Servers  › 

Use the grub-install command of linux to install GRUB on the device

Shulou Source: shulou.com Published: 2022-06-02 12:43:06 11月16日 Update

Xiaobian to share with you the use of linux grub-install command to install GRUB on the device, I hope you read this article after a big harvest, let's discuss it together!

Grub, GRand Unified Bootloader, is a multi-boot loader derived from the PUPA project. The project is dedicated to developing a new boot loader to replace the boot loader now known as GRUB Legacy. The latter is already difficult to maintain, while GRUB rewrites the code from scratch, enabling modularity and enhanced portability. Use the grub-install command to install GRUB on a specified hard disk or partition.

Syntax format: grub-install [parameter] [device]

Common parameters:

Reference Example

Install GRUB into the first sector of the/dev/sda1 partition:

[root@linuxcool ~]# grub-install /dev/sda1

Install GRUB into the main boot sector:

[root@linuxcool ~]# grub-install --no-floppy /dev/sda

Install GRUB and specify the directory as/tmp/boot:

[root@linuxcool ~]# grub-install --root-directory=/tmp/boot --no-floppy /dev/sdb After reading this article, I believe you have a certain understanding of installing GRUB on a device using the grub-install command of Linux. If you want to know more about it, please pay attention to the industry information channel. Thank you for reading!

Tags: Commands equipment parameters articles projects Unification from scratch Code done examples commonly used more formats Modules Catalog knowledge hard disk portability commitment to Industry Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno MariaDB vpn Shulou Tech Info Xiaomi