当前位置:网站首页>grub 命令使用
grub 命令使用
2022-08-02 14:16:00 【freeabc】
命令列表
ubuntu 的 iso 盘内一般有 command.lst 这个文件,里面是 grub 支持的命令
加载字体 ( 方便中文显示 )
grub> loadfont $prefix/fonts/unicode.pf2
if loadfont $font ; then
insmod gettext
fi
列出所有设备 ( SATA硬盘是用sda表示的,而IDE硬盘则是用hda表示 )
grub> ls
grub> ls -l
grub> lsmod
grub> lsfonts
现在不分 SATA 和 IDE 了,统一用 hd 表示
指定 boot 所在分区 ( root指令来指定/boot所在的分区 )
grub> root (hd0, 0)
加载模块
grub> insmod all_video
grub> insmod part_gpt
grub> insmod gzio
查询分辨率
grub> videoinfo
设置分辨率( 支持多分辨率 )
grub> set gfxmode=<分辨率>
auto, width x height, width x height x depth
可以指定一组由逗号或分号分隔的模式以供逐一尝试:每个模式的格式必须是:'auto'(自动检测),'宽x高','宽x高x色深'之一,
并且只能使用VBE标准指定的模式[640x480,800x600,1024x768,1280x1024]x[16,24,32]。可以在GRUB SHELL中使用"videoinfo"命令列出当前所有可用模式。默认值是'auto'。
设置输出终端( 支持多个,空格分开 )
grub> terminal_output xxx yyy zzz
console PC BIOS及EFI控制台
serial 串行终端
gfxterm 图形模式输出
ofconsole 开放固件控制台
vga_text VGA文本输出,主要用在Coreboot
视频模式( 明确设定,内核参数设置可能无效 )
grub> set gfxpayload=keep
text 普通文本模式,不能用于UEFI平台
keep 继承"gfxmode"的值
auto 自动检测
分辨率 width x height, width x height x depth
加载镜像 & 文件系统 & 启动
grub> linux /install/vmlinuz file=/cdrom/preseed/ubuntu.seed nomodeset console=tty0
/install/vmlinuz 光盘上对应的文件
/cdrom/preseed/ubuntu.seed 对应的配置文件
加载文件系统并启动安装系统
grub> initrd /install/initrd.gz
grub> boot
边栏推荐
- Technical Selection of Message Queuing
- Oauth2.0 security (take WeChat authorized login as an example)
- hybrid 实现同网段但不同vlan之间通讯
- 分布式一致性协议-Paxos
- 【进程间通信】:管道通信/有名/无名
- Qt | 显示网络图片 QNetworkAccessManager
- Oauth2.0 补充
- Evaluate multipath BBR congestion control on ns3
- Class template/assignment operations and add operations
- 深入理解负载均衡
猜你喜欢
随机推荐
光导布局设计工具
华为单臂路由配置,实现不同vlan之间的通信
【软件测试】性能测试理论
C语言函数调用过程-汇编分析
Oauth2.0 认证服务器搭建
change the available bandwidth of tcp flow dynamically in mininet
基类和派生类的关系【继承】/多态和虚函数/【继承和多态】抽象类和简单工厂
【数组】查表法(闰年)
SQL在MySQL中是如何执行的
OpenPose command line
虚拟机使用的是此版本 VMware Workstation 不支持的硬件版本。模块“Upgrade”启动失败。未能启动虚拟机。
VMware 安装openwrt
Priority table and Ascll table
How does ns3 solve cross reference issue
【软件测试】基础篇
软件测试之WEB自动化
【软件测试】禅道的简要介绍
创建系统还原点及恢复
抽象队列同步器AQS应用Lock详解
How to tick the word box?









