Files
tldr/pages.zh/linux/grub-install.md

16 lines
566 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# grub-install
> 将 GRUB 安装到设备上。
> 更多信息:<https://www.gnu.org/software/grub/manual/grub/html_node/Installing-GRUB-using-grub_002dinstall.html>。
- 在 BIOS 系统上安装 GRUB
`grub-install --target={{i386-pc}} {{path/to/device}}`
- 在 UEFI 系统上安装 GRUB
`grub-install --target={{x86_64-efi}} --efi-directory={{path/to/efi_directory}} --bootloader-id={{GRUB}}`
- 安装 GRUB 并预加载特定模块:
`grub-install --target={{x86_64-efi}} --efi-directory={{path/to/efi_directory}} --modules="{{part_gpt part_msdos}}"`