diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2014-05-15 17:36:17 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2014-05-20 14:53:12 +0100 |
commit | 8293f564685d0f587ab63a107285625dc4f98f1c (patch) | |
tree | c66fce8fe0427cf08bf08cacf6ed422cddf6e19f /meta/recipes-core/initrdscripts/files/init-install-efi.sh | |
parent | 77b4b25c360aaa311a481786ae32e06a2b29feb1 (diff) | |
download | poky-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-install-efi.sh')
-rw-r--r-- | meta/recipes-core/initrdscripts/files/init-install-efi.sh | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh index ed3221b0a6..8bd70251cd 100644 --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh | |||
@@ -128,7 +128,7 @@ mkdir /rootmnt | |||
128 | mkdir /bootmnt | 128 | mkdir /bootmnt |
129 | 129 | ||
130 | mount $rootfs /ssd | 130 | mount $rootfs /ssd |
131 | mount -o rw,loop,noatime,nodiratime /media/$1/$2 /rootmnt | 131 | mount -o rw,loop,noatime,nodiratime /run/media/$1/$2 /rootmnt |
132 | 132 | ||
133 | echo "Copying rootfs files..." | 133 | echo "Copying rootfs files..." |
134 | cp -a /rootmnt/* /ssd | 134 | cp -a /rootmnt/* /ssd |
@@ -150,13 +150,13 @@ mount $bootfs /ssd | |||
150 | 150 | ||
151 | EFIDIR="/ssd/EFI/BOOT" | 151 | EFIDIR="/ssd/EFI/BOOT" |
152 | mkdir -p $EFIDIR | 152 | mkdir -p $EFIDIR |
153 | cp /media/$1/vmlinuz /ssd | 153 | cp /run/media/$1/vmlinuz /ssd |
154 | # Copy the efi loader | 154 | # Copy the efi loader |
155 | cp /media/$1/EFI/BOOT/*.efi $EFIDIR | 155 | cp /run/media/$1/EFI/BOOT/*.efi $EFIDIR |
156 | 156 | ||
157 | if [ -f /media/$1/EFI/BOOT/grub.cfg ]; then | 157 | if [ -f /run/media/$1/EFI/BOOT/grub.cfg ]; then |
158 | GRUBCFG="$EFIDIR/grub.cfg" | 158 | GRUBCFG="$EFIDIR/grub.cfg" |
159 | cp /media/$1/EFI/BOOT/grub.cfg $GRUBCFG | 159 | cp /run/media/$1/EFI/BOOT/grub.cfg $GRUBCFG |
160 | # Update grub config for the installed image | 160 | # Update grub config for the installed image |
161 | # Delete the install entry | 161 | # Delete the install entry |
162 | sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG | 162 | sed -i "/menuentry 'install'/,/^}/d" $GRUBCFG |
@@ -170,10 +170,10 @@ if [ -f /media/$1/EFI/BOOT/grub.cfg ]; then | |||
170 | sed -i "s@linux /vmlinuz *@linux /vmlinuz root=$rootfs rw $rootwait quiet @" $GRUBCFG | 170 | sed -i "s@linux /vmlinuz *@linux /vmlinuz root=$rootfs rw $rootwait quiet @" $GRUBCFG |
171 | fi | 171 | fi |
172 | 172 | ||
173 | if [ -d /media/$1/loader ]; then | 173 | if [ -d /run/media/$1/loader ]; then |
174 | GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf" | 174 | GUMMIBOOT_CFGS="/ssd/loader/entries/*.conf" |
175 | # copy config files for gummiboot | 175 | # copy config files for gummiboot |
176 | cp -dr /media/$1/loader /ssd | 176 | cp -dr /run/media/$1/loader /ssd |
177 | # delete the install entry | 177 | # delete the install entry |
178 | rm -f /ssd/loader/entries/install.conf | 178 | rm -f /ssd/loader/entries/install.conf |
179 | # delete the initrd lines | 179 | # delete the initrd lines |