From: Uladzimir Bely <ubely@ilbers.de>
To: alexander.heinisch@siemens.com, isar-users@googlegroups.com
Cc: jan.kiszka@siemens.com
Subject: Re: [PATCH] meta-isar: Added support for nfs based rootfs in deploy-image-wic (isar-image-installer).
Date: Wed, 04 Sep 2024 11:23:06 +0300 [thread overview]
Message-ID: <022c84b4d1297d88a552509cee74497217dce6d6.camel@ilbers.de> (raw)
In-Reply-To: <20240828114615.123711-1-alexander.heinisch@siemens.com>
On Wed, 2024-08-28 at 13:46 +0200, alexander.heinisch via isar-users
wrote:
> From: Alexander Heinisch <alexander.heinisch@siemens.com>
>
> When AUTO_INSTALL is not used, the script tries to resolve possible
> target devices to
> install the wic image to. To not overwrite the device hosting the
> current root
> we are using, it tries to detect the current root. Which works fine
> when a local device
> is used but does not work in the case of nfs. (most probably it won't
> work for cifs as well)
>
> With this patch we are detecting nfs based mounts of / before the
> local device tailored handling
> is applied and bypass the breaking parts (in this particular case
> readlink).
>
> Thus, in case of an nfs the current root device will be "nfs".
>
> Signed-off-by: Alexander Heinisch <alexander.heinisch@siemens.com>
> ---
> .../deploy-image/files/deploy-image-wic.sh | 10
> ++++++++--
> 1 file changed, 8 insertions(+), 2 deletions(-)
>
> diff --git a/meta-isar/recipes-installer/deploy-image/files/deploy-
> image-wic.sh b/meta-isar/recipes-installer/deploy-image/files/deploy-
> image-wic.sh
> index 8b25b1d2..95188fe3 100644
> --- a/meta-isar/recipes-installer/deploy-image/files/deploy-image-
> wic.sh
> +++ b/meta-isar/recipes-installer/deploy-image/files/deploy-image-
> wic.sh
> @@ -47,8 +47,14 @@ DISK_BMAP=$(find "$installdata" -type f -iname
> "${DISK_IMAGE%.wic*}.wic.bmap")
>
> if ! $AUTO_INSTALL; then
> target_device_list=""
> - current_root_dev=$(readlink -f "$(findmnt / -o source -n)")
> - current_root_dev=${current_root_dev#\/dev/}
> + current_root_dev_type=$(findmnt / -o fstype -n)
> + if [ ${current_root_dev_type} = "nfs" ]; then
> + current_root_dev="nfs"
> + else
> + current_root_dev=$(readlink -f "$(findmnt / -o source -n)")
> + current_root_dev=${current_root_dev#\/dev/}
> + fi
> +
> case $current_root_dev in
> mmcblk*)
> ;;
> --
> 2.43.0
>
Applied to next, thanks.
--
Best regards,
Uladzimir.
--
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 on the web visit https://groups.google.com/d/msgid/isar-users/022c84b4d1297d88a552509cee74497217dce6d6.camel%40ilbers.de.
next prev parent reply other threads:[~2024-09-04 8:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-28 11:46 alexander.heinisch via isar-users
2024-09-04 8:23 ` Uladzimir Bely [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-08-28 11:19 alexander.heinisch via isar-users
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=022c84b4d1297d88a552509cee74497217dce6d6.camel@ilbers.de \
--to=ubely@ilbers.de \
--cc=alexander.heinisch@siemens.com \
--cc=isar-users@googlegroups.com \
--cc=jan.kiszka@siemens.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox