Bug 4487

Summary: ISO images don't boot under qemu - hang at waiting for removable media
Product: [Runtime] General Runtime Reporter: Stefan Stanacar <sstncr>
Component: General RuntimeAssignee: Chen Qi <Qi.Chen>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: ionutx.chisanovici, liezhi.yang, mark.hatle, mihai.prica, Qi.Chen, yi.zhao
Version: 1.5   
Target Milestone: 1.5 M5   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know
Attachments:
Description Flags
screenshot none

Description Stefan Stanacar 2013-05-10 15:54:12 UTC
Created attachment 1212 [details]
screenshot

Build Configuration:
BB_VERSION        = "1.19.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Fedora-18"
TARGET_SYS        = "x86_64-poky-linux"
MACHINE           = "qemux86-64"
DISTRO            = "poky"
DISTRO_VERSION    = "1.3+snapshot-20130510"
TUNE_FEATURES     = "m64"
TARGET_FPU        = ""
meta              
meta-yocto        
meta-yocto-bsp    = "master:88a7b041fbf2583472aa9408a33dd8881223a0c1"


- add IMAGE_FSTYPES = "live" to local.conf
- bitbake core-image-minimal
- runqemu qemux86-64 core-image-minimal iso
- image boots but hangs at Waiting for removable media
Comment 1 Chen Qi 2013-05-22 06:02:44 UTC
I ran into the same problem.
The device /dev/sda (in my case) is not mounted under /media.
It's similar to bug#693. (https://bugzilla.yoctoproject.org/show_bug.cgi?id=693)

//Chen Qi
Comment 2 Mihai Prica 2013-08-14 11:08:51 UTC
- The boot process hangs because the image is not mounted in /media.
- I tested on the real HW (sugarbay) and the image boots but there are a lot of errors and the filesystem is mounted read-only.
- The image boots on real hardware because the disk is loaded as /dev/sr0 (SCSI), while on qemu it's /dev/hdc.
- If you run qemu with the -hdc option instead of -cdrom, qemu will load the image as a hard drive and the boot process succeeds.
Comment 3 Chen Qi 2013-09-10 08:57:16 UTC
Problem caused by the following commit:

commit 6a7aa9cac2fc128ffc9ea4416426335e06db345a
Author: Otavio Salvador <otavio@ossystems.com.br>
Date:   Mon Apr 22 08:52:29 2013 -0300

    udev-extraconf: Avoid mounting unknown filesystems
    
    Depending on kernel version used, the system can hung when trying to
    mount the extended partition (not the logical one) as it is a holder
    for other partitions and does not have a filesystem in it.
    
    To avoid this to happen we just mount partitions when these are using
    known filesystems so it does not try to mount a partition for an
    unsupported filesystem.
    
    Reported-by: Vladan Jovanovic <vladan.jovanovic@gmail.com>
    Reported-by: Leonardo Sandoval Gonzalez <b42214@freescale.com>
    (From OE-Core rev: 895c9685a7f95dc84786213f945895a504a16254)
    
    Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
    Tested-by: Vladan Jovanovic <vladan.jovanovic@gmail.com>
    Signed-off-by: Saul Wold <sgw@linux.intel.com>
    Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>


The problem is that the cdrom device has no ID_FS_TYPE.
I'm now checking it with Otavio on OE mailing list.

//Chen Qi
Comment 4 Chen Qi 2013-09-11 05:50:42 UTC
Branch: master
Commit: 2df21a3b27543df912a3ce05bef2415fae13cb7c
URL:    http://git.openembedded.org/?p=openembedded-core.git&a=commit;h=2df21a3b27543df912a3ce05bef2415fae13cb7c
Comment 5 Ionut Chisanovici 2013-10-07 09:40:18 UTC
Verified on master:56ea7aca3e6b4a0db3f699cc0d775d267b36e164