public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
To: <isar-users@googlegroups.com>, <henning.schild@siemens.com>
Cc: Vijai Kumar K <Vijaikumar_Kanagarajan@mentor.com>
Subject: [PATCH v5 8/8] meta-isar/canned-wks: Remove unwanted /boot mountpoint
Date: Mon, 5 Oct 2020 22:25:42 +0530	[thread overview]
Message-ID: <20201005165542.14954-4-Vijaikumar_Kanagarajan@mentor.com> (raw)
In-Reply-To: <20201005165542.14954-1-Vijaikumar_Kanagarajan@mentor.com>

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_Kanagarajan@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 ac9d8d6..da5734d 100644
--- a/RECIPE-API-CHANGELOG.md
+++ b/RECIPE-API-CHANGELOG.md
@@ -252,3 +252,29 @@ with ${D} which needs to be filled explicitly in do_install as before.
 ISARROOT variable is now removed from the bitbake environment. It is unset
 after the initial setup. It is replaced with dedicated variables like
 BITBAKEDIR, SCRIPTSDIR and TESTSUITEDIR.
+
+### 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


  parent reply	other threads:[~2020-10-05 16:56 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-05 16:52 [PATCH v5 0/8] WIC update Vijai Kumar K
2020-10-05 16:53 ` [PATCH v5 1/8] wic: Update to the latest wic from openembedded core Vijai Kumar K
2020-10-05 16:53 ` [PATCH v5 2/8] wic/plugins: Fix wic plugins to work with the latest wic Vijai Kumar K
2020-10-05 16:53 ` [PATCH v5 3/8] wic-img: Satisfy the quirks of " Vijai Kumar K
2020-10-14  8:59   ` vijaikumar....@gmail.com
2020-10-05 16:53 ` [PATCH v5 4/8] wic_fakeroot: Handle standalone pseudo invocations Vijai Kumar K
2020-10-05 16:55   ` [PATCH v5 5/8] meta-isar/conf: Add provision to debug WIC Vijai Kumar K
2020-10-05 16:55     ` [PATCH v5 6/8] debian-common: Add tar as a dependency for wic Vijai Kumar K
2020-10-05 16:55     ` [PATCH v5 7/8] Fix legacy bios boot partition Vijai Kumar K
2020-10-05 16:55     ` Vijai Kumar K [this message]
2020-10-05 16:59 ` [PATCH v5 0/8] WIC update vijaikumar....@gmail.com
2020-10-06  4:55   ` vijaikumar....@gmail.com
2020-10-06  9:13     ` Baurzhan Ismagulov
2020-10-07 10:49       ` vijaikumar....@gmail.com
2020-10-13 18:22         ` Jan Kiszka
2020-10-13 18:30           ` Jan Kiszka
2020-10-14  5:56             ` vijaikumar....@gmail.com
2020-10-14 13:23             ` vijaikumar....@gmail.com
2020-10-14  5:54           ` vijaikumar....@gmail.com

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=20201005165542.14954-4-Vijaikumar_Kanagarajan@mentor.com \
    --to=vijaikumar_kanagarajan@mentor.com \
    --cc=henning.schild@siemens.com \
    --cc=isar-users@googlegroups.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