* [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts
@ 2013-07-31 8:19 Chunrong Guo
2013-07-31 8:46 ` ChenQi
2013-07-31 9:57 ` Phil Blundell
0 siblings, 2 replies; 6+ messages in thread
From: Chunrong Guo @ 2013-07-31 8:19 UTC (permalink / raw)
To: openembedded-core
*If /etc/mtab is a symlink to /proc/self/mounts,
mounting fails because addmntent returns an error.
As a consequence, the Private directory is unusable
because /proc/self/mounts is read-only feature.
Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
meta/recipes-core/base-files/base-files_3.0.14.bb | 1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 054fefa..1843bdd 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -100,7 +100,6 @@ do_install () {
install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
- ln -sf /proc/mounts ${D}${sysconfdir}/mtab
}
do_install_basefilesissue () {
--
1.7.5.4
^ permalink raw reply related [flat|nested] 6+ messages in thread* Re: [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts
2013-07-31 8:19 [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts Chunrong Guo
@ 2013-07-31 8:46 ` ChenQi
2013-07-31 9:04 ` Stanacar, StefanX
2013-07-31 9:16 ` Guo Chunrong-B40290
2013-07-31 9:57 ` Phil Blundell
1 sibling, 2 replies; 6+ messages in thread
From: ChenQi @ 2013-07-31 8:46 UTC (permalink / raw)
To: openembedded-core
On 07/31/2013 04:19 PM, Chunrong Guo wrote:
> *If /etc/mtab is a symlink to /proc/self/mounts,
> mounting fails because addmntent returns an error.
> As a consequence, the Private directory is unusable
> because /proc/self/mounts is read-only feature.
Could you please detail your environment a little bit?
Where does this error come from?
Besides, if you're going to make this change, please take a read-only
rootfs into consideration. There should be more to fix.
Best Regards,
Chen Qi
> Signed-off-by: Chunrong Guo <B40290@freescale.com>
> ---
> meta/recipes-core/base-files/base-files_3.0.14.bb | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index 054fefa..1843bdd 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -100,7 +100,6 @@ do_install () {
> install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
> install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
>
> - ln -sf /proc/mounts ${D}${sysconfdir}/mtab
> }
>
> do_install_basefilesissue () {
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts
2013-07-31 8:46 ` ChenQi
@ 2013-07-31 9:04 ` Stanacar, StefanX
2013-07-31 9:16 ` Guo Chunrong-B40290
1 sibling, 0 replies; 6+ messages in thread
From: Stanacar, StefanX @ 2013-07-31 9:04 UTC (permalink / raw)
To: openembedded-core@lists.openembedded.org
On Wed, 2013-07-31 at 16:46 +0800, ChenQi wrote:
> On 07/31/2013 04:19 PM, Chunrong Guo wrote:
> > *If /etc/mtab is a symlink to /proc/self/mounts,
> > mounting fails because addmntent returns an error.
> > As a consequence, the Private directory is unusable
> > because /proc/self/mounts is read-only feature.
>
> Could you please detail your environment a little bit?
> Where does this error come from?
>
I'm curios as well. Also can you please test this on a real hw? Try to
boot and/or install an image on atom-pc, I suspect it will fail.
Thanks,
Stefan
> Besides, if you're going to make this change, please take a read-only
> rootfs into consideration. There should be more to fix.
>
> Best Regards,
> Chen Qi
>
> > Signed-off-by: Chunrong Guo <B40290@freescale.com>
> > ---
> > meta/recipes-core/base-files/base-files_3.0.14.bb | 1 -
> > 1 files changed, 0 insertions(+), 1 deletions(-)
> >
> > diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > index 054fefa..1843bdd 100644
> > --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> > +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> > @@ -100,7 +100,6 @@ do_install () {
> > install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
> > install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
> >
> > - ln -sf /proc/mounts ${D}${sysconfdir}/mtab
> > }
> >
> > do_install_basefilesissue () {
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts
2013-07-31 8:46 ` ChenQi
2013-07-31 9:04 ` Stanacar, StefanX
@ 2013-07-31 9:16 ` Guo Chunrong-B40290
2013-07-31 14:26 ` Mark Hatle
1 sibling, 1 reply; 6+ messages in thread
From: Guo Chunrong-B40290 @ 2013-07-31 9:16 UTC (permalink / raw)
To: ChenQi, openembedded-core@lists.openembedded.org
Hello,
I add libhugetlbfs package into my rootfs and run the below command in my board .
root@p1021rdb:~# hugeadm --create-mounts
hugeadm:WARNING: Unable to add entry /var/lib/hugetlbfs/pagesize-4MB to /etc/mtab, error: Invalid argument
hugeadm:WARNING: Unable to add entry /var/lib/hugetlbfs/pagesize-16MB to /etc/mtab, error: Invalid argument
root@p1022ds:~# ls /etc/mtab -l
lrwxrwxrwx 1 root root 12 Jul 31 07:28 /etc/mtab -> /proc/mounts
root@p1022ds:~# ls /proc/mounts
/proc/mounts
root@p1022ds:~# ls /proc/mounts -l
lrwxrwxrwx 1 root root 11 Jul 31 07:58 /proc/mounts -> self/mounts
thanks,
chunrong
-----Original Message-----
From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of ChenQi
Sent: Wednesday, July 31, 2013 4:47 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts
On 07/31/2013 04:19 PM, Chunrong Guo wrote:
> *If /etc/mtab is a symlink to /proc/self/mounts,
> mounting fails because addmntent returns an error.
> As a consequence, the Private directory is unusable
> because /proc/self/mounts is read-only feature.
Could you please detail your environment a little bit?
Where does this error come from?
Besides, if you're going to make this change, please take a read-only rootfs into consideration. There should be more to fix.
Best Regards,
Chen Qi
> Signed-off-by: Chunrong Guo <B40290@freescale.com>
> ---
> meta/recipes-core/base-files/base-files_3.0.14.bb | 1 -
> 1 files changed, 0 insertions(+), 1 deletions(-)
>
> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb
> b/meta/recipes-core/base-files/base-files_3.0.14.bb
> index 054fefa..1843bdd 100644
> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
> @@ -100,7 +100,6 @@ do_install () {
> install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
> install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
>
> - ln -sf /proc/mounts ${D}${sysconfdir}/mtab
> }
>
> do_install_basefilesissue () {
_______________________________________________
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core
^ permalink raw reply [flat|nested] 6+ messages in thread* Re: [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts
2013-07-31 9:16 ` Guo Chunrong-B40290
@ 2013-07-31 14:26 ` Mark Hatle
0 siblings, 0 replies; 6+ messages in thread
From: Mark Hatle @ 2013-07-31 14:26 UTC (permalink / raw)
To: openembedded-core
On 7/31/13 4:16 AM, Guo Chunrong-B40290 wrote:
> Hello,
>
> I add libhugetlbfs package into my rootfs and run the below command in my board .
> root@p1021rdb:~# hugeadm --create-mounts
> hugeadm:WARNING: Unable to add entry /var/lib/hugetlbfs/pagesize-4MB to /etc/mtab, error: Invalid argument
> hugeadm:WARNING: Unable to add entry /var/lib/hugetlbfs/pagesize-16MB to /etc/mtab, error: Invalid argument
This looks like the hugeadm may be broken in some way. The writing to the
mounts and behavior should be based on the way the standard mount does it.
If the hugeadm uses standard mount resources, then the entries it adds should
have showed up into the /proc/mounts automatically.
--Mark
> root@p1022ds:~# ls /etc/mtab -l
> lrwxrwxrwx 1 root root 12 Jul 31 07:28 /etc/mtab -> /proc/mounts
> root@p1022ds:~# ls /proc/mounts
> /proc/mounts
> root@p1022ds:~# ls /proc/mounts -l
> lrwxrwxrwx 1 root root 11 Jul 31 07:58 /proc/mounts -> self/mounts
>
>
>
> thanks,
> chunrong
>
>
>
> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org [mailto:openembedded-core-bounces@lists.openembedded.org] On Behalf Of ChenQi
> Sent: Wednesday, July 31, 2013 4:47 PM
> To: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts
>
> On 07/31/2013 04:19 PM, Chunrong Guo wrote:
>> *If /etc/mtab is a symlink to /proc/self/mounts,
>> mounting fails because addmntent returns an error.
>> As a consequence, the Private directory is unusable
>> because /proc/self/mounts is read-only feature.
>
> Could you please detail your environment a little bit?
> Where does this error come from?
>
> Besides, if you're going to make this change, please take a read-only rootfs into consideration. There should be more to fix.
>
> Best Regards,
> Chen Qi
>
>> Signed-off-by: Chunrong Guo <B40290@freescale.com>
>> ---
>> meta/recipes-core/base-files/base-files_3.0.14.bb | 1 -
>> 1 files changed, 0 insertions(+), 1 deletions(-)
>>
>> diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb
>> b/meta/recipes-core/base-files/base-files_3.0.14.bb
>> index 054fefa..1843bdd 100644
>> --- a/meta/recipes-core/base-files/base-files_3.0.14.bb
>> +++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
>> @@ -100,7 +100,6 @@ do_install () {
>> install -m 0644 ${WORKDIR}/host.conf ${D}${sysconfdir}/host.conf
>> install -m 0644 ${WORKDIR}/motd ${D}${sysconfdir}/motd
>>
>> - ln -sf /proc/mounts ${D}${sysconfdir}/mtab
>> }
>>
>> do_install_basefilesissue () {
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts
2013-07-31 8:19 [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts Chunrong Guo
2013-07-31 8:46 ` ChenQi
@ 2013-07-31 9:57 ` Phil Blundell
1 sibling, 0 replies; 6+ messages in thread
From: Phil Blundell @ 2013-07-31 9:57 UTC (permalink / raw)
To: Chunrong Guo; +Cc: openembedded-core
On Wed, 2013-07-31 at 16:19 +0800, Chunrong Guo wrote:
> *If /etc/mtab is a symlink to /proc/self/mounts,
> mounting fails because addmntent returns an error.
> As a consequence, the Private directory is unusable
> because /proc/self/mounts is read-only feature.
This looks like it will break anything with a READ_ONLY_ROOTFS since now
mtab won't exist and there will be no way for it to get created.
I'm not quite sure I understand what problem you're trying to fix (since
I can't immediately think of any situation where calling addmntent() is
a sensible thing to do) but, whatever the problem is, I don't think that
unilaterally removing /etc/mtab is a good way to go about fixing it.
p.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2013-07-31 14:26 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-31 8:19 [PATCH] base-files: remove symbolic link from /etc/mtab to /proc/mounts Chunrong Guo
2013-07-31 8:46 ` ChenQi
2013-07-31 9:04 ` Stanacar, StefanX
2013-07-31 9:16 ` Guo Chunrong-B40290
2013-07-31 14:26 ` Mark Hatle
2013-07-31 9:57 ` Phil Blundell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox