From: "Kanagarajan, Vijaikumar" <Vijaikumar_Kanagarajan@mentor.com>
To: Henning Schild <henning.schild@siemens.com>
Cc: "isar-users@googlegroups.com" <isar-users@googlegroups.com>,
"jan.kiszka@siemens.com" <jan.kiszka@siemens.com>
Subject: RE: [PATCH v2 2/2] wic: Update to the latest revision
Date: Mon, 13 Jun 2022 09:18:03 +0000 [thread overview]
Message-ID: <476c6e8a8687499a85fced0e07299815@mentor.com> (raw)
In-Reply-To: <20220613110206.0fa05e12@md1za8fc.ad001.siemens.net>
> -----Original Message-----
> From: Henning Schild <henning.schild@siemens.com>
> Sent: 13 June 2022 14:32
> To: Kanagarajan, Vijaikumar <Vijaikumar_Kanagarajan@mentor.com>
> 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 <Vijaikumar_Kanagarajan@mentor.com>:
>
> > Update to the latest wic from OE-core.
> >
> > OE-core Revision: 06ed2aa93fc25a681e3a00ee120d9395b04845da
> >
> > Signed-off-by: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
> > ---
> > 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.
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=sizetype("M"))
> > part.add_argument('--fsoptions', dest='fsopts')
> > + part.add_argument('--fspassno', dest='fspassno')
> > part.add_argument('--fstype', default='vfat',
> > choices=('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 = args.include_path
> > self.change_directory = args.change_directory
> > self.fsopts = args.fsopts
> > + self.fspassno = args.fspassno
> > self.fstype = args.fstype
> > self.label = args.label
> > self.use_label = 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 = False
> > for part in self.parts:
> > if not part.realnum or not part.mountpoint \
> > - or part.mountpoint == "/" or not
> > part.mountpoint.startswith('/'):
> > + or not part.mountpoint.startswith('/'):
> > continue
> >
> > if part.use_uuid:
> > @@ -138,8 +138,9 @@ class DirectPlugin(ImagerPlugin):
> > device_name = "/dev/%s%s%d" % (part.disk, prefix,
> > part.realnum)
> > opts = part.fsopts if part.fsopts else "defaults"
> > + passno = part.fspassno if part.fspassno else "0"
> > line = "\t".join([device_name, part.mountpoint,
> > part.fstype,
> > - opts, "0", "0"]) + "\n"
> > + opts, "0", passno]) + "\n"
> >
> > fstab_lines.append(line)
> > updated = True
next prev parent reply other threads:[~2022-06-13 9:18 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-13 7:53 [PATCH v2 0/2] Update WIC to bring in fspassno feature Vijai Kumar K
2022-06-13 7:54 ` [PATCH v2 1/2] meta-isar/wks: prepare wks for wic uprev Vijai Kumar K
2022-06-13 7:54 ` [PATCH v2 2/2] wic: Update to the latest revision Vijai Kumar K
2022-06-13 9:02 ` Henning Schild
2022-06-13 9:18 ` Kanagarajan, Vijaikumar [this message]
2022-06-17 5:45 ` Kanagarajan, Vijaikumar
2022-09-26 1:40 ` Moessbauer, Felix
2022-09-26 4:53 ` Kanagarajan, Vijaikumar
2022-09-26 5:57 ` Moessbauer, Felix
2022-09-26 7:46 ` Henning Schild
2022-09-26 7:56 ` Kanagarajan, Vijaikumar
2022-09-26 8:02 ` Moessbauer, Felix
2022-09-26 12:34 ` Henning Schild
-- strict thread matches above, loose matches on Subject: below --
2022-04-21 8:52 [PATCH v2 0/2] bump bitbake and wic for python 3.10 support Henning Schild
2022-04-21 8:52 ` [PATCH v2 2/2] wic: Update to the latest revision Henning Schild
2022-04-21 9:02 ` Henning Schild
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=476c6e8a8687499a85fced0e07299815@mentor.com \
--to=vijaikumar_kanagarajan@mentor.com \
--cc=henning.schild@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox