]> code.delx.au - refind/blobdiff - docs/refind/configfile.html
Clarified description of "default_selection" in configfile.html.
[refind] / docs / refind / configfile.html
index af2d618c4c5f6c0881dadf2e4865bf33fa3e8ce1..726051ac44971d5c64bac8ddb6644f50f098929c 100644 (file)
@@ -381,8 +381,15 @@ timeout 20
 </tr>
 <tr>
    <td><tt>default_selection</tt></td>
-   <td>a substring of a boot loader's title, or a numeric position; optionally followed by two times in <tt class="variable">HH:MM</tt> format</td>
-   <td>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 <tt>default_selection</tt>, 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 <tt>default_selection</tt>, the newest 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. If you specify a comma-delimited list of names <i><b>in quotation marks,</b></i> rEFInd will search on these in turn until it finds a match. For instance, <tt>default_selection "alpha,beta"</tt> will launch <tt>alpha</tt> if it's available, and <tt>beta</tt> if <tt>alpha</tt> is not available but <tt>beta</tt> is. If the <i>first</i> item in such a list is a plus sign (<tt>+</tt>), that refers to the item that rEFInd launched the last time it ran. You may optionally follow the match string by two times, in 24-hour format, in which case the entry applies only between those two times. For instance, <tt>default_selection Safety 1:30 2:30</tt> boots the entry called <tt>Safety</tt> by default between the hours of 1:30 and 2:30. These times are specified in whatever format the motherboard clock uses (local time or UTC). If the first value is larger than the second, as in <tt>23:00 1:00</tt>, it is interpreted as crossing midnight&mdash;11:00 PM to 1:00 AM in this example. The last <tt>default_selection</tt> setting takes precedence over preceding ones <i>if</i> the time value matches. Thus, you can set a main <tt>default_selection</tt> without a time specification and then set one or more others to override the main setting at specific times. If you do not specify a <tt>default_selection</tt>, rEFInd attempts to boot the previously-booted entry, or the first entry if there's no record of that or if the previously-booted entry can't be found.</td>
+   <td>a substring of a boot loader's title, <tt>+</tt>, or a numeric position; optionally followed by two times in <tt class="variable">HH:MM</tt> format</td>
+   <td>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. This token takes one or three variables. The first variable is a set of one or more identifiers. If you specify more than one or if the identifier contains a space, it must be <i><b>in quotation marks.</b></i> If more than one identifier is present, they must be specified as a comma-separated list, all within a single set of quotation marks. For instance, <tt>default_selection "alpha,beta"</tt> will launch <tt>alpha</tt> if it's available, and <tt>beta</tt> if <tt>alpha</tt> is not available but <tt>beta</tt> is. Each identifier can be any one of three things:
+   <ul>
+   <li>The symbol <tt>+</tt>, which refers to the previously-launched boot entry. rEFInd stores (in NVRAM) the name of a boot entry before launching it, and effectively substitutes that stored string for the <tt>+</tt> in the <tt>default_selection</tt> line the next time rEFInd launches, then matches it as a string, as described next....</li>
+   <li>Any string, which is matched against boot descriptions. Note that rEFInd matches <i>substrings,</i> so you don't need to specify the complete description string, just a unique substring. Thus, <tt>default_selection vmlinuz</tt> matches <tt>vmlinuz</tt>, <tt>boot\vmlinuz-4.8.0-22-generic</tt>, or any other string that includes <tt>vmlinuz</tt>. 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 <tt>default_selection</tt>, the newest loader in that directory will be the default. As a special case, one-character strings are matched against the first character of the description, except for digits.</li>
+   <li>A digit (<tt>1</tt> to <tt>9</tt>), in which case the boot loader at that position in the boot list is launched. For instance, <tt>default_selection 2</tt> makes the second boot entry the default.</li>
+   </ul>
+
+   You may optionally follow the match string by two times, in 24-hour format, in which case the entry applies only between those two times. For instance, <tt>default_selection Safety 1:30 2:30</tt> boots the entry called <tt>Safety</tt> by default between the hours of 1:30 and 2:30. These times are specified in whatever format the motherboard clock uses (local time or UTC). If the first value is larger than the second, as in <tt>23:00 1:00</tt>, it is interpreted as crossing midnight&mdash;11:00 PM to 1:00 AM in this example. The last <tt>default_selection</tt> setting takes precedence over preceding ones <i>if</i> the time value matches. Thus, you can set a main <tt>default_selection</tt> without a time specification and then set one or more others to override the main setting at specific times. If you do not specify a <tt>default_selection</tt>, rEFInd attempts to boot the previously-booted entry, or the first entry if there's no record of that or if the previously-booted entry can't be found.</td>
 </tr>
 <tr>
    <td><tt>enable_and_lock_vmx</tt></td>