Monday, April 8, 2019

16.04 - How to get to the GRUB menu at boot-time using serial console?



It is always a struggle to show the grub menu, and a lot of answered questions on that.
The answer seems to be holding shift, but that doesn't work on serial console (actually serial over lan)




I have tried spamming space and escape to no avail.



This is a server which takes quite a long time to pass bios, and it makes it even more difficult and time consuming.



Is there a good solution to enter grub reliably?



Obviously editing /etc/default/grub would help, but now it is too late.



Not a perfect solution, but editing the configuration using a live USB fixed the problem.




To avoid this problem in the future, the grub configuration is fixed to display the boot menu.



The boot time for servers are so long anyways, so adding 10 seconds of grub menu is worth it when things are not working.



Here is the fixed /etc/default/grub config:



GRUB_DEFAULT=0
GRUB_HIDDEN_TIMEOUT_QUIET=false
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`


GRUB_CMDLINE_LINUX_DEFAULT="splash quiet"
# Kernel console on both serial and kvm/local console
GRUB_CMDLINE_LINUX="console=tty0 console=ttyS0,115200n8 rootdelay=60"
# Show grub menu on both serial and kvm/local console
GRUB_TERMINAL="console serial"
GRUB_SERIAL_COMMAND="serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1"

No comments:

Post a Comment

11.10 - Can't boot from USB after installing Ubuntu

I bought a Samsung series 5 notebook and a very strange thing happened: I installed Ubuntu 11.10 from a usb pen drive but when I restarted (...