init-install-efi.sh: Avoid /mnt/mtab creation if already present
PATCH 1/1 init-install-efi.sh: Avoid /mnt/mtab creation if already present
From: Leonardo Sandoval <[email protected]>
The base-files recipe installs /mnt/mtab (it is a softlink of /proc/mounts), so if an image includes the latter, there is no new to created it again inside the install-efi.sh script, otherwise an error may occur as indicated on the bug's site.
[YOCTO #7971]
--- meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)
meta/recipes-core/initrdscripts/files/init-install-efi.sh +5 -1
@@ -109,7 +109,11 @@ rm -f /etc/udev/scripts/mount* umount ${device}* 2> /dev/null || /bin/true mkdir -p /tmp -cat /proc/mounts > /etc/mtab + +# Create /etc/mtab if not present +if [ ! -e /etc/mtab ]; then + cat /proc/mounts > /etc/mtab +fi disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")
Signature · 1 line
1.8.4.5
Hi Leo, this fix looks good to me, can you mention how did you test this?
Quoted 40 lines · On Mon, 2015-08-03 at 15:01 +0000, [email protected]…
From: Leonardo Sandoval <[email protected]>
The base-files recipe installs
/mnt/mtab(it is a softlink of/proc/mounts),
so if an image includes the latter, there is no new to created it again inside
theinstall-efi.shscript, otherwise an error may occur as indicated on the
bug's site.[YOCTO #7971]
Signed-off-by: Leonardo Sandoval <
[email protected]>--- meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)(quoted diff) +0
-1-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.shindex f339b30..665d04a 100644
meta/recipes-core/initrdscripts/files/init-install-efi.sh +5
-2@@ -109,7 +109,11 @@ rm -f /etc/udev/scripts/mount* umount ${device}* 2> /dev/null || /bin/true mkdir -p /tmp -cat /proc/mounts > /etc/mtab + +# Create /etc/mtab if not present +if [ ! -e /etc/mtab ]; then + cat /proc/mounts > /etc/mtab +fi disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")Signature · 2 lines
-- 1.8.4.5
Tests were done in the same manner as described in the bugzilla (core-image-sato-sdk image and genericx86-64 machine). In my case, the only HW I tested was the minnowboard. The testing consists of booting a live image and installing the image. After this patch, installation went fine.
Quoted 45 lines · Benjamin Esquivel
Hi Leo, this fix looks good to me, can you mention how did you test this?
Quoted 40 lines · On Mon, 2015-08-03 at 15:01 +0000, [email protected]…
From: Leonardo Sandoval <[email protected]>
The base-files recipe installs
/mnt/mtab(it is a softlink of/proc/mounts),
so if an image includes the latter, there is no new to created it again inside
theinstall-efi.shscript, otherwise an error may occur as indicated on the
bug's site.[YOCTO #7971]
Signed-off-by: Leonardo Sandoval <
[email protected]>--- meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)(quoted diff) +0
-1-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.shindex f339b30..665d04a 100644
meta/recipes-core/initrdscripts/files/init-install-efi.sh +5
-3@@ -109,7 +109,11 @@ rm -f /etc/udev/scripts/mount* umount ${device}* 2> /dev/null || /bin/true mkdir -p /tmp -cat /proc/mounts > /etc/mtab + +# Create /etc/mtab if not present +if [ ! -e /etc/mtab ]; then + cat /proc/mounts > /etc/mtab +fi disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//") --1.8.4.5
ping..
This patch has not been merged and I believe the reason is that I did not label it as V2 (my fault). Instead, V1 [1] was merged (which is fine, it gives some message to the user).
[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=445c49ce5007eb0c0aa14680c41b79e7764d8882
Quoted 32 lines · On 08/03/2015 10:01 AM, [email protected] wrote:
From: Leonardo Sandoval <[email protected]>
The base-files recipe installs
/mnt/mtab(it is a softlink of/proc/mounts), so if an image includes the latter, there is no new to created it again inside theinstall-efi.shscript, otherwise an error may occur as indicated on the bug's site.[YOCTO #7971]
Signed-off-by Leonardo Sandoval <[email protected]>--- meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-)meta/recipes-core/initrdscripts/files/init-install-efi.sh +5
-1@@ -109,7 +109,11 @@ rm -f /etc/udev/scripts/mount* umount ${device}* 2> /dev/null || /bin/true mkdir -p /tmp -cat /proc/mounts > /etc/mtab + +# Create /etc/mtab if not present +if [ ! -e /etc/mtab ]; then + cat /proc/mounts > /etc/mtab +fi disk_size=$(parted ${device} unit mb print | grep Disk | cut -d" " -f 3 | sed -e "s/MB//")