Bug 11073

Summary: runqemu: do no rely on grepping images
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Patrick Ohly <patrick.ohly>
Component: devtools / tool chainAssignee: Robert Yang <liezhi.yang>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium+ CC: joshuagloe, meta.mr.watcher, meta.watcher
Version: unspecified   
Target Milestone: 2.3 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Yes (doc changes required)

Description Patrick Ohly 2017-02-17 14:01:15 UTC
runqemu greps the image for certain magic strings (root=/dev/sd, root=/dev/hd) to determine which disk interface (ide, scsi, virtio) it should use for booting.

This is noticeably slow for me (laptop, big image) and even fails when the machine is loaded:
  grep: memory exhausted
  Aborted

It then falls back to virtio, which works for me.

Besides the performance, the check is also unreliable, because those strings might be contained in images for other reasons.

We should have an explicit mechanism for images to configure this aspect. This can end up in .qemuboot.conf, and then the grep commands can be removed.