菜鸟笔记
提升您的技术认知

Linux grub命令

阅读 : 1726

Linux 命令大全

grub命令是多重引导程序grub的命令行shell工具。

语法格式

grub [参数]

常用参数:

— -batch 打开批处理模式
— -boot-drive=<驱动器> 指定stage2的引导驱动器
— -config-file<配置文件> 指定stage2的配置文件
— -device-map=<文件> 指定设备的映射文件
— -help 显示帮助信息
— -install-partition=<分区> 指定stage2安装分区
— -no-config-file 不使用配置文件
— -no-pager 不使用内部分页器
— -preset-menu 使用预设菜单
— -probe-second-floppy 检测第二个软盘驱动器
— -read-only 只读模式

参考实例

grub信息损坏,使用命令启动系统:

grub>root (hd0,1)   /* 假设 /dev/hda2 是你的 /boot 所在的分区 */  grub>kernel /boot/vmlinuz-2.6.15-26-386 ro dev=/dev/hda3    /* 假设 /dev/hda3 是你的 / 所在的分区 */  grub>initrd /boot/initrd.img-2.6.15-26-386  grub>boot 

与该功能相关的Linux命令:

Linux 命令大全