So, I had a dual boot and just nuked the windows partitions, and then got rid of the boot files for windows and updated the grub, and now my PC boots directly into ubuntu. However, I'd like to still have the grub option so I can switch between kernels, and I want to make it permanent.

I've read about the matter and what I found was advice to comment the following line out of the grub file:


However, there is no such line in the file, which sole content is:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`

# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)

# Uncomment to disable graphical terminal (grub-pc only)

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux

# Uncomment to disable generation of recovery mode menu entries

# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

What does this mean? Should I instead comment out the GRUB_TIMEOUT_STYLE=hidden line, or what?

  • 2
    It is a valid command. If it's not there for you to uncomment, you can simply put it in and run update-grub. – Jos Oct 15 '18 at 11:47

Ypu can change the




and most importantly

 sudo update-grub

sometimes if grub is not installed properly you may need

if boot is legacy

sudo grub-install /dev/sdx


sudo grub-install --force /dev/sdx

sdx being the boot drive sda,sdb or sdc If boot is EFI you need to specify where your EFI System partition is mounted:

 sudo grub-install --efi-directory=<address of efi-directory (eg. /mnt/efi)>
| improve this answer | |
  • I switched the style to countdown and updated the grub, and now when I booted not only did the grub still not appear, as it showed the message Error: unknown command "hwmatch", followed by a 10 sec countdown. Should I reinstall, considering that it used to work before I removed the dual boot? I have UEFI, and I already did grub-install /dev/sda in another context, before making this post. Should I do it again? – aaaaa Oct 15 '18 at 13:37
  • 1
    Search on grub timeout gnu.org/software/grub/manual/grub/grub.html and ‘GRUB_TIMEOUT_STYLE’ If this option is unset or set to ‘menu’, then GRUB will display the menu and then wait for the timeout set by ‘GRUB_TIMEOUT’ to expire before booting the default entry. Pressing a key interrupts the timeout. – oldfred Oct 15 '18 at 14:03
  • Ah, so the countdown mode allows me to access the menu by pressing ESC during the countdown, and the menu one works straight out of the box! Tried both, and both work. Sticking with the second one. Thanks a lot for that useful link. I now consider my problem solved. – aaaaa Oct 15 '18 at 14:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.