From ba3a1344b0c56259a640c3c6be08b05260a96710 Mon Sep 17 00:00:00 2001 From: Eduardo Aguilar Pelaez <4599806+edu-ap@users.noreply.github.com> Date: Tue, 29 Sep 2026 13:15:17 +0000 Subject: [PATCH] fix(#4807): don't write past the end of small partitions when wiping DeviceHandler._wipe() wrote a fixed 1024 bytes to every partition. ChromeOS GPT layouts contain 512-byte partitions (KERN-C, ROOT-C, reserved), so wiping a disk that previously ran ChromeOS or ChromeOS Flex failed with OSError: [Errno 28] No space left on device and aborted the installation. Write min(1024, device size) bytes instead. Normal partitions are wiped exactly as before; 512-byte partitions are zeroed completely. Co-Authored-By: Claude Opus 5.5 --- archinstall/lib/disk/device_handler.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/archinstall/lib/disk/device_handler.py b/archinstall/lib/disk/device_handler.py index 88e08653e8..7f582095cd 100644 --- a/archinstall/lib/disk/device_handler.py +++ b/archinstall/lib/disk/device_handler.py @@ -617,7 +617,11 @@ def _wipe(self, dev_path: Path) -> None: @type dev_path: str """ with open(dev_path, 'wb') as p: - p.write(bytearray(1024)) + # Never write past the end of the device: ChromeOS GPT layouts contain + # 512-byte partitions, and a 1024-byte write to them fails with ENOSPC. + size = p.seek(0, os.SEEK_END) + p.seek(0) + p.write(bytearray(min(1024, size))) def wipe_dev(self, block_device: BDevice) -> None: """