Bug 3870 - atom-pc - cannot boot image on netbook after install
Summary: atom-pc - cannot boot image on netbook after install
Status: VERIFIED FIXED
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-meta-yocto (show other bugs)
Version: 1.4
Hardware: Netbook x86
: High critical
Target Milestone: 1.4 M4
Assignee: Darren Hart
QA Contact:
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-02-08 13:21 UTC by Alexandru Georgescu
Modified: 2013-02-28 13:44 UTC (History)
2 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandru Georgescu 2013-02-08 13:21:19 UTC
IMAGES USED: 
core-image-sato: http://autobuilder.yoctoproject.org/pub/nightly/20130208-1/machines/atom-pc/
and
core-image-sato-sdk http://autobuilder.yoctoproject.org/pub/nightly/20130131-4/machines/atom-pc/

HARDWARE USED: Lenovo S10-3 netbook.


STEPS TO REPRODUCE
1. Download the hddimg images from autobuilder. e.g.: http://autobuilder.yoctoproject.org/pub/nightly/20130131-4/machines/atom-pc/core-image-sato-sdk-atom-pc.hddimg

2. Copy the hddimg to the usb:
e.g.: $ sudo dd if=./core-image-sato-sdk-atom-pc.hddimg of=/dev/sdc
3. After the image is copied, install it into the netbook.
4. After installation finnished, boot the netbook from its local HDD

EXPECTED RESTULTS
4. Image boots successfully

ACTUAL RESULTS
4. Image stops at grub.
When trying to type "boot" or "vmlinuz" a message saying that kernel cannot be found is displayed.

On liveboot, the image boots.
Comment 1 Darren Hart 2013-02-11 22:04:51 UTC
Without hardware this is going to be rather difficult for me to debug. I would start by clearing the grub config and trying to boot from the grub shell. Use tab completion to determine which HD device GRUB uses for the installed media and compare that to what the installer put in the grub config it installed.

Ultimately I think we'll find that this is a bug in our less-than-stellar installer :-)

Alex I suggest you own this if you want to see it fixed. I'll happyily offer suggestions, but without that particular machine, I won't make much progress on my own and you'll be on the hook to run my suggestions anyway.
Comment 2 Saul Wold 2013-02-14 15:38:41 UTC
Please try on the default n450 hardware and report back
Comment 3 Alexandru Georgescu 2013-02-18 15:44:24 UTC
After the discussion between me and Darren, resulted that I should check if grub.cfg file is configured correctly with the correct kernel path.

After my investigation I have found that no config.cfg file was found installed on the system.
e.g. in:
a)
grub> linux (hd0,1)/boot/grub/ 
folder no grub.cfg was found

b)
grub> linux (hd0,2)/boot/
folder no grub folder or grub.cfg file was found

Thanks,
Alex.
Comment 4 Darren Hart 2013-02-21 17:29:37 UTC
The problem here is that grub2 is installed but a grub 1 menu.lst is
    created at install time. At boot, grub2 doesn't find a grub.cfg file and
    drops to the grub shell.
    
    This happens because the installer is looking for 40_custom (a grub2
    file) on the rootfs, but grub2 isn't installed on the rootfs. It exists
    in the initramfs. Patching the installer to look on the initramfs
    resolves the problem.
    
    Note that the problem may have occurred if grub2 used to be installed on
    the rootfs but was later removed. In any case, the installer is HORRIBLE
    and really needs to be completely redesigned as part of the deployment
    effort. For now, this should get the live image installer limping along
    again.
Comment 5 Darren Hart 2013-02-28 04:55:30 UTC
commit 4f4d82c62c56e182907244b98497ba3cfd848eed
Author: Darren Hart <dvhart@linux.intel.com>
Date:   Thu Feb 21 09:28:02 2013 -0800

    install: Look for grub2 files on the initramfs, not rootfs
    
    Fixes [YOCTO #3870] atom-pc - cannot boot image on netbook after install
Comment 6 Alexandru Georgescu 2013-02-28 13:44:32 UTC
Thank Darren,
Grub now it's fixed, and the image can boot.