# Scan for Linux kernels that lack a ".efi" filename extension. This is # useful for better integration with Linux distributions that provide # kernels with EFI stub loaders but that don't give those kernels filenames # that end in ".efi", particularly if the kernels are stored on a # filesystem that the EFI can read. When set to "1", "true", or "on", this # option causes all files in scanned directories with names that begin with # "vmlinuz" or "bzImage" to be included as loaders, even if they lack ".efi" # extensions. Passing this option a "0", "false", or "off" value causes # kernels without ".efi" extensions to NOT be scanned. # Default is "true" -- to scan for kernels without ".efi" extensions. # # 此段为屏蔽扫描所有Linux内核,refind启动项包括了扫描的操作系统内核,其实通过 # 扫描的内核启动操作系统更快,因为会直接跳过Linux系统的grub引导而直接启动对应 # 的Linux系统,但是考虑到有时候需要系统修复什么的,建议还是通过grub引导的菜单 # 启动吧,屏蔽内核检查的指令如下: scan_all_linux_kernels false
在refind.conf文件的最后一行,需要加一行指令,这是涉及到refind的主题美化的方面,指令内容为:
include <相对路径>/theme.config
(相对路径是指你的主题配置文件theme.config在以refind目录为根目录的文件路径)
比如我的theme文件位于refind目录下的themes/rEFInd-minimal处,所以我的指令是:
include themes/rEFInd-minimal/theme.config
至此,关于refind.conf文件的介绍就完毕了,下面是关于theme文件的介绍
首先,看refind文件夹结构(refind文件夹位于EFI分区目录)
主题文件位于theme文件夹:
这是我的主题,就用了这一个,打开:
然后来介绍theme.conf文件,以下是我的文件内容,不长,看中文注释信息就好了:
# Minimal refind theme # Hide user interface elements for personal preference or to increase # security: # banner - the rEFInd title banner (built-in or loaded via "banner") # label - boot option text label in the menu # singleuser - remove the submenu options to boot Mac OS X in single-user # or verbose modes; affects ONLY MacOS X # safemode - remove the submenu option to boot Mac OS X in "safe mode" # hwtest - the submenu option to run Apple's hardware test # arrows - scroll arrows on the OS selection tag line # hints - brief command summary in the menu # editor - the options editor (+, F2, or Insert on boot options menu) # all - all of the above # Default is none of these (all elements active) # hideui singleuser,hints,arrows,label,badges # Set the name of a subdirectory in which icons are stored. Icons must # have the same names they have in the standard directory. The directory # name is specified relative to the main rEFInd binary's directory. If # an icon can't be found in the specified directory, an attempt is made # to load it from the default directory; thus, you can replace just some # icons in your own directory and rely on the default for others. # Default is "icons". # 各种系统的启动图标 icons_dir themes/rEFInd-minimal/icons # Use a custom title banner instead of the rEFInd icon and name. The file # path is relative to the directory where refind.efi is located. The color # in the top left corner of the image is used as the background color # for the menu screens. Currently uncompressed BMP images with color # depths of 24, 8, 4 or 1 bits are supported, as well as PNG images. # 这是启动界面背景图片路径,也是相对路径,且暂时似乎只支持png格式的图片 banner themes/rEFInd-minimal/background.png # Tells rEFInd whether to display banner images pixel-for-pixel (noscale) # or to scale banner images to fill the screen (fillscreen). The former is # the default. # 默认全屏填充 banner_scale fillscreen # Custom images for the selection background. There is a big one (144 x 144) # for the OS icons, and a small one (64 x 64) for the function icons in the # second row. If only a small image is given, that one is also used for # the big icons by stretching it in the middle. If only a big one is given, # the built-in default will be used for the small icons. # # Like the banner option above, these options take a filename of an # uncompressed BMP image file with a color depth of 24, 8, 4, or 1 bits, # or a PNG image. The PNG format is required if you need transparency # support (to let you "see through" to a full-screen banner). # selection_bigthemes/rEFInd-minimal/selection_big.png selection_small themes/rEFInd-minimal/selection_small.png # Which non-bootloader tools to show on the tools line, and in what # order to display them: # shell - the EFI shell (requires external program; see rEFInd # documentation for details) # gptsync - the (dangerous) gptsync.efi utility (requires external # program; see rEFInd documentation for details) # apple_recovery - boots the Apple Recovery HD partition, if present # mok_tool - makes available the Machine Owner Key (MOK) maintenance # tool, MokManager.efi, used on Secure Boot systems # about - an "about this program" option # exit - a tag to exit from rEFInd # shutdown - shuts down the computer (a bug causes this to reboot # EFI systems) # reboot - a tag to reboot the computer # firmware - a tag to reboot the computer into the firmware's # user interface (ignored on older computers) # Default is shell,apple_recovery,mok_tool,about,shutdown,reboot,firmware # showtools shutdown
文件中还有很多杂七杂八的东西,感兴趣的话可以Google一下,官方文档说得也十分详细,再有就是refind主题的下载链接,我放一下,来源于Github,分享只作学习交流之用。GitHub地址
大家可以选择自己感兴趣的主题下载,安装的话,记得在refind.conf文件末尾改路径哦。
以上针对的是对rEFInd比较感兴趣并且动手能力比较强的朋友们的一个介绍,你们完全可以自己去折腾rEFInd的配置,又不动EFI分区的其他系统文件,所以基本无风险,大不了在BIOS中改回原来的引导。
再就是,懒人版!
我自己用的主题以及自己配的rEFind文件:
感兴趣的朋友可以把我的refind配置拿来用,UEFI机器通用。你可以用我的refind.conf文件替换官方的,也可以把我theme文件夹中的主题拿去用,也可以替换你EFI文件夹中的整个refind文件夹。下载链接(提取码: cmyj)
记得解压出里面的refind文件夹,将refind文件夹放入EFI分区即可。而如何放入EFI分区呢,Linux操作系统很简单,直接取得root权限,将refind文件夹移动至boot/efi/EFI即可,命令行操作:
sudo cp -a ****/refind /boot/efi/EFI/
(****代表你的refind文件夹的路径)
Windows下,需要将EFI分区单独搞出来
三、Windows操作如下:
访问EFI分区的操作步骤(点此进入):
进行到这一步,refind的移动就算处理完毕了,最后就是在BIOS中添加rEFInd的引导项,并选为第一引导项,在Windows平台,我通过easyUEFI来进行(搜索查找即可下载)
打开easyUEFI
选择Linux或其他操作系统,描述自己取个名字,用英文吧。目标分区选中ESP分区,我这里是第二个。
点击浏览
点那个小加号,找到refind:
选中refind_x64.efi,过一会儿,点击确定,会发现在最后一行出现你新建的项:
上移,移动到第一个为止,到此,即已完成。以上便是整个教程了,赶快定制你喜欢的启动页面吧(主要是主题,背景也可单独更换)。
广告声明:文内含有的对外跳转链接(包括不限于超链接、二维码、口令等形式),用于传递更多信息,节省甄选时间,结果仅供参考,IT之家所有文章均包含本声明。