wipe_dev() fails with ENOSPC on partitions smaller than 1024 bytes (ChromeOS GPT layouts)
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 78/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- linux, python
- Ambito
- operating-systems
Direzione di ricerca
Inizia da archinstall/lib/disk/device_handler.py, concentrandoti su DeviceHandler.wipe_dev() e _wipe(), quindi esegui la riproduzione autonoma con loop-device dell’issue. Il lavoro è completato quando la cancellazione di partizioni da 512 byte non genera più ENOSPC, mentre le partizioni normali continuano ad avere 1024 byte azzerati.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- Python
- Stelle
- 8.5k
- Fork
- 774
- Merge medio
- 1g 23h
- PR unite (30g)
- 27
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di archlinux/archinstall
-
Same town at timezone listAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
archlinux/archinstall#4836 ·
I maintainer di solito rispondono entro 1 giorno
-
dms profileForse già presa @h8d13 l’ha presa 5 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
archlinux/archinstall#4820 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Enrolling fido2 mid installAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
archlinux/archinstall#4603 ·
I maintainer di solito rispondono entro 1 giorno
-
Create `archinstall-meta` package to tie in all dependenciesForse già presa @VykosMolt l’ha presa 37 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
archlinux/archinstall#4385 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 30/100
archlinux/archinstall#4813 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di archlinux/archinstall
Issue simili
-
changelog investigate
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
ramnes/notion-sdk-py#409 ·
-
good first issue help wanted
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
lindicaphxag-tech/kaggle#28 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
BSData/horus-heresy-3rd-edition#3211 ·
I maintainer di solito rispondono entro 1 giorno
-
bug needs-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
I maintainer di solito rispondono entro 1 giorno
-
Unreachable-proxy mount test depends on fixed port 9999Forse già presa Una pull request collegata a questa issue è aperta o già unita. Apertabug tests
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
I maintainer di solito rispondono entro 1 giorno