Bug 5624

Summary: dhcp-client: invoke dhclient-script failed on Read-only file system
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Hongxu Jia <hongxu.jia>
Component: coreAssignee: Hongxu Jia <hongxu.jia>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: Medium CC: hongxu.jia, liezhi.yang, mark.hatle, meta.mr.watcher, meta.watcher, sgw, yi.zhao
Version: 1.6   
Target Milestone: 1.6 M1   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: Don't know

Description Hongxu Jia 2013-12-03 10:02:31 UTC
1. vim local.conf
EXTRA_IMAGE_FEATURES += "read-only-rootfs"
IMAGE_FSTYPES += "live"
IMAGE_INSTALL += "dhcp-client"
MACHINE = "qemux86-64"

2. bitbake core-image-sato

3. start qemu with iso image:

$ qemu-system-x86_64 -nographic -boot d -drive file=core-image-sato-qemux86.iso

Click-->Serial console boot
...
/sbin/dhclient-script: line 30: /etc/resolv.conf.dhclient: Read-only file system
chmod: cannot access '/etc/resolv.conf.dhclient': No such file or directory
/sbin/dhclient-script: line 41: /etc/resolv.conf.dhclient: Read-only file system
mv: cannot stat '/etc/resolv.conf.dhclient': No such file or directory
done.
...
Comment 1 Hongxu Jia 2014-03-05 09:17:19 UTC
In read-only file system, '/etc' is on the readonly partition,
and '/etc/resolv.conf' is symlinked to a separate writable
partition.

In this situation, we should use shell variable to instead of
the temp file '/etc/resolv.conf.dhclient'.
Comment 2 Hongxu Jia 2014-03-20 06:18:03 UTC
Merged into master:

From OE-Core rev: df793f4356b411cbb92445c4559c9b21eb6d99fc