From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7108629846932062208 X-Received: by 2002:a17:90b:3b81:b0:202:597a:c71d with SMTP id pc1-20020a17090b3b8100b00202597ac71dmr34602180pjb.105.1664179012318; Mon, 26 Sep 2022 00:56:52 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:90a:7144:b0:200:8151:e64c with SMTP id g4-20020a17090a714400b002008151e64cls6821095pjs.0.-pod-control-gmail; Mon, 26 Sep 2022 00:56:51 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6wN1/0mgp5oFWwoyBGLOwQ1o7h5/oIkF6C3koGa4g6pHs30jVEUZifAgd1lMsB1Rw1PqMf X-Received: by 2002:a17:903:25d3:b0:176:e9d3:64bc with SMTP id jc19-20020a17090325d300b00176e9d364bcmr20578779plb.45.1664179011295; Mon, 26 Sep 2022 00:56:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664179011; cv=none; d=google.com; s=arc-20160816; b=Kbh1pteSS1EA9Qc4xRPr9rfDE4ttJdr0frzsXj3rETJUsSnLUYc2M28Hxxa3hqdtMl kSGToSiMebm+xlKysG0yOVuHGLPBnUzUcmL32cFZJYeukhOIBzmM6VEk2VCgUrJL9cd7 EIuwCbxa076EmhuJf7lWyjuD+UZH6VYDhwdEsER9kIxbz2gIgik5SGqTXoQtv/l+i2aW PY7SdOJn120GeyDqR2IGZ+yXenIYawkAUaXj6Zfj6Kn5agnj5yYkCcJ2k50XXSsoVzVm Se3Ponki/m7D+edW656rwx2gV+LPyuomPc+Fj9Dfx8uJn+CeLHaZto7atfbncuMyQ9v3 /eJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:content-transfer-encoding:content-language :accept-language:in-reply-to:references:message-id:date:thread-index :thread-topic:subject:cc:to:from:ironport-sdr; bh=hHA4wIrXk3sdPTnlVZvz6v7aSlqAcwu1W64eUy74Y8U=; b=LL54OUYOh5PWlY3xOJ8rhD8b63s5rcBHWCi4AXzfvs6536Jo2EbO8rK2SxGnRnr85e qJoXvg8QkLqaVBkp7aPIgMlDNCY4T+bLg7ZIX1C5sMQXS1dVNK1AN1bLoSxOYGGUUmGA wC97qMIkGjL6g0vsEUuyAO3OVdE86wL35ktOWLK8nBEuWYWBf62H0/H7Hqx0bETEqOBh +hWRl0YXvA3Sx80drxXB4xn7tQRqmNi9WHR62/AgTn9jdtiLymKL3NZ3DrsN1wiFpprL kIEFm3BKvpSk9mS40/zem5f+NDj5xV74QJUdj/QPWE4zwy1GHP2aSUzRkjFsqJg5YjlI LKaw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa2.mentor.iphmx.com (esa2.mentor.iphmx.com. [68.232.141.98]) by gmr-mx.google.com with ESMTPS id n2-20020a170902f60200b00178112d1196si573890plg.4.2022.09.26.00.56.51 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Sep 2022 00:56:51 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) client-ip=68.232.141.98; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.141.98 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com X-IronPort-AV: E=Sophos;i="5.93,345,1654588800"; d="scan'208";a="83673516" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa2.mentor.iphmx.com with ESMTP; 25 Sep 2022 23:56:50 -0800 IronPort-SDR: 59beIBFk+dik3u+RUdSnPiDb5YkQZARQHnCdLJugTEVJHzx1RtDU9gJbfiPH5cTPiLnFSGZUbf 84PN7vIB8gCa8i2S3l5Chedoj9Kem3Wc/5g9fBU9zn1C7up4vyxQP3CA84FSlW+8KcZOQL2OwQ xBHtH/kUjNSxOIKm0Lp+pjNcfGcDYKLEFa/9fXvlwCXDDcxdX4O6vYtRdIVcwh/YzzmDTY59BD vgoVmYVjO1xt8G2RoV7IcA5tIRoMnwM1sU84DSYFIAx5wr8TGu2KKrVmooWHqPTpquHB1Y/NNv GL4= From: "Kanagarajan, Vijaikumar" To: Henning Schild , "felix.moessbauer@siemens.com" , "jan.kiszka@siemens.com" CC: "isar-users@googlegroups.com" Subject: RE: [PATCH v2 2/2] wic: Update to the latest revision Thread-Topic: [PATCH v2 2/2] wic: Update to the latest revision Thread-Index: AQHYfvrNjxcm/IOVjEqBYz97LelxMa1Nf+UA//+ObwCABgyv8ICe7lSA//+/hACAAIhPgIAAHm+A//+M0UA= Date: Mon, 26 Sep 2022 07:56:48 +0000 Message-ID: <7d23828243444e90afd49e7bb23717dc@mentor.com> References: <20220613075401.2059119-1-Vijaikumar_Kanagarajan@mentor.com> <20220613075401.2059119-3-Vijaikumar_Kanagarajan@mentor.com> <20220613110206.0fa05e12@md1za8fc.ad001.siemens.net> <476c6e8a8687499a85fced0e07299815@mentor.com> <8babb01d7eae44e0b9faecad59cdc1d4@mentor.com> <6157334379c44f8b938983d5c4dfd8b1@mentor.com> <20220926094138.36c36a30@md1za8fc.ad001.siemens.net> In-Reply-To: <20220926094138.36c36a30@md1za8fc.ad001.siemens.net> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [147.34.91.1] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-TUID: UD6lG0z3vF0u > -----Original Message----- > From: Henning Schild > Sent: 26 September 2022 13:17 > To: felix.moessbauer@siemens.com; Kanagarajan, Vijaikumar > ; jan.kiszka@siemens.com > Cc: isar-users@googlegroups.com > Subject: Re: [PATCH v2 2/2] wic: Update to the latest revision >=20 > Am Mon, 26 Sep 2022 07:57:41 +0200 > schrieb "Moessbauer, Felix (T CED SES-DE)" > : >=20 > > > -----Original Message----- > > > From: Kanagarajan, Vijaikumar > > > Sent: Monday, September 26, 2022 12:53 PM > > > To: Moessbauer, Felix (T CED SES-DE) > ; > > > Schild, Henning (T CED SES-DE) Cc: > > > Kiszka, Jan (T CED) ; isar- > > > users@googlegroups.com > > > Subject: RE: [PATCH v2 2/2] wic: Update to the latest revision > > > > > > > > > > > > > -----Original Message----- > > > > From: Moessbauer, Felix (T CED SES-DE) > > > > Sent: 26 September 2022 07:11 > > > > To: Kanagarajan, Vijaikumar ; > > > > Schild, Henning (T CED SES-DE) > > > > Cc: Kiszka, Jan (T CED) ; isar- > > > > users@googlegroups.com > > > > Subject: RE: [PATCH v2 2/2] wic: Update to the latest revision > > > > > > > > Hi Vijai & Henning, > > > > > > > > Are there any news on this? > > > > I just discovered that still many (if not all) of our images are > > > > affected by this bug. > > > > > > Hi Felix, > > > > > > Unfortunately not. If we already have the latest wic, > > > --no-fstab-update[1] might help.(untested). > > > > We already have a wic version with this option, but it doesn't look > > right to add it to the root partition. Instead this option can be used > > for partitions that should not show up in the fstab at all. >=20 > We do want the one from WIC. It is only coming since we patched WIC to > support /. >=20 > > Indeed, the fstab entry has to be set by WIC to set settings like UUID > > and filesystem. But this requires that we either remove the entry set > > by ISAR in image_configure_fstab, or we remove the entry after > > generating the rootfs, but before WIC. >=20 > I think we should try and remove the entry from that template. It should = not > be required. >=20 > If we decide to solve the problem somewhere in/with WIC, we should do > that upstream in OE. They have the same "we now have two" problem, > where wic adds on top of a template instead of replacing the original. This seems to me like the approach we should take. Make wic replace entries= in fstab instead of appending to them like how it does now. Thanks, Vijai Kumar K >=20 > Henning >=20 > > Opinions? @Kiszka, Jan (T CED) > > > > Felix > > > > > > > > Thanks, > > > Vijai Kumar K > > > > > > > > > > > While it is not serios, having error messages in the journal is > > > > still pretty bad: systemd-fstab-generator[1491]: Failed to create > > > > unit file /run/systemd/generator/-.mount, as it already exists. > > > > Duplicate entry in /etc/fstab? > > > > > > > > Felix > > > > > > > > > -----Original Message----- > > > > > From: isar-users@googlegroups.com users@googlegroups.com> > > > > > On Behalf Of Kanagarajan, Vijaikumar > > > > > Sent: Friday, June 17, 2022 1:46 PM > > > > > To: isar-users@googlegroups.com > > > > > Cc: Kiszka, Jan (T CED) ; Schild, > > > > > Henning (T CED SES- > > > > > DE) > > > > > Subject: RE: [PATCH v2 2/2] wic: Update to the latest revision > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > From: Kanagarajan, Vijaikumar > > > > > > Sent: 13 June 2022 14:48 > > > > > > To: 'Henning Schild' > > > > > > Cc: isar-users@googlegroups.com; jan.kiszka@siemens.com > > > > > > Subject: RE: [PATCH v2 2/2] wic: Update to the latest revision > > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Henning Schild > > > > > > > Sent: 13 June 2022 14:32 > > > > > > > To: Kanagarajan, Vijaikumar > > > > > > > Cc: > > > > > > > isar-users@googlegroups.com; jan.kiszka@siemens.com > > > > > > > Subject: Re: [PATCH v2 2/2] wic: Update to the latest > > > > > > > revision > > > > > > > > > > > > > > Am Mon, 13 Jun 2022 13:24:01 +0530 schrieb Vijai Kumar K > > > > > > > : > > > > > > > > > > > > > > > Update to the latest wic from OE-core. > > > > > > > > > > > > > > > > OE-core Revision: > 06ed2aa93fc25a681e3a00ee120d9395b04845da > > > > > > > > > > > > > > > > Signed-off-by: Vijai Kumar K > > > > > > > > > > > > --- > > > > > > > > RECIPE-API-CHANGELOG.md | 19 > > > > > > > > +++++++++++++++++++ scripts/lib/wic/help.py > > > > > > > > | 6 ++++++ scripts/lib/wic/ksparser.py | > > > > > > > > 1 + scripts/lib/wic/partition.py | 1 + > > > > > > > > scripts/lib/wic/plugins/imager/direct.py | 5 +++-- > > > > > > > > 5 files changed, 30 insertions(+), 2 deletions(-) > > > > > > > > > > > > > > > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API- > > > > CHANGELOG.md > > > > > > > index > > > > > > > > 2998824..436b204 100644 > > > > > > > > --- a/RECIPE-API-CHANGELOG.md > > > > > > > > +++ b/RECIPE-API-CHANGELOG.md > > > > > > > > @@ -406,3 +406,22 @@ groups are now created after all > > > > > > > > packages are installed. > > > > > > > > Changes in next > > > > > > > > --------------- > > > > > > > > + > > > > > > > > +### Wic adds / mountpoint to fstab > > > > > > > > + > > > > > > > > +In the older version of wic, any mount point named / is > > > > > > > > +skipped from > > > > > > > > adding +into the fstab entry. > > > > > > > > + > > > > > > > > +With the latest wic, this is not the case. / mount > > > > > > > > point, if +any, is > > > > > > > > added +to /etc/fstab for automount. > > > > > > > > + > > > > > > > > +Any wks file which assumed that / would be skipped from > > > > > > > > +/etc/fstab > > > > > > > > should +now be corrected. Otherwise, it might result in > > > > > > > > multiple / entries in /etc/fstab. +One by the > > > > > > > > image_configure_fstab function from image class and one by > > > > > > > > wic. + > > > > > > > > +Below is an example wks entry that might cause an issue. > > > > > > > > +Replace "part /" with "part" to avoid adding duplicate > > > > > > > > entry for /. > > > > > > > > > > > > > > I am not sure multiple entries would be an issue, i think > > > > > > > the last one will simply always win. It is good to have a > > > > > > > note about that change, but i doubt people really have to do > > > > > > > anything. And if anything has to be done, isar should drop > > > > > > > the first one centrally. > > > > > > > > > > > > > > The fstab entry for root is purely for adding some weird > > > > > > > mount options, usually root is not mounted with fstab but > > > > > > > with cmdline and initrd. And not having / in fstab just > > > > > > > makes that rootfs more generic ... it can become part of nfs > > > > > > > and next guy takes it as btrfs while next guy > > > > > > takes it as ext4. > > > > > > > > > > > > > > Note is good, advise is not > > > > > > > > > > > > Noted. Will change the text accordingly in V3. > > > > > > > > > > Ok we cannot drop / mountpoint name(though optional). We would > > > > > be > > > > lose > > > > > the ability to find out UUID of root using rootdev api. > > > > > This is used by some plugins. So the better way would be to use > > > > > the --no-fstab- update. Seems like we can set them per partition > > > > > now. > > > > > > > > > > Thanks, > > > > > Vijai Kumar K > > > > > > > > > > > > > > > > > Thanks, > > > > > > Vijai Kumar K > > > > > > > > > > > > > > > > > > > > Henning > > > > > > > > > > > > > > > + > > > > > > > > +``` > > > > > > > > +part / --source rootfs --ondisk sda --fstype ext4 --label > > > > > > > > +platform > > > > > > > > --align 1024 --use-uuid +``` diff --git > > > > > > > > a/scripts/lib/wic/help.py b/scripts/lib/wic/help.py index > > > > > > > > 4ff7470..73e3380 100644 > > > > > > > > --- a/scripts/lib/wic/help.py > > > > > > > > +++ b/scripts/lib/wic/help.py > > > > > > > > @@ -940,6 +940,12 @@ DESCRIPTION > > > > > > > > quotes. If not specified, the > > > > > > > > default string is "defaults". > > > > > > > > > > > > > > > > + --fspassno: Specifies the order in which > > > > > > > > filesystem > > > > > > > > + checks > > > > > > > > are done > > > > > > > > + at boot time by fsck. See fs_passno > > > > > > > > + parameter > > > > > > > > of > > > > > > > > + fstab(5). This parameter will be > > > > > > > > copied > > > > > > > > + into > > > > > > > > the > > > > > > > > + /etc/fstab file of the installed > > > > > > > > system. If not > > > > > > > > + specified the default value of "0" > > > > > > > > will be used. + > > > > > > > > --label label: Specifies the label to give to > > > > > > > > the filesystem to be made on the partition. If the given > > > > > > > > label is already in use by > > > > > > > > another filesystem, diff --git > > > > > > > > a/scripts/lib/wic/ksparser.py > > > > > > > > b/scripts/lib/wic/ksparser.py index 0df9eb0..a49b7b9 > > > > > > > > 100644 --- a/scripts/lib/wic/ksparser.py +++ > > > > > > > > b/scripts/lib/wic/ksparser.py @@ -155,6 +155,7 @@ class > > > > > > > > KickStart(): part.add_argument('--change-directory') > > > > > > > > part.add_argument("--extra-space", > > > > > > > > type=3Dsizetype("M")) part.add_argument('--fsoptions', > > > > > > > > dest=3D'fsopts') > > > > > > > > + part.add_argument('--fspassno', dest=3D'fspassno') > > > > > > > > part.add_argument('--fstype', default=3D'vfat', > > > > > > > > choices=3D('ext2', 'ext3', > > > > > > > > 'ext4', 'btrfs', 'squashfs', 'vfat', 'msdos', 'erofs', > > > > > > > > diff --git a/scripts/lib/wic/partition.py > > > > > > > > b/scripts/lib/wic/partition.py index 09e491d..e50871b > > > > > > > > 100644 --- a/scripts/lib/wic/partition.py +++ > > > > > > > > b/scripts/lib/wic/partition.py @@ -33,6 +33,7 @@ class > > > > > > > > Partition(): self.include_path =3D args.include_path > > > > > > > > self.change_directory =3D args.change_directory > > > > > > > > self.fsopts =3D args.fsopts > > > > > > > > + self.fspassno =3D args.fspassno > > > > > > > > self.fstype =3D args.fstype > > > > > > > > self.label =3D args.label > > > > > > > > self.use_label =3D args.use_label diff --git > > > > > > > > a/scripts/lib/wic/plugins/imager/direct.py > > > > > > > > b/scripts/lib/wic/plugins/imager/direct.py index > > > > > > > > 4d0b836..c44159b > > > > > > > > 100644 --- a/scripts/lib/wic/plugins/imager/direct.py > > > > > > > > +++ b/scripts/lib/wic/plugins/imager/direct.py > > > > > > > > @@ -117,7 +117,7 @@ class DirectPlugin(ImagerPlugin): > > > > > > > > updated =3D False > > > > > > > > for part in self.parts: > > > > > > > > if not part.realnum or not part.mountpoint \ > > > > > > > > - or part.mountpoint =3D=3D "/" or not > > > > > > > > part.mountpoint.startswith('/'): > > > > > > > > + or not part.mountpoint.startswith('/'): > > > > > > > > continue > > > > > > > > > > > > > > > > if part.use_uuid: > > > > > > > > @@ -138,8 +138,9 @@ class DirectPlugin(ImagerPlugin): > > > > > > > > device_name =3D "/dev/%s%s%d" % (part.disk= , > > > > > > > > prefix, > > > > > > > > part.realnum) > > > > > > > > opts =3D part.fsopts if part.fsopts else > > > > > > > > "defaults" > > > > > > > > + passno =3D part.fspassno if part.fspassno else > > > > > > > > "0" line =3D "\t".join([device_name, part.mountpoint, > > > > > > > > part.fstype, > > > > > > > > - opts, "0", "0"]) + "\n" > > > > > > > > + opts, "0", passno]) + "\n" > > > > > > > > > > > > > > > > fstab_lines.append(line) > > > > > > > > updated =3D True > > > > > > > > > > -- > > > > > You received this message because you are subscribed to the > > > > > Google Groups "isar-users" group. > > > > > To unsubscribe from this group and stop receiving emails from > > > > > it, send an email to isar-users+unsubscribe@googlegroups.com. > > > > > To view this discussion on the web visit > > > > > > > > > https://eur01.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2= F > > > > grou > > > > > > > > > ps.g > > > > > oogle.com%2Fd%2Fmsgid%2Fisar- > > > > > > > > > > users%2F8babb01d7eae44e0b9faecad59cdc1d4%2540mentor.com&dat > > > > a=3D > > > > > > > > > > 05%7C01%7Cfelix.moessbauer%40siemens.com%7C237b0db9bb724580ca540 > > > > 8 > > > > > > > > > > > > > da5024a3ad%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C6379104 > > > > > > > > > > 15537105828%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ > > > > Ijo > > > > > > > > > > iV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sda > > > > ta > > > > > > > > > > =3D%2F%2F1Fxy%2B%2BEgDI4RfUEZ38qy1Q82esArdBuRftDuE1t6s%3D&re > > > > se > > > > > rved=3D0.