mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
replace sgdisk with sfdisk
This commit is contained in:
parent
b7c4a41666
commit
a664b6db08
1 changed files with 4 additions and 5 deletions
|
@ -267,17 +267,16 @@ _grub_mkrescue() {
|
||||||
_unify_gpt_partitions() {
|
_unify_gpt_partitions() {
|
||||||
# GPT partition layout:
|
# GPT partition layout:
|
||||||
# 1: Gap0 | 2: EFI System Partition | 3: HFS/HFS+ | 4: GAP1
|
# 1: Gap0 | 2: EFI System Partition | 3: HFS/HFS+ | 4: GAP1
|
||||||
|
echo "Creating reproducible GUID, UUIDs, hide partitions and disable automount on ISO GPT..."
|
||||||
|
sfdisk -q --disk-id "${_IMAGENAME}.iso" "00000000-0000-0000-0000-000000000000"
|
||||||
# --> already set 0: system partition (does not allow delete on Windows)
|
# --> already set 0: system partition (does not allow delete on Windows)
|
||||||
# --> already set 60: readonly
|
# --> already set 60: readonly
|
||||||
# --> 62: hide all partitions, Windows cannot access any files on this ISO
|
# --> 62: hide all partitions, Windows cannot access any files on this ISO
|
||||||
# Windows will now only error on 1 drive and not on all partitions
|
# Windows will now only error on 1 drive and not on all partitions
|
||||||
# --> 63: disable freedesktop/systemd automount by default on this ISO
|
# --> 63: disable freedesktop/systemd automount by default on this ISO
|
||||||
# --> -j 2: Move main table sector from 20 to the default 2
|
|
||||||
echo "Creating reproducible GUID, UUIDs, hide partitions, disable automount and move main table sector on ISO GPT..."
|
|
||||||
sgdisk -j 2 -U 00000000-0000-0000-0000-0000-000000000000 "${_IMAGENAME}.iso" &>"${_NO_LOG}"
|
|
||||||
for i in 1 2 3 4; do
|
for i in 1 2 3 4; do
|
||||||
sgdisk -A ${i}:set:62 -A ${i}:set:63 -u ${i}:${i}0000000-0000-0000-0000-0000-000000000000 \
|
sfdisk -q --part-attrs "${_IMAGENAME}.iso" "${i}" "RequiredPartition,60,62,63"
|
||||||
"${_IMAGENAME}.iso" &>"${_NO_LOG}"
|
sfdisk -q --part-uuid "${_IMAGENAME}.iso" "${i}" "${i}0000000-0000-0000-0000-000000000000"
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue