mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-11 12:15:34 +03:00
make-iso9660-image: produce stable GPT disk GUID
By generating a version-5 GUID based on $out (which contains the derivation hash) and preventing isohybrid from overwriting the GPT table (which already is populated correctly by xorriso). Tested by: * booting from USB disk on a UEFI system * booting from USB disk on a non-UEFI system * booting from CD on a UEFI system * booting from CD on a non-UEFI system * booting from CD on an OSX system Also tested that "nix-build ./nixos/release-combined.nix -A nixos.iso_minimal.x86_64-linux -I nixpkgs=~/nixpkgs-r13y --check" now succeeds. Fixes #74047
This commit is contained in:
parent
dc80d7bc4a
commit
be006eab1f
2 changed files with 7 additions and 11 deletions
|
@ -99,7 +99,12 @@ done
|
|||
|
||||
mkdir -p $out/iso
|
||||
|
||||
# daed2280-b91e-42c0-aed6-82c825ca41f3 is an arbitrary namespace, to prevent
|
||||
# independent applications from generating the same UUID for the same value.
|
||||
# (the chance of that being problematic seem pretty slim here, but that's how
|
||||
# version-5 UUID's work)
|
||||
xorriso="xorriso
|
||||
-boot_image any gpt_disk_guid=$(uuid -v 5 daed2280-b91e-42c0-aed6-82c825ca41f3 $out | tr -d -)
|
||||
-as mkisofs
|
||||
-iso-level 3
|
||||
-volid ${volumeID}
|
||||
|
@ -118,15 +123,6 @@ xorriso="xorriso
|
|||
|
||||
$xorriso -output $out/iso/$isoName
|
||||
|
||||
if test -n "$usbBootable"; then
|
||||
echo "Making image hybrid..."
|
||||
if test -n "$efiBootable"; then
|
||||
isohybrid --uefi $out/iso/$isoName
|
||||
else
|
||||
isohybrid $out/iso/$isoName
|
||||
fi
|
||||
fi
|
||||
|
||||
if test -n "$compressImage"; then
|
||||
echo "Compressing image..."
|
||||
zstd -T$NIX_BUILD_CORES --rm $out/iso/$isoName
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue