From 7b85c1b8c0aca2e8e9443083f628e5493bc64cfa Mon Sep 17 00:00:00 2001 From: srs5694 Date: Tue, 11 Dec 2012 20:47:00 -0500 Subject: [PATCH] installation script improvements; 0.5.1 release --- NEWS.txt | 26 +++++- docs/refind/bootmode.html | 2 +- docs/refind/configfile.html | 15 ++-- docs/refind/drivers.html | 2 +- docs/refind/features.html | 2 +- docs/refind/getting.html | 8 +- docs/refind/index.html | 2 +- docs/refind/installing.html | 14 +++- docs/refind/linux.html | 153 +++++++++++++++++++++++++++++++++--- docs/refind/revisions.html | 6 +- docs/refind/secureboot.html | 2 +- docs/refind/themes.html | 2 +- docs/refind/todo.html | 20 ----- docs/refind/using.html | 2 +- install.sh | 35 +++++++-- libeg/libeg.h | 1 + libeg/screen.c | 15 ++++ mkdistrib | 4 +- refind.conf-sample | 14 ++++ refind/config.c | 39 ++++++--- refind/config.h | 3 +- refind/main.c | 6 +- refind/mok.h | 12 +++ 23 files changed, 308 insertions(+), 77 deletions(-) diff --git a/NEWS.txt b/NEWS.txt index c927700..65b4e72 100644 --- a/NEWS.txt +++ b/NEWS.txt @@ -1,6 +1,30 @@ -0.5.1 (??/??/201?): +0.5.1 (12/11/2012): ------------------- +- Added support for "0" options to "textonly" and "scan_all_linux_kernels" + to reverse the usual meaning of these tokens. This is useful for + including these options in a secondary configuration file called with the + new "include" token to override a setting set in the main file. + +- Added "include" token for refind.conf, to enable including a secondary + configuration file from a primary one. + +- Modified install.sh so that it creates a simple refind_linux.conf file in + /boot, if that file doesn't already exist and if install.sh is run from + Linux. If that directory happens to be on a FAT, HFS+, ext2fs, ext3fs, or + ReiserFS volume, and if the necessary drivers are installed, the result + is that rEFInd will detect the Linux installation with no further + configuration on many systems. (Some may still require tweaking of kernel + options, though; for instance, adding "dolvm" on Gentoo systems that use + LVM.) + +- Added --shim and --localkeys options to install.sh to help simplify setup + on systems with Secure Boot active. + +- Fixed (maybe) bug that caused resolution options to not be displayed on + recent Macs with GOP graphics when specifying an invalid resolution in + refind.conf. + - Fixed bug that caused some programs (EFI shells, in particular) to hang when launching on some systems (DUET, in particular). diff --git a/docs/refind/bootmode.html b/docs/refind/bootmode.html index 15e5218..2ff249b 100644 --- a/docs/refind/bootmode.html +++ b/docs/refind/bootmode.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -12/6/2012, referencing rEFInd 0.5.0

+12/11/2012, referencing rEFInd 0.5.1

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

diff --git a/docs/refind/configfile.html b/docs/refind/configfile.html index dcf1fe1..8f8b2a8 100644 --- a/docs/refind/configfile.html +++ b/docs/refind/configfile.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -12/6/2012, referencing rEFInd 0.5.0

+12/11/2012, referencing rEFInd 0.5.1

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

