Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

wipe_dev() fails with ENOSPC on partitions smaller than 1024 bytes (ChromeOS GPT layouts)

未关闭 适合新手
#4,807 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

@edu-ap 已经在做这个了。

开始于 2026年9月29日。

  • #4809 来自 @edu-ap —— 未关闭
  • #4822 来自 @h8d13 —— 未关闭

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
78/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
linux, python

调研方向

从 archinstall/lib/disk/device_handler.py 开始,重点查看 DeviceHandler.wipe_dev() 和 _wipe(),然后运行 issue 中独立的 loop-device 复现。完成的标准是:擦除 512 字节分区不再引发 ENOSPC,同时普通分区仍会将 1024 字节置零。

由索引模型根据 Issue 内容生成。

描述

Which ISO version are you using?

Omarchy 4.0.4 ISO, which ships archinstall 4.4 unmodified: its archinstall/lib/disk/device_handler.py is byte-identical to the 4.4 tag. The affected code is unchanged on master.

The installation log

Not available: the live session was rebooted before /var/log/archinstall/install.log was saved. There is a standalone reproduction below instead. omacom/omarchy#9246 quotes the traceback from the same failure on other machines, ending in open(dev_path, "wb") → OSError: [Errno 28] No space left on device.

describe the problem

A wipe/full-disk install of a disk previously used by ChromeOS or ChromeOS Flex fails with OSError: [Errno 28] No space left on device.

DeviceHandler.wipe_dev() calls _wipe() on every existing partition, and _wipe() writes a fixed 1024 bytes:

with open(dev_path, 'wb') as p:
	p.write(bytearray(1024))

ChromeOS GPT layouts contain several 512-byte partitions (KERN-C, ROOT-C, reserved and firmware slots). The ChromiumOS disk-format reference says "Each minimal-size partition (including the C kernel and C rootfs) is only 512 bytes". Writing 1024 bytes to one of them fails after 512 bytes with ENOSPC, which aborts the installation.

Reproduction (as root, any Linux):

truncate -s 64M t.img
sgdisk -o -a 1 -n 6:100:100 t.img && sgdisk -a 2048 -n 1:2048:0 t.img   # one 512-byte partition, one normal
LOOP=$(losetup -fP --show t.img)
python -c "with open('${LOOP}p6', 'wb') as p: p.write(bytearray(1024))"   # OSError: [Errno 28] No space left on device
python -c "with open('${LOOP}p1', 'wb') as p: p.write(bytearray(1024))"   # fine

Reproduced on Linux 6.8 (loop device) and under the Omarchy ISO's 7.2.4 kernel with an NVMe disk. Seen on real hardware on a Lenovo ThinkPad (Samsung NVMe) and on two MacBook Airs (omacom/omarchy#9246), each after ChromeOS Flex. Clearing the partition table first (wipefs -a + sgdisk --zap-all) avoids it.

A fix follows in a pull request: write min(1024, device size) bytes, taking the size from seeking to the end of the block device. On normal partitions the behaviour is unchanged (1024 bytes zeroed); on a 512-byte partition all 512 bytes are zeroed instead of raising.

主要语言
Python
星标
8.5k
派生
774
平均合并
1 天 5 小时
30 天内合并 PR
25

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

archlinux/archinstall 的其他 Issue

查看 archlinux/archinstall 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。