From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 Date: Mon, 5 Oct 2020 08:13:39 -0700 (PDT) From: "vijaikumar....@gmail.com" To: isar-users Message-Id: In-Reply-To: <20200916145021.5856-9-Vijaikumar_Kanagarajan@mentor.com> References: <20200916145021.5856-1-Vijaikumar_Kanagarajan@mentor.com> <20200916145021.5856-9-Vijaikumar_Kanagarajan@mentor.com> Subject: Re: [PATCH v4 8/8] meta-isar/canned-wks: Remove unwanted /boot mountpoint MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_658_2079527963.1601910819650" X-TUID: CnqAMTwLYPF0 ------=_Part_658_2079527963.1601910819650 Content-Type: multipart/alternative; boundary="----=_Part_659_1752678070.1601910819650" ------=_Part_659_1752678070.1601910819650 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Any more review comments on this? Thanks, Vijai Kumar K On Wednesday, September 16, 2020 at 8:21:36 PM UTC+5:30 vijaikumar_...@mentor.com wrote: > In the older version of wic, the fstab entry for /boot mountpoint > was skipped. However in the latest wic this is not the case. > Adding a /boot mountpoint in part results in creating a fstab > entry for automount. > > For machines that uses the kernel, initrd and related files from the root > partition; having /boot now as mountpoint for bootloader partition would > break the kernel update. Those original kernel files would no longer be > available once the bootloader partition is auto-mounted onto /boot. > > For such machines, remove the bogus /boot mount point in wks files. > > Signed-off-by: Vijai Kumar K > --- > RECIPE-API-CHANGELOG.md | 26 +++++++++++++++++++ > .../scripts/lib/wic/canned-wks/hikey.wks | 2 +- > .../lib/wic/canned-wks/sdimage-efi.wks | 2 +- > 3 files changed, 28 insertions(+), 2 deletions(-) > > diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md > index 1839770..ca89f8a1 100644 > --- a/RECIPE-API-CHANGELOG.md > +++ b/RECIPE-API-CHANGELOG.md > @@ -246,3 +246,29 @@ by setting DEBIAN_BUILD_DEPENDS. > > ${S} can now be used for checking out sources without being linked > implicitly > with ${D} which needs to be filled explicitly in do_install as before. > + > +### Wic adds /boot mountpoint to fstab > + > +In the older version of wic, any mount point named /boot is skipped from > adding > +into the fstab entry. > + > +With the latest wic, this is not the case. /boot mount point, if any, is > added > +to /etc/fstab for automount. > + > +Any wks file which assumed that /boot would be skipped from /etc/fstab > should > +now be corrected. Otherwise, it might conflict with the original /boot > contents, > +i.e kernel initrd & config files will be unavailable after boot. > + > +Below is an example wks entry that might cause an issue. > +The efi partition created using bootimg-efi-isar plugin has only the efi > stub in > +it. The kernel and initrd are present in the root(/) partition. > +Now with the latest wic which adds the /boot mount point to fstab, the > /boot > +contents of "part /" would be unavailable after boot. This would break the > +kernel updates done via apt-get. > + > +``` > +part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" > --ondisk sda --label efi --part-type EF00 --align 1024 > +part / --source rootfs --ondisk sda --fstype ext4 --label platform > --align 1024 --use-uuid > +``` > +In this case we can either drop the /boot mountpoint or use some other > mountpoint > +like /boot/efi to avoid such issues. > diff --git a/meta-isar/scripts/lib/wic/canned-wks/hikey.wks > b/meta-isar/scripts/lib/wic/canned-wks/hikey.wks > index 1e82f8c..840858e 100644 > --- a/meta-isar/scripts/lib/wic/canned-wks/hikey.wks > +++ b/meta-isar/scripts/lib/wic/canned-wks/hikey.wks > @@ -3,7 +3,7 @@ > # > # SPDX-License-Identifier: MIT > > -part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" > --ondisk mmcblk1 --label efi --part-type EF00 --align 1024 > +part --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk > mmcblk1 --label efi --part-type EF00 --align 1024 > > part / --source rootfs --ondisk mmcblk1 --fstype ext4 --label platform > --align 1024 --use-uuid > > diff --git a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks > b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks > index 2afa016..e0fa7a1 100644 > --- a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks > +++ b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks > @@ -2,7 +2,7 @@ > # long-description: Creates a partitioned EFI disk image without any swap > that > # the user can directly dd to boot media. > > -part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" > --ondisk sda --label efi --part-type EF00 --align 1024 > +part --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk > sda --label efi --part-type EF00 --align 1024 > > part / --source rootfs --ondisk sda --fstype ext4 --label platform --align > 1024 --use-uuid > > -- > 2.17.1 > > ------=_Part_659_1752678070.1601910819650 Content-Type: text/html; charset=utf-8 Content-Transfer-Encoding: 7bit Any more review comments on this? 

Thanks,
Vijai Kumar K

On Wednesday, September 16, 2020 at 8:21:36 PM UTC+5:30 vijaikumar_...@mentor.com wrote:
In the older version of wic, the fstab entry for /boot mountpoint
was skipped. However in the latest wic this is not the case.
Adding a /boot mountpoint in part results in creating a fstab
entry for automount.

For machines that uses the kernel, initrd and related files from the root
partition; having /boot now as mountpoint for bootloader partition would
break the kernel update. Those original kernel files would no longer be
available once the bootloader partition is auto-mounted onto /boot.

For such machines, remove the bogus /boot mount point in wks files.

Signed-off-by: Vijai Kumar K <Vijaikumar_...@mentor.com>
---
RECIPE-API-CHANGELOG.md | 26 +++++++++++++++++++
.../scripts/lib/wic/canned-wks/hikey.wks | 2 +-
.../lib/wic/canned-wks/sdimage-efi.wks | 2 +-
3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/RECIPE-API-CHANGELOG.md b/RECIPE-API-CHANGELOG.md
index 1839770..ca89f8a1 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -246,3 +246,29 @@ by setting DEBIAN_BUILD_DEPENDS.

${S} can now be used for checking out sources without being linked implicitly
with ${D} which needs to be filled explicitly in do_install as before.
+
+### Wic adds /boot mountpoint to fstab
+
+In the older version of wic, any mount point named /boot is skipped from adding
+into the fstab entry.
+
+With the latest wic, this is not the case. /boot mount point, if any, is added
+to /etc/fstab for automount.
+
+Any wks file which assumed that /boot would be skipped from /etc/fstab should
+now be corrected. Otherwise, it might conflict with the original /boot contents,
+i.e kernel initrd & config files will be unavailable after boot.
+
+Below is an example wks entry that might cause an issue.
+The efi partition created using bootimg-efi-isar plugin has only the efi stub in
+it. The kernel and initrd are present in the root(/) partition.
+Now with the latest wic which adds the /boot mount point to fstab, the /boot
+contents of "part /" would be unavailable after boot. This would break the
+kernel updates done via apt-get.
+
+```
+part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk sda --label efi --part-type EF00 --align 1024
+part / --source rootfs --ondisk sda --fstype ext4 --label platform --align 1024 --use-uuid
+```
+In this case we can either drop the /boot mountpoint or use some other mountpoint
+like /boot/efi to avoid such issues.
diff --git a/meta-isar/scripts/lib/wic/canned-wks/hikey.wks b/meta-isar/scripts/lib/wic/canned-wks/hikey.wks
index 1e82f8c..840858e 100644
--- a/meta-isar/scripts/lib/wic/canned-wks/hikey.wks
+++ b/meta-isar/scripts/lib/wic/canned-wks/hikey.wks
@@ -3,7 +3,7 @@
#
# SPDX-License-Identifier: MIT

-part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk mmcblk1 --label efi --part-type EF00 --align 1024
+part --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk mmcblk1 --label efi --part-type EF00 --align 1024

part / --source rootfs --ondisk mmcblk1 --fstype ext4 --label platform --align 1024 --use-uuid

diff --git a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks
index 2afa016..e0fa7a1 100644
--- a/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks
+++ b/meta-isar/scripts/lib/wic/canned-wks/sdimage-efi.wks
@@ -2,7 +2,7 @@
# long-description: Creates a partitioned EFI disk image without any swap that
# the user can directly dd to boot media.

-part /boot --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk sda --label efi --part-type EF00 --align 1024
+part --source bootimg-efi-isar --sourceparams "loader=grub-efi" --ondisk sda --label efi --part-type EF00 --align 1024

part / --source rootfs --ondisk sda --fstype ext4 --label platform --align 1024 --use-uuid

--
2.17.1

------=_Part_659_1752678070.1601910819650-- ------=_Part_658_2079527963.1601910819650--