inserting F10 / CTRL+X control character to a minicom terminal

I ran into this interesting issue tonight, where I had malformed entry in my kernel flags which was causing the system to reboot as soon as it loaded the kernel.

So, I needed to edit my GRUB setting at the command line… however, my only physical console on this system is via a 19200 8N1 serial console, running through “minicom”.

After hitting “e” to edit my grub boot item, the following familiar message is displayed towards the end of the screen:

Minimum Emacs-like screen editing is supported. TAB lists
completions. Press Ctrl-x or F10 to boot, Ctrl-c or F2 for
a command-line or ESC to discard edits and return to the GRUB menu.

I was not able to enter the “CTRL+X” or “F10” keystrokes in minicom.

I found a couple articles about this:

Send F10 to GRUB with Minicom
How to send F10 from minicom?

The first looked promising, but didn’t seem to work for me. The answer to the second post didn’t seem to understand the issue at hand.

Anyways, I eventually found this askubuntu article: how do I send control characters to serial device

which eventually pointed me to the idea passing control characters directly to the device.

You’ll want to use the octal representation of your control character.

According to this ASCII Table , the decimal representation of “CTRL+X” is “24”. We must then convert to octal:

$ echo "obase=8; 24" | bc

so now, to solve our issue, we simply run:

$ echo -e '\030' > /dev/ttyUSB0

And boom! GRUB has the “CTRL+X” sequence it was looking for!

Leave a Reply

Your email address will not be published. Required fields are marked *