@@ -175,8 +175,8 @@ timeout 20 textonly - None - rEFInd defaults to a graphical mode; however, if you prefer to do without the flashy graphics, you can run it in text mode by including this option. + None or 0 + rEFInd defaults to a graphical mode; however, if you prefer to do without the flashy graphics, you can run it in text mode by including this option. Passing any option but 0 causes text mode to be used; passing a 0 causes graphics mode to be used. (This could be useful if you want to override a text-mode setting in an included secondary configuration file.) resolution @@ -220,14 +220,19 @@ timeout 20 scan_all_linux_kernels - None - When set, causes rEFInd to add Linux kernels (files with names that begin with vmlinuz or bzImage) to the list of EFI boot loaders, even if they lack .efi filename extensions. The hope is that this will simplify use of rEFInd on distributions that provide kernels with EFI stub loader support but that don't give those kernels names that end in .efi. Of course, the kernels must still be stored on a filesystem that rEFInd can read, and in a directory that it scans. (Drivers and the also_scan_dirs options can help with those issues.) Note that this option can cause unwanted files to be improperly detected and given loader tags, such as older kernels without EFI stub loader support. Versions of rEFInd prior to 0.5.0 left this option commented out in the refind.conf-sample file, but as of version 0.5.0, this option is enabled in the default configuration file. The program default remains to not scan for such kernels, though, so you can delete or uncomment this option to keep them from appearing in your boot menu. + None or 0 + When set, causes rEFInd to add Linux kernels (files with names that begin with vmlinuz or bzImage) to the list of EFI boot loaders, even if they lack .efi filename extensions. The hope is that this will simplify use of rEFInd on distributions that provide kernels with EFI stub loader support but that don't give those kernels names that end in .efi. Of course, the kernels must still be stored on a filesystem that rEFInd can read, and in a directory that it scans. (Drivers and the also_scan_dirs options can help with those issues.) Note that this option can cause unwanted files to be improperly detected and given loader tags, such as older kernels without EFI stub loader support. Versions of rEFInd prior to 0.5.0 left this option commented out in the refind.conf-sample file, but as of version 0.5.0, this option is enabled in the default configuration file. The program default remains to not scan for such kernels, though, so you can delete or uncomment this option to keep them from appearing in your boot menu. Passing any option but 0 causes scans for all kernels to occur; passing a 0 causes these kernels to not be scanned. (This could be useful if you want to override a setting of scan_all_linux_kernels in an included secondary configuration file.) default_selection A substring of a boot loader's title; or a numeric position Sets the default boot OS based on the loader's title, which appears in the main menu beneath the icons when you select the loader. You can enter any substring of the title as the default_selection, so long as it's two or more characters in length. It's best to use a unique substring, since rEFInd stops searching when it finds the first match. Because rEFInd sorts entries within a directory in descending order by file modification time, if you specify a directory (or volume name, for loaders in a partition's root directory) as the default_selection, the most recent loader in that directory will be the default. One-character entries are matched against the first character of the title, except for digits, which refer to the numeric order of the boot loader entries. + + include + filename + Includes the specified file into the current configuration file. Essentially, the included file replaces the include line, so positioning of this token is important if the included file includes options that contradict those in the main file. The included file must reside in the same directory as the rEFInd binary and the main configuration file. This option is valid only in the main configuration file; included files may not include third-tier configuration files. +

Prior to version 0.2.4, rEFInd supported a token called disable, whose function partially overlapped with hideui. Version 0.2.4 merges many of the features of these two tokens into hideui and creates the new showtools option, which provides the remaining functionality in a more flexible way.

diff --git a/docs/refind/drivers.html b/docs/refind/drivers.html index fb5852f..f20140a 100644 --- a/docs/refind/drivers.html +++ b/docs/refind/drivers.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 4/19/2012; last Web page update: -12/6/2012, referencing rEFInd 0.5.0

+12/11/2012, referencing rEFInd 0.5.1

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

diff --git a/docs/refind/features.html b/docs/refind/features.html index b9f41c3..8f12242 100644 --- a/docs/refind/features.html +++ b/docs/refind/features.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -12/6/2012, referencing rEFInd 0.5.0

+12/11/2012, referencing rEFInd 0.5.1

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

diff --git a/docs/refind/getting.html b/docs/refind/getting.html index 3da81ee..0266bb4 100644 --- a/docs/refind/getting.html +++ b/docs/refind/getting.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/14/2012; last Web page update: -12/6/2012, referencing rEFInd 0.5.0

+12/11/2012, referencing rEFInd 0.5.1

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

@@ -98,7 +98,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

In addition to these quirks, you should be aware of some options that install.sh supports to enable you to customize your installation in various ways. The syntax for install.sh is as follows:

diff --git a/docs/refind/linux.html b/docs/refind/linux.html index 77cabc0..5a18814 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -15,7 +15,7 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/19/2012; last Web page update: -12/6/2012, referencing rEFInd 0.5.0

+12/11/2012, referencing rEFInd 0.5.1

I'm a technical writer and consultant specializing in Linux technologies. This Web page is provided free of charge and with no annoying outside ads; however, I did take time to prepare it, and Web hosting does cost money. If you find this Web page useful, please consider making a small donation to help keep this site up and running. Thanks!

@@ -92,17 +92,135 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Windows and Mac OS X both provide relatively simple EFI boot loader programs. Launch them, and if they're launched from the correct locations and have the correct files in place, they'll boot their respective OSes. This makes rEFInd's job easy; it just locates the boot loader program files and runs them.

-

Under Linux, by contrast, things can get complicated. As detailed on my Managing EFI Boot Loaders for Linux page, several different EFI boot loaders for Linux exist, and all of them require configuration. If you're lucky, your distribution will have set up a Linux boot loader in a sensible way, in which case rEFInd should detect it and it will work as easily as a Windows or Mac OS X boot loader. If you're not lucky, though, you may need to configure it further. rEFInd offers options to help out with this task. Specifically, you can use a traditional Linux boot loader or configure an EFI stub loader.

+

Under Linux, by contrast, things can get complicated. As detailed on my Managing EFI Boot Loaders for Linux page, several different EFI boot loaders for Linux exist, and all of them require configuration. If you're lucky, your distribution will have set up a Linux boot loader in a sensible way, in which case rEFInd should detect it and it will work as easily as a Windows or Mac OS X boot loader. If you're not lucky, though, you may need to configure it further. rEFInd offers options to help out with this task. Naturally, rEFInd supports traditional Linux boot loaders. It works even better with the Linux EFI stub loader, so I provide instructions on starting with it. For those interested in manual configuration, I also provide detailed instructions on how the EFI stub support works and how to configure it.

+

Using a Traditional Linux Boot Loader

+
-

I consider ELILO, GRUB Legacy, and GRUB 2 to be traditional Linux boot loaders. These programs all exist as EFI programs that are independent of the Linux kernel, but that can load a kernel and hand off control to it. All three programs have their own configuration files that reside in the same directory as the boot loader itself (or optionally elsewhere, in the case of GRUB 2).

+

I consider ELILO, GRUB Legacy, and GRUB 2 to be traditional Linux boot loaders. These programs all exist independent of the Linux kernel, but they can load a kernel and hand off control to it. All three programs have their own configuration files that reside in the same directory as the boot loader itself (or optionally elsewhere, in the case of GRUB 2).

Ordinarily, rEFInd will detect these traditional boot loaders and provide main menu entries for them. If the boot loader exists in a directory with a name that matches a Linux distribution's icon filename, you'll automatically get a distribution-specific icon to refer to the boot loader.

If you prefer, you can disable automatic scanning and create an entry in refind.conf for your distribution, as described on the Configuring the Boot Manager page. This method is harder to set up but can be preferable if you want to customize your options.

-

Using the EFI Stub Loader

+ +

Using the EFI Stub Loader: A Quick Setup Guide

+
+ +

The EFI stub loader is basic and reliable, but it requires some setup to use it. I describe both a quick test configuration and a long-term setup.

+ + +

Testing the EFI Stub Loader

+
+ +

If you're not sure you want to use the EFI stub loader in the long term, you can perform a fairly quick initial test of it. This procedure assumes that you have access to a 3.3.0 or later Linux kernel with EFI stub support compiled into it. (Fedora 17, Ubuntu 12.10, and probably other distributions ship with such kernels.) Creating this configuration poses no risk to your current boot options, provided you don't accidentally delete existing files. The procedure for a quick test is:

+ +
    + +
  1. Copy your kernel file (vmlinuz-*) and matching initial RAM + disk file (init*) from /boot to a subdirectory of + EFI on your ESP. Your distribution's directory there should + work fine. For instance, typing cp + /boot/vmlinuz-3.6.7-4.fc17.x86_64 + /boot/initramfs-3.6.7-4.fc17.x86_64.img /boot/efi/EFI/redhat might + do the trick on a Fedora system, although you'll probably have to + adjust the version numbers. Note that the filename forms vary from one + distribution to another, so don't worry if yours look different from + these. Be sure that you match up the correct files by version number, + though.
  2. + +
  3. Copy the /boot/refind_linux.conf file to the same directory to + which you copied your kernel. If this file doesn't exist, create it by + running (as root) the mkrlconf.sh script that came + with rEFInd.
  4. + +
  5. Reboot. You should now see a new entry for launching the Linux kernel + that you copied. Try the option. If it works, great. If not, you may + need to adjust your refind_linux.conf file. See the detailed configuration section for a description of + this file's format. If the kernel begins to boot but complains that it + couldn't find its root filesystem, double-check the version numbers on + your kernel and initial RAM disk file, and check the root= + option in refind_linux.conf.
  6. + +
+ +

You can continue to boot your computer with this type of configuration; however, the drawback is that you'll need to copy your kernel whenever it's updated. This can be a hassle. A better way is to configure you system so that the EFI, and therefore rEFInd, can read your Linux /boot directory, where most Linux distributions place their kernels.

+ + +

Configuring a Maintenance-Free Setup

+
+ +

The ideal configuration for use of the EFI stub loader involves giving rEFInd the ability to load your kernels directly from /boot. The main obstacle to doing so is that this directory is frequently on an XFS, JFS, Btrfs, or ext4 filesystem that the EFI can't read, or it's tucked away in an LVM or RAID configuration that the EFI can't read. Fortunately, this problem can be overcome with relatively little fuss. Several variant procedures are possible, but I begin by describing one that will almost always work, although it's got some important caveats (described at the end). If you're currently booting via GRUB 2, it is likely to cease working when you try this, although GRUB should be recoverable by re-installing it. (On the other hand, GRUB will become redundant once this method of booting starts working so you might prefer to remove it completely.) You should perform the following steps as root, or precede each of these commands with sudo:

+ +
    + +
  1. Begin with your ESP mounted at /boot/efi, which is the most + common location. If it's not mounted there, type mount /dev/sda1 /boot/efi to do so (adjusting + /dev/sda1, if necessary), or mount it elsewhere and adjust the + paths in the following procedure as necessary.
  2. + +
  3. Check the size of the ESP by typing df -h + /boot/efi. The ESP must be large enough to hold several Linux + kernels and initial RAM disk files—100MiB at a bare minimum, and + preferably 200–500MiB.
  4. + +
  5. Check your /boot directory to be sure it contains no links or + other files that rely on Unix/Linux-style permissions or ownership. If + it does, don't proceed, or at least research these files further to + determine if you can work around the need for such permissions and + ownership.
  6. + +
  7. Type mv /boot/* /boot/efi. You'll see an + error message about being unable to move /boot/efi into + itself. Ignore this.
  8. + +
  9. Type umount /boot/efi.
  10. + +
  11. Edit /etc/fstab and change the mount point for + /boot/efi to /boot. If the ESP isn't present in + /etc/fstab, you must create an entry for it, with a mount + point of /boot.
  12. + +
  13. Type mount -a to re-mount everything, + including /boot. Check that your normal /boot files + are all present, along with the new /boot/EFI directory, which + holds what used to be /boot/efi/EFI. If something seems to be + missing (other than /boot/efi with a lowercase efi), + then you should try to correct the problem.
  14. + +
  15. If it doesn't already exist, create a file called + /boot/refind_linux.conf and populate it with kernel options, + as described later. If this file doesn't + already exist, the easiest way to create it is to run the + mkrlconf.sh script that comes with rEFInd 0.5.1 and + later.
  16. + +
  17. Check your refind.conf file (presumably in + /boot/EFI/refind) to be sure that the + scan_all_linux_kernels line is uncommented. If it's not, + uncomment that line.
  18. + +
  19. Optionally, type cp + /boot/EFI/refind/icons/os_name.icns /boot/.VolumeIcon.icns + to give loaders in /boot an icon for your distribution.
  20. + +
  21. Reboot to test that this configuration works.
  22. + +
+ +

Once this task is done, updates to your kernel will automatically be stored in the root directory of your ESP, where rEFInd will automatically detect them. Thus, the boot configuration becomes maintenance-free. The procedure as just described has some drawbacks, though. By placing your kernels in the root directory of your ESP, you render them vulnerable to any other OS with which you might be dual-booting. Your ESP must also be large enough to hold all your kernels. If you dual-boot with multiple Linux distributions, they might conceivably overwrite each others' kernels, and distinguishing one from another becomes more difficult.

+ +

For these reasons, a variant of this procedure may be desirable. Most of the steps are similar, but in this variant, you create a separate /boot partition that's independent of the ESP. This partition can use FAT, HFS+, ReiserFS, ext2fs, ext3fs; but if you use any of the last four filesystems (three on Macs), you must install the matching EFI filesystem driver that ships with rEFInd. Creating the filesystem will normally require you to shrink an existing partition by a suitable amount (200–500MiB). Mount your new /boot partition at a temporary location, copy or move the current /boot files into it, unmount it, and add it to /etc/fstab as /boot.

+ + +

If your distribution already uses a separate /boot partition (as Fedora 17 does by default), but if it uses ext4fs or some other unsuitable filesystem, you can back it up, create a fresh FAT, HFS+, ReiserFS, ext2, or ext3 filesystem on it, and restore the original files. If you use a separate non-ESP /boot partition, you'll probably want to continue mounting the ESP at /boot/efi.

+ + +

EFI Stub Loader Support Technical Details

+

The Linux EFI stub loader is a way to turn a Linux kernel into an EFI application. In a sense, the kernel becomes its own boot loader. This approach to booting Linux is very elegant in some ways, but as described on the page to which I just linked, it has its disadvantages, too. One challenge to booting in this way is that modern Linux installations typically require that the kernel be passed a number of options at boot time. These tell the kernel where the Linux root (/) filesystem is, where the initial RAM disk is, and so on. Without these options, Linux won't boot. These options are impossible for a generic boot loader to guess without a little help. It's possible to build a kernel with a default set of options, but this is rather limiting. Thus, rEFInd provides configuration options to help.

@@ -116,9 +234,9 @@ to modify its own rEFInd configuration; or the one that controls rEFInd might set inappropriate options for another distribution. This is a problem that's been a minor annoyance for years under BIOS, since the same potential for poor configuration applies to LILO, GRUB Legacy, and GRUB 2 -on BIOS. The most reliable solution there is to chainload one boot loader -to another. The same solution is possible under EFI, but rEFInd offers -another possibility.

+on BIOS. The most reliable solution under BIOS is to chainload one boot +loader to another. The same solution is possible under EFI, but rEFInd +offers another possibility.

rEFInd 0.2.1 and later supports semi-automatic Linux EFI stub loader detection. This feature works as part of the standard boot loader scan operation, but it extends it as follows:

@@ -131,9 +249,10 @@ another possibility.

with version 0.3.0, if you uncomment the scan_all_linux_kernels option in refind.conf, rEFInd will also scan for kernels without a .efi filename - extension. This option is not the default, though, because it can pick - up old kernels that lack EFI stub loader support and even non-kernel - files. + extension. This option is uncommented by default, but if you comment it + out, delete it, or change it to read scan_all_linux_kernels 0, + rEFInd won't scan for kernels that lack .efi filename + extensions. @@ -157,12 +276,16 @@ another possibility.

booting from an auto-detected kernel. It consists of a series of lines, each of which consists of a label followed by a series of kernel options. The first line sets default options, and subsequent lines set - options that are accessible from the main menu tag's submenu - screen. + options that are accessible from the main menu tag's submenu screen. If + you installed rEFInd 0.5.1 or later with the install.sh + script, that script created a sample refind_linux.conf file, + customized for your computer, in /boot. This file will work + without changes on many installations, but you may need to tweak it for + some. -

The intent of this system is that distribution maintainers can place their kernels, initial RAM disks, and a refind_linux.conf file in their own subdirectory on the ESP. rEFInd will detect their kernels and create one main menu entry for each kernel. Each entry will implement as many options as there are lines in the refind_linux.conf file. In this way, two or more distributions can each maintain their boot loader entries, without being too concerned about who maintains rEFInd as a whole.

+

The intent of this system is that distribution maintainers can place their kernels, initial RAM disks, and a refind_linux.conf file in their own subdirectories on the ESP, on EFI-accessible /boot partitions, or in /boot directories on EFI-accessible Linux root (/) partitions. rEFInd will detect these kernels and create one main menu entry for each kernel. Each entry will implement as many options as there are lines in the refind_linux.conf file. In this way, two or more distributions can each maintain their boot loader entries, without being too concerned about who maintains rEFInd as a whole.

The scan_all_linux_kernels option is intended to help users and distribution maintainers when rEFInd is used in conjunction with a Linux filesystem driver for EFI or when the ESP is mounted as the Linux /boot partition. In these cases, if all the kernels in Linux's /boot directory include EFI stub loader support, rEFInd will automatically detect and use kernels installed in the usual way, such as via an automatic system update. You won't even need to move or rename your kernels. You will need to set up a refind_linux.conf file and you may need to install a driver or set the also_scan_dirs option in refind.conf; but these are one-time requirements. Set up in this way, ongoing maintenance to handle kernel updates drops to zero!

@@ -179,12 +302,14 @@ total 17943

When rEFInd scans this directory, it will find two EFI boot loaders in EFI/ubuntu: grubx64.EFI and bzImage-3.3.0.efi. rEFInd will create two main-menu tags for these two loaders, one of which will launch Ubuntu's standard GRUB and the other of which will launch the 3.3.0 kernel file directly. The refind_linux.conf file contains a list of labels and options:

+
 "Boot with defaults"         "root=/dev/sda3 ro quiet splash vt.handoff=7"
 "Boot into single-user mode" "root=UUID=1cd95082-bce0-494c-a290-d2e642dd82b7 ro single"
 "Boot without graphics"      "root=UUID=1cd95082-bce0-494c-a290-d2e642dd82b7 ro"
 # "Boot alternate install"   "root=/dev/sdb9 ro quiet splash vt.handoff=7"
 
+

Ordinarily, both fields in this file must be enclosed in quotes. If you have to pass an option that includes quotes, you can do so by doubling up on them, as in "root=/dev/sdb9 my_opt=""this is it""", which passes root=/dev/sdb9 my_opt="this is it" to the shell. You can include as much white space as you like between options. You can also place comments in the file, or remove an option by commenting it out with a leading hash mark (#), as in the fourth line in this example.

@@ -197,6 +322,8 @@ total 17943

Note that the first entry shown here takes a name that's set in rEFInd rather than the one specified in the refind_linux.conf file. The remaining names match those specified in the file, though.

+

To assist in initial configuration, rEFInd's install.sh script creates a sample refind_linux.conf file in /boot. This sample file defines two entries that use the default GRUB options defined in /etc/default/grub. The first entry boots normally and the second boots into single-user mode. If you want to create a new file, you can use the mkrlconf.sh script that comes with rEFInd. If you pass it the --force option, it will overwrite the existing /boot/refind_linux.conf file; otherwise it will create the file only if one doesn't already exist.

+

From a user's perspective, the submenus defined in this way work just like submenus defined via the submenuentry options in refind.conf, or like the submenus that rEFInd creates automatically for Mac OS X or ELILO. There are, however, limitations in what you can accomplish with this method: