From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6880180325712920576 X-Received: by 2002:a17:90b:228f:: with SMTP id kx15mr3571826pjb.41.1602682287074; Wed, 14 Oct 2020 06:31:27 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a17:902:8b8a:: with SMTP id ay10ls1504597plb.6.gmail; Wed, 14 Oct 2020 06:31:26 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwR6QJ6vdXTAkFsXGCIjGS9dwJOe8ChDcOMxljh+ZfZgvKD7hbVPEhDeBQ4LkIzg0VshnLg X-Received: by 2002:a17:90a:9504:: with SMTP id t4mr3736901pjo.82.1602682286224; Wed, 14 Oct 2020 06:31:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1602682286; cv=none; d=google.com; s=arc-20160816; b=LViYsiagAWS3ri7tSbp2hUtibSLxR/8K97Mto5rW7zchfzu54R3VJaQJQp34LBDbiT c8QD0Fr6q2+btx306zXFhqB59sBwSUg2As+UfSAz9RNSN1YTPBS3JQpKMA9UmucFBRMn KR41q8nWHK44PyalHK1hU0mnnjEMAGmNR1XQqrmlQU5dS/k+Na1PMKfyCFz/m5QxsWHG +lNtkbtVYK1qHVdqgJzEapZGRXI5dQDHu/N/1e94LSn17g1d6Kf/Rr8vcIg3qqMGa250 32bL5ektjrKDBNCBmge40QkFFgcu3MXC662LqLVbYI9E9YYntln/MAsGHrgZbMn7G7Xv ZEBA== 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=qAh1KiN6uIrYIp/F45oNx5DTdcezrkHvPBE3llqxes0/uyHMuQaVHkt/xcBWBU2BZ8 hO8f+1lFdE6u6NXQsl+9zlY5mlrtNTxEqty1geNs5D2IlqnGin5jgmGYZH4TC2LFC+9f slux00K4Ag6nPcHXPFU+ssUZzun19SagX7ohagkJY/S+o3MaAPyknDrfz9fpoQtJ96QW 7WOgSyHDgcrl+fTiOEb27+gYfaxOHbdRmTRydsC/8Qcm/98Fmg++XszxUaH+K4QmPQdx Q2wgbwPnFxii4f6OfdY7lcgGyBIz3cNXdY76JRY0Q4b/MvzeQxjWcDF7eGCc4YP/IkQI Yn7w== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com Return-Path: Received: from esa1.mentor.iphmx.com (esa1.mentor.iphmx.com. [68.232.129.153]) by gmr-mx.google.com with ESMTPS id i9si154075pjh.3.2020.10.14.06.31.26 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Oct 2020 06:31:26 -0700 (PDT) Received-SPF: pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) client-ip=68.232.129.153; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of vijaikumar_kanagarajan@mentor.com designates 68.232.129.153 as permitted sender) smtp.mailfrom=Vijaikumar_Kanagarajan@mentor.com IronPort-SDR: QEECEx5xC3WrvSpxMsvqh9dzUIVEiKJfSia4+NTKnuz5u6tuAFMa+6bJ347vfrfookc3A16DsD ujmSonE+2rVcHI7oOvOzrG3B+Xj5zzvuzHqMMLNO9O4ZeVu3HXvIm9Jsj/seZyYC95yPbUJpqv zl7IMqYV078nlodZEmuKifKmRMXC6T/NprVCr+iABR3sN3MhXnzHayTAEqpGOLNYo5/ukkFN7s ePdQcpYdqfegYdSdWMxwt/RTvMcY5/SIGM4z3IR6yco0/OOQAoxm3H+iBJtmsO+53rqxPrUAJN JBU= X-IronPort-AV: E=Sophos;i="5.77,374,1596528000"; d="scan'208";a="56200170" Received: from orw-gwy-02-in.mentorg.com ([192.94.38.167]) by esa1.mentor.iphmx.com with ESMTP; 14 Oct 2020 05:31:25 -0800 IronPort-SDR: VNsjpomLm50/n4OV4+kbqwMYtiPcwdTjEWfnRuBnvHovbioaES8wPIVhAYylrKdQxE0qXb9orV ZHgpZloKdEUauNQJ/TdQ7pWa/bi7N0Hr3czkomJ2X2YIfkQyfg0tQX/EO5cvBukULQVAPo9Too xrZ++CZLjBvul39ibmMHX3dYCsaka2ceW4CDeFW5SQhGWwAWf/mKgSDGj1vBQgiNTXyz6ZL2Av haKUd1w9APXJya7N3UN9/8DqlvmmtiV70zKxrzctJnDeDD1+jWco6RaLe4/v+3X5qxT6lDNmNm sUM= From: Vijai Kumar K To: CC: Vijai Kumar K Subject: [PATCH v6 8/8] meta-isar/canned-wks: Remove unwanted /boot mountpoint Date: Wed, 14 Oct 2020 19:00:42 +0530 Message-ID: <20201014133042.18753-4-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20201014133042.18753-1-Vijaikumar_Kanagarajan@mentor.com> References: <20201014132729.18571-5-Vijaikumar_Kanagarajan@mentor.com> <20201014133042.18753-1-Vijaikumar_Kanagarajan@mentor.com> MIME-Version: 1.0 Content-Type: text/plain Return-Path: Vijaikumar_Kanagarajan@mentor.com X-ClientProxiedBy: SVR-ORW-MBX-06.mgc.mentorg.com (147.34.90.206) To svr-orw-mbx-01.mgc.mentorg.com (147.34.90.201) X-TUID: fJZ4l2Hi2ALQ 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