bugGNU GRUB - Bugs: bug #48102, grub-2.02_beta2: grub2-mkconfig...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48102: grub-2.02_beta2: grub2-mkconfig does not allow serial_usb0 as terminal

Submitter:  Horst Prote <prote>
Submitted:  Thu 02 Jun 2016 05:23:54 PM UTC
   
 
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  None Privacy:  Public
Assigned to:  None Originator Name: 
Open/Closed:  Open Release:  other
Release:  Reproducibility:  Every Time
Planned Release:  2.03+

Thu 02 Jun 2016 05:23:54 PM UTC, original submission:  

Under Gentoo Linux with sys-boot/grub-2.02_beta2-r9 I get this error:

With


GRUB_TERMINAL_INPUT="usb_keyboard0 serial_usb0 console"
GRUB_TERMINAL_OUTPUT="serial_usb0 console"
GRUB_SERIAL_COMMAND="sleep --verbose --interruptible 1; serial --speed=115200 usb0"
GRUB_PRELOAD_MODULES="nativedisk ehci ohci uhci usb usbserial_ftdi"


in /etc/default/grub you get:


# grub2-mkconfig -o /boot/grub/grub.cfg
Invalid output terminal "serial_usb0 console"


This can be fixed by changing /usr/sbin/grub2-mkconfig from


for x in ${GRUB_TERMINAL_OUTPUT}; do
    case "x${x}" in
        xgfxterm) ;;
        xconsole | xserial | xofconsole | xvga_text)
            # make sure all our children behave in conformance with ascii..
            export LANG=C;;
        *) echo "Invalid output terminal \"${GRUB_TERMINAL_OUTPUT}\"" >&2 ; exit 1 ;;
    esac
done


to (note the appended * after xserial)


for x in ${GRUB_TERMINAL_OUTPUT}; do
    case "x${x}" in
        xgfxterm) ;;
        xconsole | xserial* | xofconsole | xvga_text)
            # make sure all our children behave in conformance with ascii..
            export LANG=C;;
        *) echo "Invalid output terminal \"${GRUB_TERMINAL_OUTPUT}\"" >&2 ; exit 1 ;;
    esac
done


But now the GRUB_SERIAL_COMMAND isn't added to grub.cfg because of the following lines
in /etc/grub.d/00_header


for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
    if [ xserial = "x$x" ]; then
    serial=1;
    fi
    if [ xgfxterm = "x$x" ]; then
    gfxterm=1;
    fi
done


After changing these lines to


for x in ${GRUB_TERMINAL_INPUT} ${GRUB_TERMINAL_OUTPUT}; do
    case "x${x}" in
    xgfxterm) gfxterm=1;;
    xserial*) serial=1;;
    esac
done


now


# grub2-mkconfig -o /boot/grub/grub.cfg


creates a valid and working config.

Horst Prote <prote>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by phcoder (Updated the item)
  • -email is unavailable- added by floppym
  • -email is unavailable- added by prote (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-03-06 phcoder Planned ReleaseNone 2.03+
    2016-06-02 floppym Carbon-Copy- Added floppym

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code