V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 41s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-07-27 17:07:27 +02:00
parent 6caacb541b
commit 9be2bc1083
13 changed files with 774 additions and 124 deletions

View File

@@ -109,9 +109,13 @@ partitioning() {
var_boot=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.bootable" "${VAR_SETUP_PART}")
var_pri=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.primary" "${VAR_SETUP_PART}")
var_mount_path=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.mount.path" "${VAR_SETUP_PART}")
var_label=$(yq_val ".recipe.${VAR_RECIPE_STRING}.dev.${var_dev}.${var_part}.label" "${VAR_SETUP_PART}")
### Assign the landing zone of each partition.
### Assign the start zone of the first partition and skip the first 2 MiB as best practice.
if [[ "${var_begin,,}" == "min" ]]; then
var_begin="2MiB"
fi
### Assign the landing zone of the last partition and reserve 16 MiB for GPT and mdadm binary metadata.
if [[ "${var_end,,}" == "max" ]]; then
var_dev_size=$(blockdev --getsize64 "/dev/${var_dev}")
var_dev_end=$(( var_dev_size - 16 * 1024 * 1024 ))
@@ -124,6 +128,9 @@ partitioning() {
case "${VAR_RECIPE_TABLE,,}" in
gpt)
var_label=$(get_label "${var_mount_path}" "${var_fs}" "part")
if ! parted -s "/dev/${var_dev}" mkpart "${var_label}" "${var_fs}" "${var_begin}" "${var_end_arg}"; then
do_log "fatal" "file_only" "3200() [parted -s /dev/${var_dev} mkpart ${var_label} ${var_fs} ${var_begin} ${var_end_arg}] failed."