Commit 10bf026d authored by Nikos Skalkotos's avatar Nikos Skalkotos
Browse files

Fix a bug in FixPartitionTable task

Trying to add a logical swap partition after an already existing logical
partition triggered an error in parted, because between logical partitions
a gap of at least 1 sector needs to be present.
parent ebba4508
......@@ -108,6 +108,10 @@ elif [ $last_part_id -gt 4 ]; then
else
# Enlarge the extended partition
if [ $swap_num -ge 5 ]; then
# This is needed because logical partitions need to have at least
# 1 sector gap between them. We make the gap 2048 sectors to
# properly align them.
new_end=$((new_end - 2048))
enlarge_partition "$SNF_IMAGE_DEV" "$extended" "extended" "${swap_end}s"
else
enlarge_partition "$SNF_IMAGE_DEV" "$extended" "extended" "${new_end}s"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment