* [meta-oe][PATCH] wic/direct.py: ignore root mountpoint in fstab updater
@ 2022-07-27 13:45 Markus Volk
2022-07-27 15:44 ` [OE-core] " Ross Burton
0 siblings, 1 reply; 6+ messages in thread
From: Markus Volk @ 2022-07-27 13:45 UTC (permalink / raw)
To: openembedded-core; +Cc: Markus Volk
We already have a root entry in fstab. This commit prevents processing root
mountpoint in fstab_updater and thus avoids duplicate entries for root in fstab.
Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
scripts/lib/wic/plugins/imager/direct.py | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
index c44159b235..75004ab320 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -117,7 +117,8 @@ class DirectPlugin(ImagerPlugin):
updated = False
for part in self.parts:
if not part.realnum or not part.mountpoint \
- or not part.mountpoint.startswith('/'):
+ or not part.mountpoint.startswith('/') \
+ or part.mountpoint == "/":
continue
if part.use_uuid:
--
2.34.1
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [OE-core] [meta-oe][PATCH] wic/direct.py: ignore root mountpoint in fstab updater
2022-07-27 13:45 [meta-oe][PATCH] wic/direct.py: ignore root mountpoint in fstab updater Markus Volk
@ 2022-07-27 15:44 ` Ross Burton
2022-07-27 16:31 ` Markus Volk
[not found] ` <1705BCB17DD12169.1380@lists.openembedded.org>
0 siblings, 2 replies; 6+ messages in thread
From: Ross Burton @ 2022-07-27 15:44 UTC (permalink / raw)
To: f_l_k; +Cc: openembedded-core
This looks like a fix for https://bugzilla.yoctoproject.org/show_bug.cgi?id=14865, can you confirm that?
Ross
> On 27 Jul 2022, at 14:45, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote:
>
> We already have a root entry in fstab. This commit prevents processing root
> mountpoint in fstab_updater and thus avoids duplicate entries for root in fstab.
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
> scripts/lib/wic/plugins/imager/direct.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/scripts/lib/wic/plugins/imager/direct.py b/scripts/lib/wic/plugins/imager/direct.py
> index c44159b235..75004ab320 100644
> --- a/scripts/lib/wic/plugins/imager/direct.py
> +++ b/scripts/lib/wic/plugins/imager/direct.py
> @@ -117,7 +117,8 @@ class DirectPlugin(ImagerPlugin):
> updated = False
> for part in self.parts:
> if not part.realnum or not part.mountpoint \
> - or not part.mountpoint.startswith('/'):
> + or not part.mountpoint.startswith('/') \
> + or part.mountpoint == "/":
> continue
>
> if part.use_uuid:
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#168561): https://lists.openembedded.org/g/openembedded-core/message/168561
> Mute This Topic: https://lists.openembedded.org/mt/92649199/6875888
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [ross.burton@arm.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [meta-oe][PATCH] wic/direct.py: ignore root mountpoint in fstab updater
2022-07-27 15:44 ` [OE-core] " Ross Burton
@ 2022-07-27 16:31 ` Markus Volk
[not found] ` <1705BCB17DD12169.1380@lists.openembedded.org>
1 sibling, 0 replies; 6+ messages in thread
From: Markus Volk @ 2022-07-27 16:31 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2058 bytes --]
Yes. With the patch the warning disappears from dmesg
Am Mi, 27. Jul 2022 um 15:44:48 +0000 schrieb Ross Burton
<ross.burton@arm.com>:
> This looks like a fix for
> <https://bugzilla.yoctoproject.org/show_bug.cgi?id=14865>, can you
> confirm that?
>
> Ross
>
>> On 27 Jul 2022, at 14:45, Markus Volk via lists.openembedded.org
>> <f_l_k=t-online.de@lists.openembedded.org
>> <mailto:f_l_k=t-online.de@lists.openembedded.org>> wrote:
>>
>> We already have a root entry in fstab. This commit prevents
>> processing root
>> mountpoint in fstab_updater and thus avoids duplicate entries for
>> root in fstab.
>>
>> Signed-off-by: Markus Volk <f_l_k@t-online.de
>> <mailto:f_l_k@t-online.de>>
>> ---
>> scripts/lib/wic/plugins/imager/direct.py | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/scripts/lib/wic/plugins/imager/direct.py
>> b/scripts/lib/wic/plugins/imager/direct.py
>> index c44159b235..75004ab320 100644
>> --- a/scripts/lib/wic/plugins/imager/direct.py
>> +++ b/scripts/lib/wic/plugins/imager/direct.py
>> @@ -117,7 +117,8 @@ class DirectPlugin(ImagerPlugin):
>> updated = False
>> for part in self.parts:
>> if not part.realnum or not part.mountpoint \
>> - or not part.mountpoint.startswith('/'):
>> + or not part.mountpoint.startswith('/') \
>> + or part.mountpoint == "/":
>> continue
>>
>> if part.use_uuid:
>> --
>> 2.34.1
>>
>>
>>
>>
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#168572):
> <https://lists.openembedded.org/g/openembedded-core/message/168572>
> Mute This Topic: <https://lists.openembedded.org/mt/92649199/3618223>
> Group Owner: openembedded-core+owner@lists.openembedded.org
> <mailto:openembedded-core+owner@lists.openembedded.org>
> Unsubscribe:
> <https://lists.openembedded.org/g/openembedded-core/unsub>
> [f_l_k@t-online.de <mailto:f_l_k@t-online.de>]
> -=-=-=-=-=-=-=-=-=-=-=-
>
[-- Attachment #2: Type: text/html, Size: 2532 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [meta-oe][PATCH] wic/direct.py: ignore root mountpoint in fstab updater
[not found] ` <1705BCB17DD12169.1380@lists.openembedded.org>
@ 2022-07-27 17:04 ` Markus Volk
2022-07-28 16:15 ` Ross Burton
0 siblings, 1 reply; 6+ messages in thread
From: Markus Volk @ 2022-07-27 17:04 UTC (permalink / raw)
To: Ross Burton; +Cc: openembedded-core
[-- Attachment #1: Type: text/plain, Size: 2243 bytes --]
But looking at the commit that introduced the problem, I see that it
completely undoes it.
In general, I like the idea of having the fstab_updater create the root
entry, but for this to work without duplication, the /dev/root entry
would have to be removed from fstab.
This would force any wic image to use the fstab_updater (which can also
be disabled) and would otherwise result in an fstab file with no root
entry.
Probably removing the /dev/root entry would also break the boot of
images that do not use wic
Translated with www.DeepL.com/Translator (free version)
Am Mi, 27. Jul 2022 um 18:31:38 +0200 schrieb Markus Volk
<f_l_k@t-online.de>:
> Yes. With the patch the warning disappears from dmesg
>
> Am Mi, 27. Jul 2022 um 15:44:48 +0000 schrieb Ross Burton
> <ross.burton@arm.com>:
>> This looks like a fix for
>> <https://bugzilla.yoctoproject.org/show_bug.cgi?id=14865>, can you
>> confirm that?
>>
>> Ross
>>
>>> On 27 Jul 2022, at 14:45, Markus Volk via lists.openembedded.org
>>> <f_l_k=t-online.de@lists.openembedded.org
>>> <mailto:f_l_k=t-online.de@lists.openembedded.org>> wrote:
>>>
>>> We already have a root entry in fstab. This commit prevents
>>> processing root
>>> mountpoint in fstab_updater and thus avoids duplicate entries for
>>> root in fstab.
>>>
>>> Signed-off-by: Markus Volk <f_l_k@t-online.de
>>> <mailto:f_l_k@t-online.de>>
>>> ---
>>> scripts/lib/wic/plugins/imager/direct.py | 3 ++-
>>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/scripts/lib/wic/plugins/imager/direct.py
>>> b/scripts/lib/wic/plugins/imager/direct.py
>>> index c44159b235..75004ab320 100644
>>> --- a/scripts/lib/wic/plugins/imager/direct.py
>>> +++ b/scripts/lib/wic/plugins/imager/direct.py
>>> @@ -117,7 +117,8 @@ class DirectPlugin(ImagerPlugin):
>>> updated = False
>>> for part in self.parts:
>>> if not part.realnum or not part.mountpoint \
>>> - or not part.mountpoint.startswith('/'):
>>> + or not part.mountpoint.startswith('/') \
>>> + or part.mountpoint == "/":
>>> continue
>>>
>>> if part.use_uuid:
>>> --
>>> 2.34.1
>>>
>>>
>>>
>>>
>>
>>
>>
>>
[-- Attachment #2: Type: text/html, Size: 2676 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [meta-oe][PATCH] wic/direct.py: ignore root mountpoint in fstab updater
2022-07-27 17:04 ` Markus Volk
@ 2022-07-28 16:15 ` Ross Burton
2022-08-02 14:05 ` Markus Volk
0 siblings, 1 reply; 6+ messages in thread
From: Ross Burton @ 2022-07-28 16:15 UTC (permalink / raw)
To: f_l_k, tobiasschmidl; +Cc: openembedded-core
Added Tobias to distribution list as this is about a patch he sent.
On 27 Jul 2022, at 18:04, Markus Volk via lists.openembedded.org <f_l_k=t-online.de@lists.openembedded.org> wrote:
>
> But looking at the commit that introduced the problem, I see that it completely undoes it.
> In general, I like the idea of having the fstab_updater create the root entry, but for this to work without duplication, the /dev/root entry would have to be removed from fstab.
> This would force any wic image to use the fstab_updater (which can also be disabled) and would otherwise result in an fstab file with no root entry.
> Probably removing the /dev/root entry would also break the boot of images that do not use wic
Tobias, looks like we’ve found a problem with your wic patch from May:
https://git.openembedded.org/openembedded-core/commit/?h=20d43a2599d7622b96e2fb0da87a886da1a3794a
Specifically, this bug:
https://bugzilla.yoctoproject.org/show_bug.cgi?id=14865
It’s looking like the easiest fix here is to revert your patch, so at least we don’t have warnings and unexpected behaviour on boot. Unless you’re willing to rework your patch so that it allows edits to the root mount point but doesn’t end up creating duplicates?
Thanks,
Ross
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [OE-core] [meta-oe][PATCH] wic/direct.py: ignore root mountpoint in fstab updater
2022-07-28 16:15 ` Ross Burton
@ 2022-08-02 14:05 ` Markus Volk
0 siblings, 0 replies; 6+ messages in thread
From: Markus Volk @ 2022-08-02 14:05 UTC (permalink / raw)
To: Ross Burton; +Cc: tobiasschmidl, openembedded-core
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
Maybe we could do like this in base-files.bb ?
FSTAB_HAVE_WIC = "${@bb.utils.contains('IMAGE_FSTYPES', 'wic', 'true',
'false', d)}"
FSTAB_WIC_UPDATER = "${@bb.utils.contains('WIC_CREATE_EXTRA_ARGS',
'--no-fstab-update', 'false', 'true', d)}"
do_install:append() {
if [ ${FSTAB_HAVE_WIC} = true ] && [ ${FSTAB_WIC_UPDATER} = true ];
then
sed -i '/\/dev\/root/d' ${D}${sysconfdir}/fstab
fi
}
This would remove the hardcoded '/dev/root' entry if all conditions
are met to add the root entry with wic fstab-update
> \rIt’s looking like the easiest fix here is to revert your patch, so
> at least we don’t have warnings and unexpected behaviour on boot.
> Unless you’re willing to rework your patch so that it allows edits
> to the root mount point but doesn’t end up creating duplicates?
[-- Attachment #2: Type: text/html, Size: 1299 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2022-08-02 14:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 13:45 [meta-oe][PATCH] wic/direct.py: ignore root mountpoint in fstab updater Markus Volk
2022-07-27 15:44 ` [OE-core] " Ross Burton
2022-07-27 16:31 ` Markus Volk
[not found] ` <1705BCB17DD12169.1380@lists.openembedded.org>
2022-07-27 17:04 ` Markus Volk
2022-07-28 16:15 ` Ross Burton
2022-08-02 14:05 ` Markus Volk
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.