summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsegfault <segfault@riseup.net>2018-11-22 19:07:40 +0100
committerintrigeri <intrigeri@boum.org>2018-11-27 11:20:35 +0000
commit3bd144718acd6c0a89bbdff4f612ae9d0180cbf3 (patch)
tree9c0d7b7a80c54004808950773ad007e0780d5029
parentefb5e912bc209c4832a41055daa3abde975d9598 (diff)
Also set a fixed FAT volume ID (refs: #15985)
-rwxr-xr-xauto/scripts/create-usb-image-from-iso7
1 files changed, 7 insertions, 0 deletions
diff --git a/auto/scripts/create-usb-image-from-iso b/auto/scripts/create-usb-image-from-iso
index 9c880a1..41c65ea 100755
--- a/auto/scripts/create-usb-image-from-iso
+++ b/auto/scripts/create-usb-image-from-iso
@@ -321,6 +321,13 @@ class ImageCreator(object):
def set_guids(self):
execute(["/sbin/sgdisk", "--disk-guid", "17B81DA0-8B1E-4269-9C39-FE5C7B9B58A3",
"--partition-guid", "1:34BF027A-8001-4B93-8243-1F9D3DCE7DE7", self.image])
+ with open(self.partition.props.block.props.device, "wb+") as vbr:
+ # Set fixed Volume ID in the FAT boot sector
+ vbr.seek(0x43)
+ vbr.write(b"\x70\x05\x81\x8B")
+ # Set fixed volume ID in the FAT backup boot sector
+ vbr.seek(0xC43)
+ vbr.write(b"\x70\x05\x81\x8B")
def execute(cmd: list, as_root=False):