summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts/files/init-live.sh
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-05-15 17:36:17 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-05-20 14:53:12 +0100
commit8293f564685d0f587ab63a107285625dc4f98f1c (patch)
treec66fce8fe0427cf08bf08cacf6ed422cddf6e19f /meta/recipes-core/initrdscripts/files/init-live.sh
parent77b4b25c360aaa311a481786ae32e06a2b29feb1 (diff)
downloadpoky-8293f564685d0f587ab63a107285625dc4f98f1c.tar.gz
initrdscripts: fix for /run/media
mount.sh in udev-extraconf was modified to use /run/media instead of /media. Unfortunately, our scripts in initrdscripts have some dependency on the auto-mounting mechanism proviced by udev-extraconf. So these scripts should also be fixed to use /run/media instead /media, otherwise, our live image cannot work correctly. (From OE-Core rev: be0327b6a900be5434b6b1f08277faf2f65d5da8) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initrdscripts/files/init-live.sh')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh18
1 files changed, 9 insertions, 9 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 0bc38b776e..0be9b6fb48 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -82,9 +82,9 @@ boot_live_root() {
82 82
83 # Move the mount points of some filesystems over to 83 # Move the mount points of some filesystems over to
84 # the corresponding directories under the real root filesystem. 84 # the corresponding directories under the real root filesystem.
85 for dir in `awk '/\/dev.* \/media/{print $2}' /proc/mounts`; do 85 for dir in `awk '/\/dev.* \/run\/media/{print $2}' /proc/mounts`; do
86 mkdir -p ${ROOT_MOUNT}/$dir 86 mkdir -p ${ROOT_MOUNT}/media/${dir##*/}
87 mount -n --move $dir ${ROOT_MOUNT}/$dir 87 mount -n --move $dir ${ROOT_MOUNT}/media/${dir##*/}
88 done 88 done
89 mount -n --move /proc ${ROOT_MOUNT}/proc 89 mount -n --move /proc ${ROOT_MOUNT}/proc
90 mount -n --move /sys ${ROOT_MOUNT}/sys 90 mount -n --move /sys ${ROOT_MOUNT}/sys
@@ -113,11 +113,11 @@ echo "Waiting for removable media..."
113C=0 113C=0
114while true 114while true
115do 115do
116 for i in `ls /media 2>/dev/null`; do 116 for i in `ls /run/media 2>/dev/null`; do
117 if [ -f /media/$i/$ROOT_IMAGE ] ; then 117 if [ -f /run/media/$i/$ROOT_IMAGE ] ; then
118 found="yes" 118 found="yes"
119 break 119 break
120 elif [ -f /media/$i/isolinux/$ROOT_IMAGE ]; then 120 elif [ -f /run/media/$i/isolinux/$ROOT_IMAGE ]; then
121 found="yes" 121 found="yes"
122 ISOLINUX="isolinux" 122 ISOLINUX="isolinux"
123 break 123 break
@@ -135,7 +135,7 @@ do
135 mount | grep media 135 mount | grep media
136 echo "Available block devices" 136 echo "Available block devices"
137 cat /proc/partitions 137 cat /proc/partitions
138 fatal "Cannot find $ROOT_IMAGE file in /media/* , dropping to a shell " 138 fatal "Cannot find $ROOT_IMAGE file in /run/media/* , dropping to a shell "
139 fi 139 fi
140 C=$(( C + 1 )) 140 C=$(( C + 1 ))
141 fi 141 fi
@@ -150,7 +150,7 @@ mount_and_boot() {
150 mkdir $ROOT_MOUNT 150 mkdir $ROOT_MOUNT
151 mknod /dev/loop0 b 7 0 2>/dev/null 151 mknod /dev/loop0 b 7 0 2>/dev/null
152 152
153 if ! mount -o rw,loop,noatime,nodiratime /media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then 153 if ! mount -o rw,loop,noatime,nodiratime /run/media/$i/$ISOLINUX/$ROOT_IMAGE $ROOT_MOUNT ; then
154 fatal "Could not mount rootfs image" 154 fatal "Could not mount rootfs image"
155 fi 155 fi
156 156
@@ -211,7 +211,7 @@ case $label in
211 mount_and_boot 211 mount_and_boot
212 ;; 212 ;;
213 install|install-efi) 213 install|install-efi)
214 if [ -f /media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then 214 if [ -f /run/media/$i/$ISOLINUX/$ROOT_IMAGE ] ; then
215 ./$label.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params 215 ./$label.sh $i/$ISOLINUX $ROOT_IMAGE $video_mode $vga_mode $console_params
216 else 216 else
217 fatal "Could not find $label script" 217 fatal "Could not find $label script"