1.background_image
Load an existing background image. Use tab completion to help complete filename entries!background_image(hd0,1)/usr/share/images/grub/then tab to display a list of all images. Useful command when initially testing splash images.
2.cat
Use to display the current file contents.cat/boot/grub/grub.cfg,cat/etc/fstab
3.help
View all available commands. Typehelpxto get a list of commands beginning with the letter x.helpxxxfor information about the xxx command. This command should be preceded by running "set pager=1", which acts like the terminal's "| more" command, to prevent scrolling past the top of the screen.
4.ls
Used alone, lists all devices known to GRUB 2, such as(hd0) (hd0,1), etc. View available partitions withls. View /boot and /grub directory contents with `ls /boot, ls /boot/grub
5.initrd
Load aninitrd.
6. linux
Load alinuxkernel.
7.loopback
Mount a file as a device. `loopback loop (hd0,2)/iso/my.iso
8.lsmod
Display loaded modules
9.reboot
Reboot the machine
10.rescue
Enter the rescue mode
11.set
Show environmental variables in place. Combined with others, set variables such assetgfxmode=640x480,setcolor_normal=cyan/blackUse the latter command in command line mode to test various menu font colors.
12. vbeinfo
Display available monitor resolutions.
13.load the configuration file
configfile (hdX,Y)/boot/grub/grub.cfg
本文详细介绍了GRUB2中的关键命令,包括如何加载背景图像、显示文件内容、初始化系统等核心操作,对于GRUB2配置与使用提供了深入的指导。
2843

被折叠的 条评论
为什么被折叠?



