public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
* [PATCH] expand-on-first-boot: follow symbolic before search slave device
@ 2024-05-24 14:11 Quirin Gylstorff
  2024-06-03  6:36 ` Uladzimir Bely
  0 siblings, 1 reply; 2+ messages in thread
From: Quirin Gylstorff @ 2024-05-24 14:11 UTC (permalink / raw)
  To: johnxw, isar-users

From: Quirin Gylstorff <quirin.gylstorff@siemens.com>

The entry in /dev/mapper/... is symbolic link to /dev/dm-<X>.

This solves they following error:
```
Boot device equals root device - no partitioning found
```
in case of the following disk layout
root@demo:~# lsblk
NAME                   MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sda                      8:0    0   2.5G  0 disk
├─sda1                   8:1    0  47.4M  0 part  /boot
└─sda2                   8:2    0 447.9M  0 part
  └─encrypted_platform 252:0    0 431.9M  0 crypt /

Reported-by: Wang, John <johnxw@amazon.com>
Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
---
 .../expand-on-first-boot/files/expand-last-partition.sh         | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
index 0cb2ee21..8770677c 100755
--- a/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
+++ b/meta/recipes-support/expand-on-first-boot/files/expand-last-partition.sh
@@ -9,7 +9,7 @@
 
 set -e
 
-ROOT_DEV="$(findmnt / -o source -n)"
+ROOT_DEV="$(readlink -f "$(findmnt / -o source -n)")"
 ROOT_DEV_NAME=${ROOT_DEV##*/}
 ROOT_DEV_SLAVE=$(find /sys/block/"${ROOT_DEV_NAME}"/slaves -mindepth 1 -print -quit 2>/dev/null || true)
 while [ -d "${ROOT_DEV_SLAVE}/slaves" ]; do
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] expand-on-first-boot: follow symbolic before search slave device
  2024-05-24 14:11 [PATCH] expand-on-first-boot: follow symbolic before search slave device Quirin Gylstorff
@ 2024-06-03  6:36 ` Uladzimir Bely
  0 siblings, 0 replies; 2+ messages in thread
From: Uladzimir Bely @ 2024-06-03  6:36 UTC (permalink / raw)
  To: Quirin Gylstorff, johnxw, isar-users

On Fri, 2024-05-24 at 16:11 +0200, 'Quirin Gylstorff' via isar-users
wrote:
> From: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> 
> The entry in /dev/mapper/... is symbolic link to /dev/dm-<X>.
> 
> This solves they following error:
> ```
> Boot device equals root device - no partitioning found
> ```
> in case of the following disk layout
> root@demo:~# lsblk
> NAME                   MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
> sda                      8:0    0   2.5G  0 disk
> ├─sda1                   8:1    0  47.4M  0 part  /boot
> └─sda2                   8:2    0 447.9M  0 part
>   └─encrypted_platform 252:0    0 431.9M  0 crypt /
> 
> Reported-by: Wang, John <johnxw@amazon.com>
> Signed-off-by: Quirin Gylstorff <quirin.gylstorff@siemens.com>
> ---
>  .../expand-on-first-boot/files/expand-last-partition.sh         | 2
> +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-support/expand-on-first-boot/files/expand-
> last-partition.sh b/meta/recipes-support/expand-on-first-
> boot/files/expand-last-partition.sh
> index 0cb2ee21..8770677c 100755
> --- a/meta/recipes-support/expand-on-first-boot/files/expand-last-
> partition.sh
> +++ b/meta/recipes-support/expand-on-first-boot/files/expand-last-
> partition.sh
> @@ -9,7 +9,7 @@
>  
>  set -e
>  
> -ROOT_DEV="$(findmnt / -o source -n)"
> +ROOT_DEV="$(readlink -f "$(findmnt / -o source -n)")"
>  ROOT_DEV_NAME=${ROOT_DEV##*/}
>  ROOT_DEV_SLAVE=$(find /sys/block/"${ROOT_DEV_NAME}"/slaves -mindepth
> 1 -print -quit 2>/dev/null || true)
>  while [ -d "${ROOT_DEV_SLAVE}/slaves" ]; do
> -- 
> 2.43.0
> 

Applied to next, thanks.

-- 
Best regards,
Uladzimir.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-06-03  6:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-24 14:11 [PATCH] expand-on-first-boot: follow symbolic before search slave device Quirin Gylstorff
2024-06-03  6:36 ` Uladzimir Bely

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox