diff options
author | Robert Yang <liezhi.yang@windriver.com> | 2016-03-29 00:49:52 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2016-03-29 23:20:12 +0100 |
commit | f1f9f891a41b14bf04acf288b7f4d66d4fda6600 (patch) | |
tree | 817c1d0bca6fbe2f92e25b322ba67e1afafd9b43 /meta | |
parent | 4e7eaed2c038ca29f343b005fe41dae50f5331ab (diff) | |
download | poky-f1f9f891a41b14bf04acf288b7f4d66d4fda6600.tar.gz |
init-live.sh: fix overlay fs
* The name changes from overlayfs to overlayo
* The workdir is a must when mount
* The updir must be a subdir of rootfs.rw
This patch plus with another one which has been sent to linux-yocto can
fix the error when boot iso:
EXT4-fs (loop0): re-mounted. Opts: data=ordered
Populating dev cache
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/rcS.d/S36udev-cache: line 73: can't create /etc/udev-cache.tar.gz:
Read-only file system
udev-cache: update failed!
rm: can't remove '/etc/udev/cache.data': Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
rm: can't remove '/tmp': Read-only file system
ln: /tmp/tmp: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
ln: /etc/resolv.conf: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
/etc/init.d/rc: /etc/rcS.d/S37populate-volatile.sh: line 1: can't create
/etc/volatile.cache.build: Read-only file system
(From OE-Core rev: ba918e0e36418ec6e14aef537ff4fdf45af6d8d4)
Signed-off-by: Robert Yang <liezhi.yang@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-live.sh | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh index 04e58d5f30..09fb479915 100644 --- a/meta/recipes-core/initrdscripts/files/init-live.sh +++ b/meta/recipes-core/initrdscripts/files/init-live.sh | |||
@@ -169,8 +169,8 @@ mount_and_boot() { | |||
169 | 169 | ||
170 | # determine which unification filesystem to use | 170 | # determine which unification filesystem to use |
171 | union_fs_type="" | 171 | union_fs_type="" |
172 | if grep -q -w "overlayfs" /proc/filesystems; then | 172 | if grep -q -w "overlay" /proc/filesystems; then |
173 | union_fs_type="overlayfs" | 173 | union_fs_type="overlay" |
174 | elif grep -q -w "aufs" /proc/filesystems; then | 174 | elif grep -q -w "aufs" /proc/filesystems; then |
175 | union_fs_type="aufs" | 175 | union_fs_type="aufs" |
176 | else | 176 | else |
@@ -179,14 +179,15 @@ mount_and_boot() { | |||
179 | 179 | ||
180 | # make a union mount if possible | 180 | # make a union mount if possible |
181 | case $union_fs_type in | 181 | case $union_fs_type in |
182 | "overlayfs") | 182 | "overlay") |
183 | mkdir -p /rootfs.ro /rootfs.rw | 183 | mkdir -p /rootfs.ro /rootfs.rw |
184 | if ! mount -n --move $ROOT_MOUNT /rootfs.ro; then | 184 | if ! mount -n --move $ROOT_MOUNT /rootfs.ro; then |
185 | rm -rf /rootfs.ro /rootfs.rw | 185 | rm -rf /rootfs.ro /rootfs.rw |
186 | fatal "Could not move rootfs mount point" | 186 | fatal "Could not move rootfs mount point" |
187 | else | 187 | else |
188 | mount -t tmpfs -o rw,noatime,mode=755 tmpfs /rootfs.rw | 188 | mount -t tmpfs -o rw,noatime,mode=755 tmpfs /rootfs.rw |
189 | mount -t overlayfs -o "lowerdir=/rootfs.ro,upperdir=/rootfs.rw" overlayfs $ROOT_MOUNT | 189 | mkdir -p /rootfs.rw/upperdir /rootfs.rw/work |
190 | mount -t overlay overlay -o "lowerdir=/rootfs.ro,upperdir=/rootfs.rw/upperdir,workdir=/rootfs.rw/work" $ROOT_MOUNT | ||
190 | mkdir -p $ROOT_MOUNT/rootfs.ro $ROOT_MOUNT/rootfs.rw | 191 | mkdir -p $ROOT_MOUNT/rootfs.ro $ROOT_MOUNT/rootfs.rw |
191 | mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro | 192 | mount --move /rootfs.ro $ROOT_MOUNT/rootfs.ro |
192 | mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw | 193 | mount --move /rootfs.rw $ROOT_MOUNT/rootfs.rw |