Skip to content

Commit

Permalink
Merge pull request #991 from NeroReflex/fix_install
Browse files Browse the repository at this point in the history
  • Loading branch information
ruineka authored Jul 27, 2024
2 parents cb9493e + 1cb0736 commit 55587da
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions rootfs/usr/lib/frzr.d/install-0003-root_part_gpt.migration
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ post_install() {
echo "Fetching partition number of partition '$subcmd'"
local part_number=$(echo "${subcmd: -1}")

local disk=$(echo "$subcmd" | sed 's/p[0-9]*$//')
local disk=$(echo "$subcmd" | sed -E 's/p[0-9]+$|[0-9]+$//')
local filtered_uuid=$(echo "${possible_uuid}" | grep -E '[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}')

echo "Setting partition ${part_number} of disk ${disk} (UUID='${filtered_uuid}') to GPT type 'Linux Root (x86-64)'"

if [ -z $filtered_uuid ] || [ -z $subcmd ] || [ -z part_number ] || [ -z disk ]; then
echo "Error retrieving the rootfs UUID: ${rootfs_uuid}"
echo "ERROR: Could not retrieve the rootfs UUID: ${rootfs_uuid}"
exit 1
else
echo "Writing the correct GPT type to the partition ${part_number} of disk ${disk}"
parted --script "${disk}" type "${part_number}" "4F68BCE3-E8CD-4DB1-96E7-FBCAF984B709"
echo "OK"
fi
}

0 comments on commit 55587da

Please sign in to comment.