Skip to content

Commit

Permalink
mkimage-raw-efi: Find persist partition when installing into another …
Browse files Browse the repository at this point in the history
…disk

When installing persist into another storage device, the installer
script must search for the persist partition (and mount it) in the
corresponding destination and not in the main storage device. This can
be achieved by simply looking to INSTALL_PERSIST variable instead of
INSTALL_DEV.

Signed-off-by: Renê de Souza Pinto <[email protected]>
  • Loading branch information
rene authored and OhmSpectator committed Sep 25, 2024
1 parent 77c2f13 commit 8e15ac9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/mkimage-raw-efi/install
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ if [ "$INSTALL_ZFS" = true ]; then
done
fi
else
P3="$(find_part P3 "$INSTALL_DEV")"
P3="$(find_part P3 "$INSTALL_PERSIST")"
[ -z "$P3" ] && bail "Installation failed. Cannot found P3. Entering shell..."
# attempt to zero the first and last 5Mb of the P3 (to get rid of any residual prior data)
dd if=/dev/zero of="/dev/$P3" bs=512 count=10240 2>/dev/null
Expand All @@ -428,7 +428,7 @@ else
mkfs -t ext4 -v -F -F -O encrypt "/dev/$P3"
mkdir -p /persist
# now the disk is ready - mount partitions
mount_part P3 "$INSTALL_DEV" /persist 2>/dev/null
mount_part P3 "$INSTALL_PERSIST" /persist 2>/dev/null
fi


Expand Down

0 comments on commit 8e15ac9

Please sign in to comment.