@@ -58,16 +58,24 @@ Set up a target
5858 sudo emacs /etc/default/grub
5959
6060 b) Change ``GRUB_DEFAULT=[n] `` to ``GRUB_DEFAULT=saved ``.
61-
62- c) Add ``GRUB_DISABLE_SUBMENU=y `` to the end of the file and save it.
6361
64- This step is necessary because submenus confuse ktest.
62+ c) You must disable GRUB submenus because they confuse ktest:
63+
64+ .. code-block :: console
65+
66+ echo 'GRUB_DISABLE_SUBMENU=y' | sudo tee -a /etc/default/grub.d/disable-submenu.cfg
6567
6668 d) Update the grub configuration.
6769
6870 .. code-block :: console
69-
70- sudo update-grub
71+
72+ # Better safe than _very_ sorry
73+ sudo cp /boot/grub/grub.cfg /boot/grub/saved_grub.cfg
74+
75+ sudo update-grub
76+
77+ # Make sure submenus are actually disabled
78+ grep submenu /boot/grub/grub.cfg
7179
7280#. Set the default kernel.
7381
@@ -84,7 +92,7 @@ Set up a target
8492 # Print your currently booted (and known-safe) option
8593 cat /proc/cmdline
8694 # List the grub entries
87- awk '/^menuentry/ { print i++, '\t ', $0 }' /boot/grub/grub.cfg
95+ awk '/^menuentry|submenu / { print i++, '\t ', $0 }' /boot/grub/grub.cfg
8896 # Find the entry that matches the output of the
8997 # first command you ran, and take note of its number
9098 sudo grub-set-default [n] # Where [n] is that number
@@ -135,7 +143,7 @@ Set up a target
135143 # => saved_entry=6
136144
137145 # Show all, numbered kernel choices without (re)booting
138- awk ' /^menuentry/ { print i++, ' \t ' , $0 }' /boot/grub/grub.cfg
146+ awk ' /^menuentry|submenu / { print i++, ' \t ' , $0 }' /boot/grub/grub.cfg
139147 # => 5 menuentry ...
140148 # => 6 menuentry 'Ubuntu, with Linux 5.4.0-53-generic' --class ubuntu ...
141149 # => 7 menuentry ...
0 commit comments