Bug 12111 - GRUB2 menuconfig is not getting generated for genericx86 ISO image
Summary: GRUB2 menuconfig is not getting generated for genericx86 ISO image
Status: RESOLVED FIXED
Alias: None
Product: Meta-yocto
Classification: Build System, Metadata & Runtime
Component: configuration (show other bugs)
Version: 2.4
Hardware: x86 x86
: Medium+ major
Target Milestone: 2.4.2
Assignee: California Sullivan
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2017-09-21 05:40 UTC by skumarbdc11
Modified: 2018-01-09 22:40 UTC (History)
4 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skumarbdc11 2017-09-21 05:40:20 UTC
Built a standard genericx86 ISO image for core-image-sato.

Installed on VirtualBox.

After installation during the device reboot the "Linux" entry GRUB menu is not coming. It goes to the grub> prompt.

This issue is not observed with "Pyro" branch it is happening only in master.

Please suggest if I am missing something here.
Comment 1 California Sullivan 2017-09-25 22:29:51 UTC
What commit are you working with?

I have tried both 87f2328fb271ee34d5102cfdb6d66f97fd5188bd and the tip of master, but wasn't able to reproduce the issue.

Following these steps works for me:

1) add IMAGE_FSTYPES_pn-core-image-sato_append = " iso" to my local.conf (iso not built automatically for genericx86?) then build core-image-sato
2) dd the iso image to a USB stick
3) boot the image and select grub's "install" option
4) install to another USB stick though the installer
5) unplug the original USB stick, cycle power, and boot via grub's "boot" option

This was with a minnowboard using 32-bit firmware, and genericx86 images.

I had seen similar behavior to what you're describing in the past (~2 months ago), but I wasn't able to reproduce it for long so I thought it may have been user error on my part. You might be hitting the same thing I was seeing.
Comment 2 Saul Wold 2017-09-25 23:26:31 UTC
See previous comment, can you provide more details about your commitish and image settings.
Comment 3 skumarbdc11 2017-10-25 11:03:14 UTC
(In reply to comment #2)
> See previous comment, can you provide more details about your commitish and
> image settings.

I am currently using 87f2328fb271ee34d5102cfdb6d66f97fd5188bd on master and the image is core-image-x11.

The issue is still there and I think I found the issue.

In meta/recipes-core/initrdscripts/files/init-install.sh, the following code to get the grub version is not working in master branch but working fine in Pyro.

grub_version=$(grub-install -v|sed 's/.* \([0-9]\).*/\1/')

I changed the option to grub-install from -v to --version and it works fine and could see the menu config got created after ISO installation on the media.
Comment 4 Stephen K Jolley 2017-10-26 15:01:30 UTC
Cal, Does this answer you question?
Comment 5 California Sullivan 2017-11-14 21:45:37 UTC
Explains why I didn't hit it - I was using the install-efi.sh script rather than the install.sh script.

Your change looks sane, I'll verify and send a patch, unless you want to.
Comment 6 California Sullivan 2017-11-22 21:06:49 UTC
Patch sent to list: http://lists.openembedded.org/pipermail/openembedded-core/2017-November/144790.html
Comment 7 California Sullivan 2017-12-07 18:20:15 UTC
In master: http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=0b8460e2ce9f9a4ea8de8497fbb65b91cb69b8e0

Awaiting backport now.