From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7108629846932062208 X-Received: by 2002:a7b:c758:0:b0:39c:44ce:f00f with SMTP id w24-20020a7bc758000000b0039c44cef00fmr8296672wmk.167.1655444751395; Thu, 16 Jun 2022 22:45:51 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:600c:1e29:b0:39c:4a18:152b with SMTP id ay41-20020a05600c1e2900b0039c4a18152bls1764761wmb.0.gmail; Thu, 16 Jun 2022 22:45:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1taelRYelrHUzhFugPeKayaodao4sPDGmChTkFwxCUi4giI4ZEuUg0BLZN2zAz5dN7j7xZc X-Received: by 2002:a05:600c:3792:b0:39c:6667:202 with SMTP id o18-20020a05600c379200b0039c66670202mr8303019wmr.104.1655444750103; Thu, 16 Jun 2022 22:45:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655444750; cv=none; d=google.com; s=arc-20160816; b=PlgDmXL//EPZHFu0MRIiMd0rvd/padSrmfFCNA8mDanv0HXECsq1zYVqV0bo18/emW LUUlw4DAMmFwwb5BIU2OkCKdhIrX5ar2gvfCqD6e7xbcIomJZRNg7fmIuv/PLhlNZ0eb ueKSXaZA+DiqYh2mVdVvR6mJc/KwfVvDkn9ECU2eZDNhDNL1sGLbbrTsNI34rhwDiz/i ytWD48DtH1kEGyJr23TokG94Cusot8EMC1lZMYvTKAxC+0B8Z/pisB6M4XmwnyvcOLqA t77emrI9rDSSFf34MpGhXObtcYEoGKT+K5Y/aL0VraeSbAVQFDYC/PTM0Hf/OX4fv1m9 E9/Q== 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=rnAr9qSX1OGpSEnKNKZgl7q9y8VnSAQiSWwloxJtzMo=; b=FRmlhH6WCQlk8qchpb9OikixezDAik1k7PapAfvjYpBOClw1SAHaxWf1Ar+oOf7lUv BqCW7vnFGKJhKnZw90rDiVk6OcoX3Uip599vC752QOnqdJK6vSDta0HA5ZEFzcosH/pB 0Rqh23fXga0WnsskZv3aypMkUvCdbBEx9VQEYCJ+5mERq2/YE4Yl2dr/1xSuqeiDnLHx HsaYBv0uE/dScXxLMi+VWVldbFDvX/Kw+hybw9pQSv7GzxiIgLbJUNpMRLsZkqF6YnYG toQD88udnxt3hAbQCSFEvluGkC/pzEYdD2zb2dgOsRb905yRj2h17YUgA649mVkLr5MJ KH0g== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa4.mentor.iphmx.com (esa4.mentor.iphmx.com. [68.232.137.252]) by gmr-mx.google.com with ESMTPS id ay23-20020a05600c1e1700b0039c948d7614si367143wmb.3.2022.06.16.22.45.49 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Jun 2022 22:45:50 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) client-ip=68.232.137.252; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.137.252 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com X-IronPort-AV: E=Sophos;i="5.92,306,1650960000"; d="scan'208";a="77429683" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa4.mentor.iphmx.com with ESMTP; 16 Jun 2022 21:45:49 -0800 IronPort-SDR: jps2lOalcKbFH/OAFErOOyCOzcw5Ehz0tRjCNhHxphFXncMKKrrAm6YDeNq5Nhas0tK65Lt6NB pQAjLoCTNsF4/Vqt1sjZlIK85HP5DYnPy32P2mMJWKmj/iAWrnVtm3DNFtisl/ZhiRnR/+WtWk 5q9f8aMMNjYdPXnK+1gP6eelLhTArJEjYpnBVUhCR8uFL6pYZqu1g5Kwx3ASjGKafNeieZqyiL kJoHpbnPf+bIZZmW7s4Qu6Q1hoXj82YQPmSCPk9F4eiNnBijzri4qpzLWKLuuLJvK663++napx SgM= From: "Kanagarajan, Vijaikumar" To: "isar-users@googlegroups.com" CC: "jan.kiszka@siemens.com" , Henning Schild 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//+ObwCABgyv8A== Date: Fri, 17 Jun 2022 05:45:45 +0000 Message-ID: <8babb01d7eae44e0b9faecad59cdc1d4@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> In-Reply-To: <476c6e8a8687499a85fced0e07299815@mentor.com> 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: /OuleK6JVWaq > -----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 >=20 >=20 >=20 > > -----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 centrall= y. > > > > 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 >=20 > 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-fs= tab-update. Seems like we can set them per partition now. Thanks, Vijai Kumar K >=20 > Thanks, > Vijai Kumar K >=20 > > > > 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 no= t > > > + specified the default value of "0" will be used= . > > > + > > > --label label: Specifies the label to give to the filesyste= m > > > 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