public inbox for isar-users@googlegroups.com
 help / color / mirror / Atom feed
From: Henning Schild <henning.schild@siemens.com>
To: Jan Kiszka <jan.kiszka@siemens.com>
Cc: isar-users <isar-users@googlegroups.com>,
	Christian Storm <christian.storm@siemens.com>
Subject: Re: [PATCH] expand-on-first-boot: Add support for devicemapper
Date: Thu, 21 Apr 2022 19:43:47 +0200	[thread overview]
Message-ID: <20220421194347.21b0b742@md1za8fc.ad001.siemens.net> (raw)
In-Reply-To: <8965f42b-0813-bf3e-a7ec-023d2b41db4f@siemens.com>

I learned yesterday about systemd-repart
https://www.freedesktop.org/software/systemd/man/systemd-repart.service.html

We should look at this and how mkosi puts/uses it for debian.

Not a review, just a generic remark that there might be more powerful
and ready to use tools out there. At some point i will play with this
and see if it can replace expand-on-first-boot, i bet we will soon hear
the first btrfs stories ... and maybe luks.

I know people do that with isar and their own funny scripting which can
not be found upstream.

Am Thu, 21 Apr 2022 19:10:44 +0200
schrieb Jan Kiszka <jan.kiszka@siemens.com>:

> From: Jan Kiszka <jan.kiszka@siemens.com>
> 
> When the rootfs is inside a devicemapper volume, e.g. dm-verity, the
> script so far fails to identify the boot device. This adds at least
> basic support for that case (single level, single slave). Once there
> is a good example for more complex setups, this could be taken into
> account as well.
> 
> Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
> ---
>  .../expand-on-first-boot/files/expand-last-partition.sh    | 7
> ++++++- 1 file changed, 6 insertions(+), 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 7175dfd3..bb371e9f 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
> @@ -10,8 +10,13 @@ set -e ROOT_DEV="$(findmnt / -o source -n)"
> -BOOT_DEV="$(echo "${ROOT_DEV}" | sed 's/p\?[0-9]*$//')"
> +ROOT_DEV_NAME=${ROOT_DEV##*/}
> +ROOT_DEV_SLAVE=$(ls -d /sys/block/${ROOT_DEV_NAME}/slaves/*
> 2>/dev/null | head -1) +if [ -n ${ROOT_DEV_SLAVE} ]; then
> +	ROOT_DEV=/dev/${ROOT_DEV_SLAVE##*/}
> +fi
>  
> +BOOT_DEV="$(echo "${ROOT_DEV}" | sed 's/p\?[0-9]*$//')"

Please add a wks and switch at least one CI target. In case wic can not
generate that dm-verity ... NACK, or provide the wic plugin as well.

Henning

>  if [ "${ROOT_DEV}" = "${BOOT_DEV}" ]; then
>  	echo "Boot device equals root device - no partitioning
> found" >&2 exit 1


  reply	other threads:[~2022-04-21 17:43 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-21 17:10 Jan Kiszka
2022-04-21 17:43 ` Henning Schild [this message]
2022-04-21 18:49   ` Jan Kiszka
2022-04-21 19:05   ` Henning Schild
2022-04-22  6:28     ` Tobias Schaffner
2022-04-22  7:21       ` Henning Schild
2022-04-22  9:08       ` Jan Kiszka
2022-05-14 14:05 ` Anton Mikanovich
2022-05-19 11:51   ` Moessbauer, Felix
2022-05-19 12:23     ` Henning Schild

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=20220421194347.21b0b742@md1za8fc.ad001.siemens.net \
    --to=henning.schild@siemens.com \
    --cc=christian.storm@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