I accidentally broke my grub
Hi, I have Ubuntu 18.04 LTS. Today, whilst doing a normal apt update / upgrade, I somehow broke my grub install. Upon trying to boot, all I can see is
error: symbol 'grub_video_fb_get_region' not found.
error: file '/boot/grub/locale/en.mo.gz' not found.
How do I fix…? I can reboot to rescue mode but wasn't sure what to do.
I can ssh to the machine ok and all my websites are up. Just curious how to fix console access.
We've seen other occurrences where Linode users have encountered issues after updating their GRUB configuration. In an effort to help you resolve this particular issue, I'll outline a few steps that you can take to revert back to the default GRUB configuration for an Ubuntu 18.04 Linode.
You mentioned that you were able to boot into Rescue Mode, which is a great first step! To edit your GRUB configuration file in Rescue Mode, you'll want to change your working root directory to your root disk.
Once you've done this, you can run the following command to open the GRUB configuration file with the nano text editor:
$ sudo nano /etc/default/grub
After that, replace the current contents of this file by pasting the following configuration from your text editor:
# 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_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 #GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="" GRUB_CMDLINE_LINUX="console=ttyS0,19200n8 net.ifnames=0" # 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 ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef" # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console # 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' #GRUB_GFXMODE=640x480 # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux GRUB_DISABLE_LINUX_UUID=true # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true" # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1" # Enable serial console for LISH GRUB_GFXPAYLOAD_LINUX=text GRUB_TERMINAL=serial GRUB_SERIAL_COMMAND="serial --speed=19200 --unit=0 --word=8 --parity=no --stop=1"
Once you've pasted the contents above into the file and saved your changes, you can run the following command to update the GRUB configuration.
$ sudo update-grub
Finally, you can reboot your Linode to exit the Rescue Mode environment.
If you're still experiencing issues after performing the actions above, feel free to respond to this post (or open a Support ticket). We'd be glad to continue troubleshooting this with you!