X-Git-Url: https://code.delx.au/refind/blobdiff_plain/6460d1d0d50d82ce40da54a421c7b785ea944809..e366a10e438344bd1331f2de89d177079a91ba76:/docs/refind/linux.html diff --git a/docs/refind/linux.html b/docs/refind/linux.html index 405db63..13cfd7e 100644 --- a/docs/refind/linux.html +++ b/docs/refind/linux.html @@ -8,6 +8,8 @@ + +

The rEFInd Boot Manager:
Methods of Booting Linux

@@ -15,10 +17,10 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

Originally written: 3/19/2012; last Web page update: -11/10/2013, referencing rEFInd 0.7.5

+9/19/2015, referencing rEFInd 0.9.2

-

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!

+

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!

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

Using a Traditional Linux Boot Loader

-

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).

+

I consider ELILO, GRUB Legacy, GRUB 2, and SYSLINUX 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 four 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.

@@ -190,8 +192,8 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

  • Copy the relevant driver file for your filesystem and architecture to the drivers or drivers_arch - subdirectory of the rEFInd installation directory on the ESP. You may - need to create this subdirectory, too.
  • + subdirectory of the rEFInd installation directory on the EFI System + Partition (ESP). You may need to create this subdirectory, too.
  • Create a refind_linux.conf file in your /boot directory. The mkrlconf.sh script that comes with rEFInd @@ -199,9 +201,12 @@ href="mailto:rodsmith@rodsbooks.com">rodsmith@rodsbooks.com

    href="#efistub">later. Starting with version 0.6.12, rEFInd can create minimal boot options from /etc/fstab, if /boot is not a separate partition, so a refind_linux.conf - file may not be strictly necessary. It remains desirable, though, and - is necessary if /boot is on a separate partition or if you - need unusual kernel options to boot your computer.
  • + file may not be strictly necessary. Version 0.9.0 also adds the ability + to identify the root (/) partition via the Discoverable + Partitions Spec, if your disk uses the appropriate type codes. A + refind_linux.conf file remains desirable, though, and is + necessary in some situations. @@ -337,7 +342,9 @@ 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:

    +

    rEFInd 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:

      @@ -353,6 +360,17 @@ offers another possibility.

      rEFInd won't scan for kernels that lack .efi filename extensions. +
    1. If a file's name ends in .efi.signed, any other file with an + otherwise-identical name that lacks this extension is excluded. + This peculiar rule exists because Ubuntu has begun delivering two + copies of every kernel, one with and one without this extension. The + one with the extension is signed with a Secure Boot key; the one + without it is not so signed. Thus, if both files are present, the one + without the key won't boot on a computer with Secure Boot active, and + either will boot if Secure Boot is inactive. Thus, rEFInd excludes the + redundant (unsigned) file in order to help keep the list of boot + options manageable.
    2. +
    3. rEFInd looks for an initial RAM disk in the same directory as the @@ -368,11 +386,8 @@ offers another possibility.

      initial RAM disk is identified, rEFInd passes a suitable initrd= option to the kernel when it boots.
    4. - -
    5. rEFInd looks for a file called refind_linux.conf in the same - directory as the kernel file. This file is a practical requirement for - booting from an auto-detected kernel. It consists of a series of lines, + directory as the kernel file. 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. If @@ -469,15 +484,17 @@ total 17943

      rEFInd sorts boot loader entries within each directory by time stamp, so that the most recent entry comes first. Thus, if you specify a directory name (or a volume label, for loaders stored in a volume's root directory) as the default_selection, rEFInd will make the most recent loader in the directory the default. This can obviate the need to adjust this configuration parameter when you add a new kernel; chances are you want the most recently-added kernel to be the default, and rEFInd makes it so when you set the default_selection in this way. If you don't want the latest kernel to become the default, you can use touch to give the desired kernel (or other boot loader) in the directory a more recent time stamp, or you can set default_selection to a value that uniquely identifies your desired default loader. One caveat you should keep in mind is that the EFI and Windows interpret the hardware clock as local time, whereas Mac OS X uses Coordinated Universal Time (UTC). Linux can work either way. Thus, time stamps for boot loaders can be skewed by several hours depending on the environment in which they were created or last modified.

      +

      Prior to rEFInd 0.9.0, each Linux kernel appeared as a separate entry in the main rEFInd menu. This could make for a very crowded menu if you kept many old kernels and/or if you have several Linux distributions installed. rEFInd 0.9.0 adds a "folding" feature, in which multiple kernel entries in a single directory appear as a single entry in the main menu. Selecting that entry launches the kernel with the most recent time stamp. To launch an older kernel, you must press F2 or Insert; older kernels appear in the submenu shown earlier, but with the kernel filename prepended to the description. If you want to launch an older kernel by default, you can touch it in Linux, as in touch /boot/vmlinuz-3.6.0 to make /boot/vmlinuz-3.6.0 the default. (You must type this command as root or using sudo.) If you want to see all your kernels separated on the main menu, as in earlier versions of rEFInd, you should edit refind.conf: Uncomment the fold_linux_kernels option and set it to false, off, or 0.

      + -

      On the whole, this method of configuration has a lot going for it. For distribution maintainers, if you place your Linux kernel files (with EFI stub support) on the ESP, with suitable filenames, matching initial RAM disk files, and a refind_linux.conf file, then any rEFInd 0.2.3 or later installation should detect your files, even if the user installs another distribution with another rEFInd that takes over from yours. (If the user, or this other rEFInd installation, disables auto-detection, this won't work.)

      +

      On the whole, auto-detecting kernels and passing boot options using refind_linux.conf has a lot going for it. For distribution maintainers, if you place your Linux kernel files (with EFI stub support) on the ESP, with suitable filenames, matching initial RAM disk files, and a refind_linux.conf file, then any rEFInd 0.2.3 or later installation should detect your files, even if the user installs another distribution with another rEFInd that takes over from yours. (If the user, or this other rEFInd installation, disables auto-detection, this won't work.)

      For end users, this method is simpler than maintaining manual configurations in refind.conf (or equivalents for ELILO or GRUB). To install a new kernel, you need only copy it and its initial RAM disk, under suitable names, to a scanned directory on the ESP. There's no need to touch any configuration file, provided you've already set up refind_linux.conf in your kernel's directory. You will, however, have to adjust refind_linux.conf if you make certain changes, such as if your root directory identifier changes.


      -

      copyright © 2012 by Roderick W. Smith

      +

      copyright © 2012–2015 by Roderick W. Smith

      This document is licensed under the terms of the GNU Free Documentation License (FDL), version 1.3.