← 返回命令列表

Linux command

grub-mkdevicemap 命令

安全

权限或系统影响较大,执行前请核对目标。

常用示例

Generate device map

sudo grub-mkdevicemap

Specify output file

sudo grub-mkdevicemap -m /boot/grub/device.map

Verbose output

sudo grub-mkdevicemap -v

说明

grub-mkdevicemap creates a device map file for GRUB that maps BIOS drive numbers to Linux device names. The device map helps GRUB understand disk ordering. The map is automatically generated but can be customized for special configurations where disk ordering needs to be explicitly controlled.

参数

-m, --device-map _FILE_
Output device map file.
-n, --no-floppy
Skip floppy detection.
-v, --verbose
Verbose mode.
--help
Display help information.

FAQ

What is the grub-mkdevicemap command used for?

grub-mkdevicemap creates a device map file for GRUB that maps BIOS drive numbers to Linux device names. The device map helps GRUB understand disk ordering. The map is automatically generated but can be customized for special configurations where disk ordering needs to be explicitly controlled.

How do I run a basic grub-mkdevicemap example?

Run `sudo grub-mkdevicemap` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -m, --device-map _FILE_ do in grub-mkdevicemap?

Output device map file.