From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6864480010557718528 X-Received: by 2002:a4a:d8ce:: with SMTP id c14mr17770968oov.90.1600267896549; Wed, 16 Sep 2020 07:51:36 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a05:6808:a84:: with SMTP id q4ls556542oij.8.gmail; Wed, 16 Sep 2020 07:51:36 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxquCUO7t2C1e8PQ/zreAl4NQEMUpOss00p4F5d2vkTVYWOE4Dbc4zgTlJ0rwG0Gawte+uI X-Received: by 2002:aca:4457:: with SMTP id r84mr3352097oia.53.1600267896111; Wed, 16 Sep 2020 07:51:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1600267896; cv=none; d=google.com; s=arc-20160816; b=mlD3zrPEKg+eLdRgJhHQ7samNyR8BKC0q4JS/ZCK9bFdwbztjS2nAFQJ9E4Qiy7i0K ffAXzeuvc3Iso5r7RPjp111MlqGZQWq5+J12GbQaPhAS8dBrLY9P84wqyoDt5MG/I+FR 8hDKNkDndR2/fv+LsflCIFbzkwCVol7qF1Qn4kVSHGUQxzdXXs6riHFvxxj8JWRzUZyK h1LBi1CV7AsVa5NgMmJEM1kh9KK7sJ6H2XNkhlWfxEqC7+p9GoSb6iprMvpNoUPRAUwJ dMN59xD1B8pFcadnqjIBXPibBN2GUT8Y5dHKAx/+levjM1pVU8ecQsTWDjev6Dzv7ESq yDeg== 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:to:from :ironport-sdr:ironport-sdr; bh=0w4c1xYoZRVR4u0tCuPwWvRj28fA2LWiYeWCyCUFG2o=; b=hM6oeJIZk/cmZokTrRw5HUOFel7/EImdwAQ80Lcz9wi16IqG659on4RCXnvSWG583T U8BxmKDN7AWYUTeR0TGwdafIdWSE7Lj7ujNIK07nSGAEI6X9co+8Nxeb9MNSwCThuxV0 Qx4hEGOC+1PoWFzStGvvbBiM02ycyrMtZF9GmpfLp2v6NI/oFysN+6up6PN7xL/jwep2 9xjtI3SC7CSL/hVUE/8YvbOVlLefA04ob/6IDYKboyySD8Ck8AnHQkTw+7NUiooifE8T XJQlAOEHYKRktV42jzw9ezZIoQXJJGrQA1OkS0kDweyEut5/oA0dlqXcl8C1RwnFMtQT 5PvA== 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 u27si1383959otg.5.2020.09.16.07.51.35 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 16 Sep 2020 07:51:36 -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: cCws9avI7KvcTU5RSPB95BkblXtnQIQF/a9rxR5r/48cAriJsmJlS/kOrV8Fp+z7OPAMUjEeO9 6NFEoLo9QA61v1qyND3ZaxP+GxqyjG5234dYeuNS1JyKINugAX19PGOI7TZjkiHgu24LCnK/6x 9Mc8Go6/pduFd2nQMRLkSDqe62FFHrGF2UaqTGFyKdpVk+0WFxmbphq/kWw9RJULqjo47M6Snt Un3tZvaFTwXWuKjb+ac6i7vlZ2+bvB8Yf43tKT89ecFK8xVCqGGPJ0j98dUHwBgjA6LQ27T8K6 dYU= X-IronPort-AV: E=Sophos;i="5.76,433,1592899200"; d="scan'208";a="55173200" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa1.mentor.iphmx.com with ESMTP; 16 Sep 2020 06:51:34 -0800 IronPort-SDR: lJ+qbKNXpVwyX2XS26LqDHe9NYyhfArRWuihkou6t1/gw6DK39Z9jg5HM4PL85ljNVNCUjYqxO htF1XSmg4WWRmujbC8oc/mnZs53yPTx9SWc7vKP+HxyN9sRATJnSA+X5BU8TNZNeAfDiKut6Ar YEzDIb5CgXFJutnzEFx6PYlNmpehK575/FeEB3HGOquA9VnM9sCddNfHEniANUK1OtBK5lX/m7 iqE+X4Le9/3PooJarmHtf3BDgIq7OPv7yCojGJUO4Hmoo1WrMw9x4/UKHpkXRXIVIJJettDZAq sKM= From: Vijai Kumar K To: , , Subject: [PATCH v4 8/8] meta-isar/canned-wks: Remove unwanted /boot mountpoint Date: Wed, 16 Sep 2020 20:20:21 +0530 Message-ID: <20200916145021.5856-9-Vijaikumar_Kanagarajan@mentor.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200916145021.5856-1-Vijaikumar_Kanagarajan@mentor.com> References: <20200916145021.5856-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: 3jQtzHWGDFhx 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