All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] init-install-efi.sh: Avoid /mnt/mtab creation if already present
@ 2015-08-03 15:01 leonardo.sandoval.gonzalez
  2015-08-21 20:02 ` Benjamin Esquivel
  2015-09-02 19:19 ` Leonardo Sandoval
  0 siblings, 2 replies; 4+ messages in thread
From: leonardo.sandoval.gonzalez @ 2015-08-03 15:01 UTC (permalink / raw)
  To: openembedded-core

From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>

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]

Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
---
 meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
index f339b30..665d04a 100644
--- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
+++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
@@ -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



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] init-install-efi.sh: Avoid /mnt/mtab creation if already present
  2015-08-03 15:01 [PATCH] init-install-efi.sh: Avoid /mnt/mtab creation if already present leonardo.sandoval.gonzalez
@ 2015-08-21 20:02 ` Benjamin Esquivel
  2015-08-25 14:25   ` Leonardo Sandoval
  2015-09-02 19:19 ` Leonardo Sandoval
  1 sibling, 1 reply; 4+ messages in thread
From: Benjamin Esquivel @ 2015-08-21 20:02 UTC (permalink / raw)
  To: leonardo.sandoval.gonzalez, openembedded-core, georgex.l.musat

Hi Leo, this fix looks good to me, can you mention how did you test
this?

On Mon, 2015-08-03 at 15:01 +0000,
leonardo.sandoval.gonzalez@linux.intel.com wrote:
> From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
> 
> 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]
> 
> Signed-off-by: Leonardo Sandoval <
> leonardo.sandoval.gonzalez@linux.intel.com>
> ---
>  meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-core/initrdscripts/files/init-install
> -efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
> index f339b30..665d04a 100644
> --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
> +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
> @@ -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
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] init-install-efi.sh: Avoid /mnt/mtab creation if already present
  2015-08-21 20:02 ` Benjamin Esquivel
@ 2015-08-25 14:25   ` Leonardo Sandoval
  0 siblings, 0 replies; 4+ messages in thread
From: Leonardo Sandoval @ 2015-08-25 14:25 UTC (permalink / raw)
  To: benjamin.esquivel, openembedded-core, georgex.l.musat

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.


On 08/21/2015 03:02 PM, Benjamin Esquivel wrote:
> Hi Leo, this fix looks good to me, can you mention how did you test
> this?
>
> On Mon, 2015-08-03 at 15:01 +0000,
> leonardo.sandoval.gonzalez@linux.intel.com wrote:
>> From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
>>
>> 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]
>>
>> Signed-off-by: Leonardo Sandoval <
>> leonardo.sandoval.gonzalez@linux.intel.com>
>> ---
>>   meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++-
>>   1 file changed, 5 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/initrdscripts/files/init-install
>> -efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
>> index f339b30..665d04a 100644
>> --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
>> +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
>> @@ -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
>>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] init-install-efi.sh: Avoid /mnt/mtab creation if already present
  2015-08-03 15:01 [PATCH] init-install-efi.sh: Avoid /mnt/mtab creation if already present leonardo.sandoval.gonzalez
  2015-08-21 20:02 ` Benjamin Esquivel
@ 2015-09-02 19:19 ` Leonardo Sandoval
  1 sibling, 0 replies; 4+ messages in thread
From: Leonardo Sandoval @ 2015-09-02 19:19 UTC (permalink / raw)
  To: openembedded-core

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

On 08/03/2015 10:01 AM, leonardo.sandoval.gonzalez@linux.intel.com wrote:
> From: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
>
> 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]
>
> Signed-off-by: Leonardo Sandoval <leonardo.sandoval.gonzalez@linux.intel.com>
> ---
>   meta/recipes-core/initrdscripts/files/init-install-efi.sh | 6 +++++-
>   1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/meta/recipes-core/initrdscripts/files/init-install-efi.sh b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
> index f339b30..665d04a 100644
> --- a/meta/recipes-core/initrdscripts/files/init-install-efi.sh
> +++ b/meta/recipes-core/initrdscripts/files/init-install-efi.sh
> @@ -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//")
>
>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-09-02 19:18 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-08-03 15:01 [PATCH] init-install-efi.sh: Avoid /mnt/mtab creation if already present leonardo.sandoval.gonzalez
2015-08-21 20:02 ` Benjamin Esquivel
2015-08-25 14:25   ` Leonardo Sandoval
2015-09-02 19:19 ` Leonardo Sandoval

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.