[PATCH] installer: improve root device detection and skip additional devices

9 views
Skip to first unread message

Badrikesh Prusty

unread,
Feb 12, 2026, 3:25:08 PM (7 days ago) Feb 12
to isar-...@googlegroups.com, Badrikesh Prusty
Strip trailing digits correctly to determine the base device name for
p-style partitioned devices such as mmcblk0p2 and nvme0n1p3. Handle
these devices by removing the p<partition> suffix while preserving
behavior for traditional devices like sda1.

Skip device-mapper (dm-*) and zram (zram*) devices to prevent
presenting virtual or non-installable devices as installation targets.

Signed-off-by: Badrikesh Prusty <badrikes...@siemens.com>
---
.../deploy-image/files/usr/bin/deploy-image-wic.sh | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)

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 ca586aa6..9c041a50 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
@@ -64,7 +64,11 @@ if ! $installer_unattended; then
# Always exclude the exact device mounted as /
exclude_list+=("$current_root_dev")

- base_no_part=${current_root_dev%%[0-9]*}
+ if [[ "$current_root_dev" =~ ^(mmcblk|nvme) ]]; then
+ base_no_part="${current_root_dev%p[0-9]*}"
+ else
+ base_no_part="${current_root_dev%%[0-9]*}"
+ fi
if [ -n "$base_no_part" ]; then
exclude_list+=("$base_no_part")
fi
@@ -121,6 +125,9 @@ if ! $installer_unattended; then
fi

case $device in
+ dm-*)
+ # skip device-mapper device
+ ;;
loop*)
# skip loop device
;;
@@ -132,6 +139,9 @@ if ! $installer_unattended; then
ram*)
# skip ram device
;;
+ zram*)
+ # skip zram device
+ ;;
*)
#skip any excluded devices (root and its slaves)
skip_device=0
--
2.39.5

Zhihang Wei

unread,
Feb 18, 2026, 3:25:15 AM (yesterday) Feb 18
to Badrikesh Prusty, isar-...@googlegroups.com
Applied to next, thanks.

Zhihang
Reply all
Reply to author
Forward
0 new messages