bugGNU GRUB - Bugs: bug #50963, "normal" module...


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

bug #50963: "normal" module interprets comments if using grub-mkimage

Submitted by:  Bastiaan Teeuwen <teeuwen>
Submitted on:  Sun 07 May 2017 10:03:04 AM UTC  
Category:  Configuration Severity:  Major
Priority:  5 - Normal Item Group:  Software Error
Status:  Invalid Privacy:  Public
Assigned to:  None Originator Name:  Bastiaan Teeuwen
Open/Closed:  Closed Release: 
Release:  2.02~rc1 Reproducibility:  Every Time
Planned Release:  None

Sun 07 May 2017 05:24:10 PM UTC, comment #1: 

Embedded config is interpreted by rescue parser, not by normal.mod. It is intended for limited use cases and not for general purpose scripting.

Andrei Borzenkov <arvidjaar>
Project Member
Sun 07 May 2017 10:03:04 AM UTC, original submission:  

Steps to reproduce (on x86)
1. Set up a root folder for the iso using "mkdir -p root/boot/grub"
2. Create a file at root/boot/grub/grub.cfg with the following contents:
# Some comment

sleep 1000
" (for some reason "halt --no-apm" didn't work for me in qemu, also a bug perhaps?).
3. Create a grub image with grub-mkimage: "grub-mkimage -p root/boot/grub -c root/boot/grub/grub.cfg -o bin/grub.img -O i386-pc normal sleep"
4. "cat /usr/lib/grub/i386-pc/cdboot.img grub.img > root/grub.img".
5. Create an iso with "genisoimage -b grub.img -no-emul-boot -boot-load-size 4 -boot-info-table -o grub.iso root/".
6. Boot the iso on any x86 machine or emulator.

Expected behavior
The grub.cfg file should be parsed correctly and no warnings should show on startup.

Actual result
The comments are interpreted instead of ignored and GRUB2 throws warnings about how '#' isn't a command (as shown in the screenshot).

I should note that this doesn't happen if the image is created using grub-mkrescue.

The software I'm using is:

  • GRUB 2.02~rc1
  • mkisofs 3.02a07
  • QEMU 2.8.0

all running on x86_64 GNU/Linux 4.10.2-1-ARCH. Packages described above are all from the Arch Linux repos.

Bastiaan Teeuwen <teeuwen>


Attached Files


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by arvidjaar (Posted a comment)
  • -email is unavailable- added by teeuwen (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2017-05-07 arvidjaar StatusNone => Invalid
        Open/ClosedOpen => Closed
    2017-05-07 teeuwen Attached File- => Added 2017-05-07-114407_3200x1080_scrot.png, #40608

    Back to the top

    Powered by Savane 3.7