From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6880180325712920576 X-Received: by 2002:a2e:980f:: with SMTP id a15mr201178ljj.153.1601916996781; Mon, 05 Oct 2020 09:56:36 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:a556:: with SMTP id e22ls1215807ljn.9.gmail; Mon, 05 Oct 2020 09:56:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxXRfgSO4hCltdYLwh71xGn2HE/DZ5zmfKwfmcZrsVB7oQCd6WI/3plvnRIAV/nluPTxEhE X-Received: by 2002:a05:651c:1284:: with SMTP id 4mr240716ljc.76.1601916995600; Mon, 05 Oct 2020 09:56:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601916995; cv=none; d=google.com; s=arc-20160816; b=B73M4BbAYqYXpuVZb+WFLfmPcaM/aCTZDc4AVbs0VV2cOk6SaOxO0GLAEaB9O7hs/X O+hk73DHNFlbefSwlG1z6epCShDmUI4JETPTPRT/iMXB4hnhF7sQhjPTA6JJ7ODNdNWa 65euxef20wbbvxeFue16LTNhOkK6hbOx7de/rNF2SG9eEiiesYci1wAD/TMxWmhgVt9L lWAQgK9J0m+LmJBcuD5LPEA/EFR+VAG/JScQgmWXdUwmYwi556CfykTtApZGoCogJscM Hw/WAkMwuv13+j+1gY3N25oli7fYZ9ugFKn2hyCi496GAXwZhsXHGpJ0uD9C4qi4BxAU VnSg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:ironport-sdr:ironport-sdr; bh=4ko7tqiYc9ivm52wUUjTVZZU+rM/3s5qVaSLwxt47ZM=; b=xZxc6FEYaHQiuRgUEA893SwaGT5gMoZMWHdlFhuG5kiR59AueFEJ/5tprM295zCbRe y5Yhg9NTzmumX0c+2egE51cbR/F69vI2B2kYkS9I/z+xCMV7l36zHaa03JWAYDcRQffp iQStWts8ObDLEA0sg28XKv2OfzaNr5fDmXK9xOc31WOLFdotdiXJvGkpMMp4itDvk6mf +XnUz8i/m3iB9d6095k7xFlEhZapqb3ctgOomcCt2ubO/1ecG2uND4nawtyxleRMMjKu 2+wICGHvkPoi0fcAhEKcFidBmCXO0sGa1yzW0XSAuIWnhdnTS9BsVmJZPFGXK55IFX5w KBpg== 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 y75si10311lfa.3.2020.10.05.09.56.34 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 05 Oct 2020 09:56:35 -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 IronPort-SDR: 3tH455uMQg0R3cs/EEOkB03l5c/tj5iotcJqnZFrsFMA3TvIupTtg2/C0TaI8/5NlGQdE2guip 0xlE3ZalDaDe6QFCR0XEEPhlmqDnndWmrJ/CfJ377erld8v0HIRGyle0YyEfEXZSEMLYPINrcX wgOLVeBAblQo+3PQVJMpt3Zyjk4PJiujOQsgTyNPXEU6pXOyCtr83B94WyaJENca83XCArQL79 9udQGbzSlB8+knVAvsTmTYptBKSuWjXxS2VYE0omiK7IZQorKSVd4yddLEYE/DiNCaZXm1X7AG C2k= X-IronPort-AV: E=Sophos;i="5.77,340,1596528000"; d="scan'208";a="53722897" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa4.mentor.iphmx.com with ESMTP; 05 Oct 2020 08:56:34 -0800 IronPort-SDR: BhP3UsfPYQHA1TCw95WMDxdoNF7w9Oyz0jeM6NieqUZdUklf4mkwXKv+AWl4QmIgqqhn1Uy7Yx fBmCq4PQsKlp4XN55ggWSEuker3tOlqO7cGjQMbae7HHE+YonAJDWOkjgQaJ3mRHN9gRDOcLGq AFwoLhbgS3+AzkInRGzxEzs7qIZ95QlFSsGH8sr4QrNlLL/j8X7WZd7ehLtbcit7SWZ1M00UkV TF3f0mP2UUvwvYtEFPAXzBmzdQJAJmuBuKYTFc3Q+BGaCF4B59IJmnyinZlCIBKMrNVZl8GYtu /jA= From: Vijai Kumar K To: , CC: Vijai Kumar K Subject: [PATCH v5 8/8] meta-isar/canned-wks: Remove unwanted /boot mountpoint Date: Mon, 5 Oct 2020 22:25:42 +0530 Message-ID: <20201005165542.14954-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201005165542.14954-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201005165307.14668-5-Vijaikumar_Kanagarajan@mentor.com> <20201005165542.14954-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: svr-orw-mbx-08.mgc.mentorg.com (147.34.90.208) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: n0Xa1S5ssvaC 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 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