|
1 | 1 | --- |
2 | | -title: "Configure GRUB for Better User Experience" |
| 2 | +title: "Configure GRUB" |
3 | 3 | weight: 337 |
4 | 4 | --- |
5 | 5 |
|
6 | | -A few additional configuration steps can be taken to improve the user |
7 | | -experience of unlocking the LUKS partition from GRUB. |
8 | | - |
9 | 6 | ## Update GRUB Settings for LUKS |
10 | 7 |
|
11 | 8 | With the default configuration, GRUB disregards operating systems in LUKS |
@@ -54,54 +51,57 @@ with the actual block device for the ESP. |
54 | 51 | # mount /dev/sda1 "${ESP}" |
55 | 52 | ``` |
56 | 53 |
|
57 | | -## Improve GRUB's Passphrase Prompt |
| 54 | +## Optional: Delay GRUB's Passphrase Prompt |
58 | 55 |
|
59 | | -At this point, if GRUB was installed normally, it would be functional and can |
60 | | -unlock the LUKS partition already. However, it would ask for the passphrase |
61 | | -immediately when it launches, before even showing any menu entries: |
| 56 | +At this point, if GRUB has been installed normally, it will be functional and |
| 57 | +can unlock the LUKS partition already. However, it will ask for the LUKS |
| 58 | +partition's passphrase *immediately* when it launches, even *before* showing |
| 59 | +any menu entries: |
62 | 60 |
|
63 | 61 |  |
65 | 63 |
|
66 | | -This might be an acceptable behavior, until an incorrect passphrase is entered, |
67 | | -in which case GRUB would directly fall back to the rescue mode without giving a |
68 | | -chance to reenter the passphrase: |
| 64 | +Users who accept this behavior of GRUB can skip this step and move on to the |
| 65 | +next one. |
69 | 66 |
|
70 | | - |
| 67 | +To some users, this behavior may be undesirable because they want to access |
| 68 | +some GRUB menu options without entering the passphrase. After all, some options |
| 69 | +do not really need the passphrase because they need not unlock the LUKS |
| 70 | +partition, like options to boot an alternative operating system that is not on |
| 71 | +the LUKS partition (e.g. Microsoft Windows), and the “UEFI Firmware Settings” |
| 72 | +option for launching the computer’s BIOS utility. These users might not wish to |
| 73 | +unnecessarily enter the passphrase to use these options. |
72 | 74 |
|
73 | | -To avoid this behavior of GRUB, move the `/boot/grub` directory to the ESP, |
74 | | -then create a symbolic link to the new directory under `/boot`. |
| 75 | +To avoid this behavior of GRUB, these users should move the `/boot/grub` |
| 76 | +directory to the ESP, then create a symbolic link to the new directory under |
| 77 | +`/boot`: |
75 | 78 |
|
76 | | -If a new Gentoo installation is being performed, or an existing installation |
77 | | -where GRUB is not used is being worked with, then please run the following |
78 | | -command: |
| 79 | +1. If a new Gentoo installation is being performed, or an existing installation |
| 80 | + where GRUB is not used is being worked with, then please run the following |
| 81 | + command: |
79 | 82 |
|
80 | | -```console |
81 | | -# mkdir "${ESP}/grub" |
82 | | -``` |
| 83 | + ```console |
| 84 | + # mkdir "${ESP}/grub" |
| 85 | + ``` |
83 | 86 |
|
84 | | -If GRUB is already being used as the bootloader, please use this command |
85 | | -instead to move existing GRUB files to the ESP: |
| 87 | + If GRUB is already being used as the bootloader, please use this command |
| 88 | + instead to move existing GRUB files to the ESP: |
86 | 89 |
|
87 | | -```console |
88 | | -# mv /boot/grub "${ESP}" |
89 | | -``` |
| 90 | + ```console |
| 91 | + # mv /boot/grub "${ESP}" |
| 92 | + ``` |
90 | 93 |
|
91 | | -Then, **in both cases**, run the following command to set up the symbolic link: |
| 94 | +2. Then, **in both cases**, run the following command to set up the symbolic link: |
92 | 95 |
|
93 | | -```console |
94 | | -# ln -s "${ESP}/grub" /boot |
95 | | -``` |
| 96 | + ```console |
| 97 | + # ln -s "${ESP}/grub" /boot |
| 98 | + ``` |
96 | 99 |
|
97 | 100 | Now, GRUB's passphrase prompt is deferred until a menu entry that requires the |
98 | | -LUKS partition to be unlocked is selected, and if an incorrect passphrase is |
99 | | -entered, GRUB no longer falls back to the rescue mode. Instead, the user can |
100 | | -press any key to return to the menu and reselect the same menu entry to reenter |
101 | | -the passphrase. |
| 101 | +LUKS partition to be unlocked is selected. |
102 | 102 |
|
103 | | - |
| 103 | + |
105 | 105 |
|
106 | 106 | Moving the contents of the `/boot/grub` directory to the ESP resolves this user |
107 | 107 | experience issue by making all critical files GRUB needs for full |
|
0 commit comments