From: Markus Volk <f_l_k@t-online.de>
To: luca.ceresoli@bootlin.com
Cc: openembedded-core@lists.openembedded.org
Subject: Re: [oe-core][PATCHv3] wic-imager-direct.py: use fstab update also for root device
Date: Wed, 08 Feb 2023 18:38:51 +0100 [thread overview]
Message-ID: <ROVRPR.FB1N8ZXIZPRS1@t-online.de> (raw)
In-Reply-To: <20230208134950.6f1f1064@booty>
[-- Attachment #1: Type: text/plain, Size: 4572 bytes --]
Hello Luca,
unfortunately I still have a qemu issue if running this test but I had
a look at the files it creates and the entry for the root partition in
/etc/fstab looks like this:
/dev/root / auto ro 1
0
Reasonable because it wants to check for read-only filesystem
if using the fstab-update this would be replaced by the default:
/dev/root / ext4 defaults 1 1
This is rw and i guess thats what makes the test fail.
Following this theory it should be a valid fix to just not use the
fstab update here ?
diff --git a/meta/lib/oeqa/selftest/cases/overlayfs.py
b/meta/lib/oeqa/selftest/cases/overlayfs.py
index dfd9f1486d..9b1538a16b 100644
--- a/meta/lib/oeqa/selftest/cases/overlayfs.py
+++ b/meta/lib/oeqa/selftest/cases/overlayfs.py
@@ -438,6 +438,7 @@ OVERLAYFS_ETC_DEVICE = "/dev/sda3"
configLower = """
OVERLAYFS_ETC_EXPOSE_LOWER = "1"
IMAGE_INSTALL:append = " overlayfs-user"
+WIC_CREATE_EXTRA_ARGS = "--no-fstab-update"
"""
testFile = "lower-layer-test.txt"
Am Mi, 8. Feb 2023 um 13:49:50 +0100 schrieb Luca Ceresoli via
lists.openembedded.org
<luca.ceresoli=bootlin.com@lists.openembedded.org>:
> Hello Markus,
>
> On Tue, 7 Feb 2023 13:44:56 +0100
> "Markus Volk" <f_l_k@t-online.de <mailto:f_l_k@t-online.de>> wrote:
>
>> wic imager is able to add entries for the partitions to fstab. This
>> patch also
>> creates an entry for the root device, which was previously ignored.
>> The root
>> device entry can now optionally be uuid or label based.
>>
>> The stock fstab file provided by base-files.bb already contains an
>> entry for the
>> root device. To avoid a duplicate entry in fstab, this '/dev/root'
>> line is removed
>> during the fstab update.
>>
>> The default /dev/root entry in base-files adds the value '1' for
>> dump and passno. Add an
>> argument to set dump, which formerly has been hardcoded to '0'.
>> Like this we can provide the
>> same settings if using the fstab_update.
>>
>> The result looks something like this:
>>
>> proc /proc proc defaults 0 0
>> devpts /dev/pts devpts mode=0620,ptmxmode=0666,gid=5 0 0
>> tmpfs /run tmpfs mode=0755,nodev,nosuid,strictatime 0 0
>> tmpfs /var/volatile tmpfs defaults 0 0
>>
>> UUID=055A-69B5 /boot vfat defaults 0 0
>> UUID=0eb2df23-3638-4bbf-b045-9a425cb45954 / ext4 defaults 1 1
>>
>> If neither '--on-disk' nor '--use-label' nor '--use-uuid' are set
>> in the wks file, wic falls
>> back to '/dev/sda' as the default device entry, which may or may
>> not be valid.
>> Avoid starting to guess if we don't know anything and just skip the
>> partition in that case,
>> except for the root partition where we add back '/dev/root' as a
>> reasonable default,
>> because we can rely on it in the yocto/oe environment.
>>
>> The result is now like this:
>>
>> proc /proc proc defaults
>> 0 0
>> devpts /dev/pts devpts
>> mode=0620,ptmxmode=0666,gid=5 0 0
>> tmpfs /run tmpfs
>> mode=0755,nodev,nosuid,strictatime 0 0
>> tmpfs /var/volatile tmpfs defaults
>> 0 0
>>
>> /dev/root / ext4 defaults 1 1
>>
>> Signed-off-by: Markus Volk <f_l_k@t-online.de
>> <mailto:f_l_k@t-online.de>>
>
> This patch is failing on the autobuilders:
>
> AssertionError: False is not true : /dev/sda2 on / type ext4
> (rw,relatime)
>
> and also this, even though I'm not sure how it relates to your
> changes:
>
> AssertionError: None is not true : diff: can't stat
> '/data/overlay-etc/lower/lower-layer-test.txt': No such file or
> directory
>
> Logs:
>
> <https://autobuilder.yoctoproject.org/typhoon/#/builders/79/builds/4780/steps/15/logs/stdio>
> <https://autobuilder.yoctoproject.org/typhoon/#/builders/80/builds/4725/steps/14/logs/stdio>
>
> --
> Luca Ceresoli, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com <https://bootlin.com/>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#176905):
> <https://lists.openembedded.org/g/openembedded-core/message/176905>
> Mute This Topic: <https://lists.openembedded.org/mt/96806003/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: 6539 bytes --]
prev parent reply other threads:[~2023-02-08 17:39 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-02-07 12:44 [oe-core][PATCHv3] wic-imager-direct.py: use fstab update also for root device Markus Volk
2023-02-08 12:49 ` Luca Ceresoli
2023-02-08 17:38 ` Markus Volk [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ROVRPR.FB1N8ZXIZPRS1@t-online.de \
--to=f_l_k@t-online.de \
--cc=luca.ceresoli@bootlin.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.