Fix wrong partition types
This commit is contained in:
parent
65e4ccd4a8
commit
375825c1e8
|
@ -387,7 +387,7 @@ disk_format_btrfs() {
|
||||||
|
|
||||||
# Collect extra arguments
|
# Collect extra arguments
|
||||||
extra_args=()
|
extra_args=()
|
||||||
if [[ -v "arguments[raid_type]" ]]; then
|
if [[ "${#devices}" -gt 1 ]] && [[ -v "arguments[raid_type]" ]]; then
|
||||||
extra_args+=("-d" "$raid_type")
|
extra_args+=("-d" "$raid_type")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -216,7 +216,12 @@ format() {
|
||||||
declare -A arguments; parse_arguments "$@"
|
declare -A arguments; parse_arguments "$@"
|
||||||
|
|
||||||
verify_existing_id id
|
verify_existing_id id
|
||||||
verify_option type bios efi swap ext4
|
verify_option type bios efi swap ext4 btrfs
|
||||||
|
|
||||||
|
local type="${arguments[type]}"
|
||||||
|
if [[ "$type" == "btrfs" ]]; then
|
||||||
|
USED_BTRFS=true
|
||||||
|
fi
|
||||||
|
|
||||||
DISK_ACTIONS+=("action=format" "$@" ";")
|
DISK_ACTIONS+=("action=format" "$@" ";")
|
||||||
}
|
}
|
||||||
|
@ -399,8 +404,8 @@ create_btrfs_raid_layout() {
|
||||||
create_gpt new_id="gpt_dev0" device="${extra_arguments[0]}"
|
create_gpt new_id="gpt_dev0" device="${extra_arguments[0]}"
|
||||||
create_partition new_id="part_${type}_dev0" id="gpt_dev0" size=256MiB type="$type"
|
create_partition new_id="part_${type}_dev0" id="gpt_dev0" size=256MiB type="$type"
|
||||||
[[ $size_swap != "false" ]] && \
|
[[ $size_swap != "false" ]] && \
|
||||||
create_partition new_id="part_swap_dev0" id="gpt_dev0" size="$size_swap" type=raid
|
create_partition new_id="part_swap_dev0" id="gpt_dev0" size="$size_swap" type=swap
|
||||||
create_partition new_id="part_root_dev0" id="gpt_dev0" size=remaining type=raid
|
create_partition new_id="part_root_dev0" id="gpt_dev0" size=remaining type=linux
|
||||||
|
|
||||||
local root_id
|
local root_id
|
||||||
local root_ids=""
|
local root_ids=""
|
||||||
|
|
Loading…
Reference in New Issue