From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 26 Nov 2025 10:46:14 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f63.google.com (mail-wr1-f63.google.com [209.85.221.63]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5AQ9kDTB010527 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 26 Nov 2025 10:46:13 +0100 Received: by mail-wr1-f63.google.com with SMTP id ffacd0b85a97d-429cceeeb96sf3900746f8f.1 for ; Wed, 26 Nov 2025 01:46:13 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1764150368; cv=pass; d=google.com; s=arc-20240605; b=Gs2hYBxOzPZwDXvXtnuU/x+xnwX3Sy6+YLZ9Hz2F4wxPyogZyeC4tnJge2ilbHx5lg C27JB4Ukoq6QCufsmWDclDpBEaEd5eBZDrCzojiZpSI3kd5OKWTj1UN5R0EiNLlYBPqk OuvZQzGbNzL0Dy/Yht54okin921DDEqBHAWtQmhtdj0Awdl/gd5Jcnpp8MCXDeOAPP8d 3K3i/pOctPrHyiUPsXUHQIqF8LT4Bh7YTOvMndHwOADXXfY0Vg9xg/WPkz9YaXEf8Fd9 eH5+HmE3mfi4K7HAXymiyxkI4KUDCJ0ivpE8kaFPLGkin2FfMCQ6kDtUjkgwcEHwZOnG RFig== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id :sender:dkim-signature; bh=kRY/3W0vvUYaj5N1UqLbJPODrqaUI4UeWxA8hxu4OBI=; fh=H5BjxTMEqlWhFd8A+j5R/XpH8pEyeHM+1tFbsjBOakI=; b=kXZzO6JBW7zP6dg5HD/jdM//apFwEKVzeuUlOrCbaUSJGu3tJPhQG1OnTSBeR6lzz9 q4cVoyZwI8IlLhlLZQa0oxJ5jfw/gTQDowhNTCELgwqDDB1bJuudpkvicxSEHVGQx+pm L5aN5gFDrFHE+1fYu72YKOmwfyd3JWP0e9X281sFuGEEVvSBaVHo0BzbMlmglusFdeGo lYhR/M3sL/hE/05ksOw8vSZaNuVYklJs4nlJkPCUgdBgDofmPTKUXsChrU2GlK7Q00bn 74y0/93aTwVKfc+Ut1PSosArAuR+SOg3xYJ02lDeLzd079LkqqKy+yTlZZ7GmVBtqhy/ mA5A==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1764150368; x=1764755168; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:in-reply-to:from:content-language:references:to :subject:user-agent:mime-version:date:message-id:sender:from:to:cc :subject:date:message-id:reply-to; bh=kRY/3W0vvUYaj5N1UqLbJPODrqaUI4UeWxA8hxu4OBI=; b=s4WX6QKFJSNPdt6K3TgKX8t+LNUFLRz9i97ozDE8Ivhjn1PChc3mZ997/WgmRB2ZJ/ DRXJna9KL3eL+IDhzqD5BZF5IpaGmKQmKQEQunYhm+/ChaMHDfLklcP/y04UYq5IDER8 hBMT4mxlidW5/a3+Le12EEdo+dEJX4bX6pJF8mTScmUD/0AZw+sSlEi3+yNl3I5m/dU3 Lc1jHvKnXPrsjzoGYJVEFY0tfuY0E+eGNh9CrjgO/xrTPIrTcR9Ofvs1/ZD7yCsHNfRk eVG6hrPV0Fw0/1a2TxoAvUmWMtQFdWgk3Qlb+gRQfQSy+O7OSLEBUBX8b3c3hgIs0r5n Jflg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1764150368; x=1764755168; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:in-reply-to :from:content-language:references:to:subject:user-agent:mime-version :date:message-id:x-beenthere:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=kRY/3W0vvUYaj5N1UqLbJPODrqaUI4UeWxA8hxu4OBI=; b=ZzNVBcci8pKxL8K7Mf8/dfTWY0xwKn/qENnEXTX4oZxVlBtiZGqYZZrm1bxJ1s8V5T IBcOT/7JadNMudisYO1103fcXGUWsrzwddHPVt55mb/ZWu7G0butXTvvuPK6/9Smcvu4 DSqR0E6jA/bg27nCWc1pUA329LYMXiE2JTUzL3gJLl6i0Q4B5O1tUmQwfMYkbuKkGLRS /fwjSZEY2NKC6PkaihbyxvJYPXzpER+VnPJewRyVMHvsIZsn41afGKmYzlQ9UiLst7en SGRuILTVQLAs+a8CBIQ1l9tkbNc831EC0gTtDfqJ0GFb4Ow6gFU4I0+JeRPTU6SkN8Rf 29HA== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCViX2jBuvOCpR/Xy+9hU0GKdbBUDrnSOrWTsjgxvezdE324YnNSTwOGysO0OhRYplNCR/VP@ilbers.de X-Gm-Message-State: AOJu0YzwSmbeQJ4WSNVfCUJeVqY6ntTgwo8ZaY9fQDtocy96dzgzH1Mw ZbtqtacdlRhHuN3fIltuwElA2sroVufWe4U7jg77H1pwmTulx938Fq8U X-Google-Smtp-Source: AGHT+IGjduiAbOzFUyw7F1NhRbzXtcypZEuJYQ+DrqAxvFzMYAsKiL0kKOD/45JEVVRq0jX2RgSDYQ== X-Received: by 2002:a5d:5f51:0:b0:3ec:db13:89e with SMTP id ffacd0b85a97d-42cc1abe2b0mr19225645f8f.7.1764150367860; Wed, 26 Nov 2025 01:46:07 -0800 (PST) X-BeenThere: isar-users@googlegroups.com; h="Ae8XA+ab7XQ8ittwGzXdEBjP7RCAbNPc7uzeYntqFgoINDSpvA==" Received: by 2002:a05:6000:1a8f:b0:428:52bf:bc02 with SMTP id ffacd0b85a97d-42cb820f6fcls3873643f8f.2.-pod-prod-04-eu; Wed, 26 Nov 2025 01:46:05 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCU1wP4FsW6L/4vDnu5z5bCKgJ1XbMLnrERikWnTvvJ58ePOTwciMZRp5EFAwyL0b5FGRoa/NhJYI7m5@googlegroups.com X-Received: by 2002:a05:600c:4591:b0:477:7925:f7f3 with SMTP id 5b1f17b1804b1-477c10e1cacmr184862595e9.14.1764150365253; Wed, 26 Nov 2025 01:46:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1764150365; cv=none; d=google.com; s=arc-20240605; b=BoGDET493SM7kKOUUGqMbPm9XSJySs2RP/LMjAWUHMPqH547MbjTLbIFSt9vXKyqMj mQNBlQJwXJx9bpKbZNp8dyKq47undcpqJm0i43cRoQXdxcUzE5LGUTCmHzowJ3VZDqUg 4bUdFYvMeOuuXjoovqpybdVC0kx5/VlpsUEitGiTvqtYV0JoG9OqbAiEngX3ism4Gl63 25o524dpViwSmy6UOZFZU/Ow93C+joImXe0Lpmcvlj/7qabtma7K2dxysDeAp6tN4YK+ iL34//nuU4GQfEepA+tvR1ZDLxbIfGwLBsXzKh9EwZ5t9Lr7DjbsJ8WHDnlBaf2pJIxa 1mog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:in-reply-to:from:content-language :references:to:subject:user-agent:mime-version:date:message-id; bh=Vvpv32Gk2Gu1LIOKkj+ARoLFcoqOpm7FOdnKm7KGl5k=; fh=xEaguVBF0tSuSVpJYsv0jH295li1pT99R8G73C5QyKg=; b=cvkAYpgHMSe4+Mm7oeCzYCoxXw7U0JaueV98yihpwD/vZFCzgFMHOxQBlV0LNeM0/C Dsby/z4jJ5Zuq9qZj0iGg6B2uGLJzUg9a8xQ2hCnFyQqx+r0Lfk85XcbIGSpSaQpqKmQ ljKWX2327rvPW8ZKn1cyGm+Xi5EabyA1g0q5dysLdcsMN6Gk6VhZmRxg79kiZsI9105p UzK85IAQfBL0ptf9IMZf3mgNrx3w/0SY8D001yFJttCyXMp0QQOYj2H4/kNT2kU3QWtM LI360WFVpG2o25ltQoeEBbOODMPqhvMObzIvIuMCfqQIO2zbw+cinwyA1WJem/kJkPyt RgNQ==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Received: from shymkent.ilbers.de (shymkent.ilbers.de. [85.214.156.166]) by gmr-mx.google.com with ESMTPS id 5b1f17b1804b1-4790adc6991si152905e9.2.2025.11.26.01.46.05 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Wed, 26 Nov 2025 01:46:05 -0800 (PST) Received-SPF: pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) client-ip=85.214.156.166; Received: from [192.168.178.117] ([88.130.203.42]) (authenticated bits=0) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPSA id 5AQ9k4JE010519 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Nov 2025 10:46:04 +0100 Message-ID: <3bad420c-b60e-41dd-bdbd-d2b174d610a9@ilbers.de> Date: Wed, 26 Nov 2025 10:46:04 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] installer: hide device-mapper root partitions from target device list To: Kasturi Shekar , isar-users@googlegroups.com References: <20251120042217.1759272-1-kasturi.shekar@siemens.com> Content-Language: en-US From: Zhihang Wei In-Reply-To: <20251120042217.1759272-1-kasturi.shekar@siemens.com> Content-Type: text/plain; charset="UTF-8"; format=flowed X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-Original-Sender: wzh@ilbers.de X-Original-Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of wzh@ilbers.de designates 85.214.156.166 as permitted sender) smtp.mailfrom=wzh@ilbers.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-TUID: lm8WKOxR7CrM Applied to next, thanks. On 11/20/25 05:22, 'Kasturi Shekar' via isar-users wrote: > Root filesystems exposed through device-mapper paths (e.g., > /dev/mapper/verityroot or /dev/dm-0) were being included in the list of > installable block devices. Since these mapper devices represent the > active root filesystem, they must not appear as installation targets. > This change resolves the issue by detecting the underlying physical > device of the current root and skipping it during block device enumeration. > > Signed-off-by: Kasturi Shekar > --- > .../files/usr/bin/deploy-image-wic.sh | 61 +++++++++++++------ > 1 file changed, 41 insertions(+), 20 deletions(-) > > diff --git a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh > index b5ea8119..a4e38876 100755 > --- a/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh > +++ b/meta-isar/recipes-installer/deploy-image/files/usr/bin/deploy-image-wic.sh > @@ -36,22 +36,39 @@ if ! $installer_unattended; then > # inspired by poky/meta/recipes-core/initrdscripts/files/install-efi.sh > target_device_list="" > current_root_dev_type=$(findmnt / -o fstype -n) > + exclude_list=() > + > if [ "$current_root_dev_type" = "nfs" ]; then > current_root_dev="nfs" > + exclude_list+=("nfs") > else > - current_root_dev=$(readlink -f "$(findmnt / -o source -n)") > - current_root_dev=${current_root_dev#\/dev/} > - fi > + # For normal or immutable systems, get the backing device of '/' > + root_source=$(findmnt / -o source -n) > + root_source_resolved=$(readlink -f "$root_source" 2>/dev/null || echo "$root_source") > + current_root_dev=${root_source_resolved#/dev/} > + > + # Always exclude the exact device mounted as / > + exclude_list+=("$current_root_dev") > > - case $current_root_dev in > - mmcblk*) > - ;; > - nvme*) > - ;; > - *) > - current_root_dev=${current_root_dev%%[0-9]*} > - ;; > - esac > + base_no_part=${current_root_dev%%[0-9]*} > + if [ -n "$base_no_part" ]; then > + exclude_list+=("$base_no_part") > + fi > + > + # If root is coming through a dm-* device (e.g., dm-verity), > + # the actual physical devices appear under /sys/block//slaves/. > + # We must exclude those slaves as well, otherwise the installer > + # might show the live USB stick as a valid target. > + if [ -d "/sys/block/$current_root_dev/slaves" ]; then > + for slave in /sys/block/"$current_root_dev"/slaves/*; do > + [ -e "$slave" ] || continue > + slave_dev=$(basename "$slave") > + exclude_list+=("$slave_dev") > + slave_base=${slave_dev%%[0-9]*} > + [ -n "$slave_base" ] && exclude_list+=("$slave_base") > + done > + fi > + fi > > echo "Searching for target device..." > > @@ -102,14 +119,18 @@ if ! $installer_unattended; then > # skip ram device > ;; > *) > - case $device in > - $current_root_dev*) > - # skip the device we are running from > - ;; > - *) > - target_device_list="$target_device_list $device" > - ;; > - esac > + #skip any excluded devices (root and its slaves) > + skip_device=0 > + for ex in "${exclude_list[@]}"; do > + if [[ "$device" == "$ex"* ]]; then > + skip_device=1 > + break > + fi > + done > + > + if [ "$skip_device" -eq 0 ]; then > + target_device_list="$target_device_list $device" > + fi > ;; > esac > done -- You received this message because you are subscribed to the Google Groups "isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/3bad420c-b60e-41dd-bdbd-d2b174d610a9%40ilbers.de.