Conversation
…n 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 <noreply@anthropic.com>
Contributor
|
This looks legit to me. And well-scoped. Whether the code is good, is another question maybe @codefiles can answer. |
Torxed
approved these changes
Sep 30, 2026
Contributor
Contributor
|
I will likely end up replacing this device wiping code in the future anyway. As I've stated elsewhere, I am prioritizing enabling linting rules before making any other changes. |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #4807.
DeviceHandler._wipe()writes a fixed 1024 bytes to every partition. ChromeOS GPT layouts contain 512-byte partitions (KERN-C, ROOT-C, reserved; see the ChromiumOS disk format reference: "Each minimal-size partition (including the C kernel and C rootfs) is only 512 bytes"). So wiping a disk that previously ran ChromeOS or ChromeOS Flex raisesOSError: [Errno 28] No space left on deviceand aborts the installation. It has been hit on a Lenovo ThinkPad and on two MacBook Airs via the Omarchy installer (omacom/omarchy#9246).This change writes
min(1024, device size)bytes, taking the size from seeking to the end of the block device.Tested on loop-device partitions (block devices, Linux 6.8), each pre-filled with
0xFF:OSError: [Errno 28] No space left on deviceruff check,ruff format --checkandflake8pass. I couldn't runmypylocally because my Python was older than the syntax the codebase uses, so I'm relying on CI for that.🤖 Generated with Claude Code