Manual partitioning without wipe: deleting an existing partition crashes installer (wipefs runs on deleted partition path)
Maintainer thường phản hồi trong vòng 1 ngày
Đánh giá
- Độ khó
- 2/5
- Thời gian dự kiến
- 1-3 giờ
- Mức phù hợp với người mới
- 72/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Đặc tả rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- linux, python
- Lĩnh vực
- backend, operating-systems
Hướng nghiên cứu
Đọc archinstall/lib/disk/device_handler.py quanh DeviceHandler.partition() và _setup_partition(), sau đó kiểm tra các hàm hỗ trợ trạng thái của PartitionModification trong archinstall/lib/models/device.py. Theo dõi cách các mục DELETE đi đến vòng lặp xóa chữ ký và tái hiện lỗi với một ổ đĩa không trống, bằng cách phân vùng thủ công mà không xóa. Công việc hoàn tất khi việc xóa một phân vùng hiện có không còn chạy wipefs trên đường dẫn thiết bị đã bị xóa và quá trình cài đặt tiếp tục.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
ISO version
Not reproduced from a specific ISO — this bug was found by source analysis of master (commit 2c25540) and verified at component level (see evidence below). The affected code path exists in current master.
The installation log
No full install log available (static analysis). The failure point is deterministic, see "Root cause" below. The uncaught exception raised at that point is:
SysCallError: ['wipefs', '--all', '/dev/sdaX'] exited with abnormal exit code [1]:
wipefs: error: /dev/sdaX: probing initialization failed: No such file or directory
wipefs returning exit code 1 for a non-existent device node was verified locally:
$ wipefs --all /dev/sda99
wipefs: error: /dev/sda99: probing initialization failed: No such file or directory
$ echo $?
1
Summary
When installing onto a non-empty disk via manual partitioning without wiping the whole device, marking any existing partition for deletion crashes the installation with an uncaught SysCallError: the signature-wipe loop runs wipefs --all against the device path of the partition that was just deleted.
Steps to reproduce
- Start
archinstallon a machine with a disk that already contains partitions (e.g. a previous installation). - Disk setup → Manual Partitioning (do not wipe the whole disk).
- Select an existing partition → Delete partition.
- Proceed with the installation (creating new partitions in the freed space afterwards is optional — not required to trigger the bug).
Expected behavior
The partition marked as deleted is removed during DeviceHandler.partition() and the installation continues.
Actual behavior
The installation aborts with the uncaught SysCallError shown above as soon as partition() reaches the signature-wipe loop.
Root cause
Verified on master @ 2c25540:
-
DeviceHandler.partition()collects every partition that is notEXIST— which also includesDELETEentries — intofiltered_part(archinstall/lib/disk/device_handler.py:543):# don't touch existing partitions filtered_part = [p for p in modification.partitions if not p.exists()]PartitionModification.exists()only checksstatus == ModificationStatus.EXIST(archinstall/lib/models/device.py:1028-1029). -
For a
DELETEentry,_setup_partition()deletes the on-disk partition and returns early, leavingpart_mod.dev_pathpointing at the now-removed device node (archinstall/lib/disk/device_handler.py:349-361):if requires_delete and part_mod.status in [ModificationStatus.MODIFY, ModificationStatus.DELETE]: ... disk.deletePartition(part_info.partition) if part_mod.status == ModificationStatus.DELETE: return -
After
disk.commit()(device_handler.py:559) the kernel removes the/dev/sdaXnode. -
The signature-wipe loop then iterates over the same
filtered_partlist and runswipefson the stale path of the deleted partition (device_handler.py:561-566):# Wipe filesystem/LVM signatures from newly created partitions # to prevent "signature detected" errors for part_mod in filtered_part: if part_mod.dev_path: debug(f'Wiping signatures from: {part_mod.dev_path}') SysCommand(f'wipefs --all {part_mod.dev_path}')Despite the comment, the list is not limited to newly created partitions. The
if part_mod.dev_path:guard never filtersDELETEentries out:__post_init__requires a path for allis_exists_or_modify()entries, and that set includesDELETE(archinstall/lib/models/device.py:927-928, 1031-1036). -
SysCommandWorker.__exit__raisesSysCallErrorfor any non-zero exit code (archinstall/lib/command.py:111-116) and the call site has no try/except → the installation crashes.
The path is fully reachable from the guided TUI: manual partitioning defaults to wipe=False (archinstall/lib/disk/disk_menu.py:355) and the "Delete partition" action sets status = ModificationStatus.DELETE (archinstall/lib/disk/partitioning_menu.py:355-362).
Suggested fix
Skip entries that were only deleted when wiping signatures:
for part_mod in filtered_part:
if part_mod.status == ModificationStatus.DELETE or not part_mod.dev_path:
continue
debug(f'Wiping signatures from: {part_mod.dev_path}')
SysCommand(f'wipefs --all {part_mod.dev_path}')
(or iterate over [p for p in filtered_part if p.is_create_or_modify()] instead).
Related observation (same scenario)
While repartitioning a non-empty disk, DeviceHandler.umount_all_existing() (device_handler.py:505-517) only unmounts filesystems and locks LUKS devices — it never calls swapoff (no swapoff call exists anywhere in the codebase). If an existing swap partition on the target disk is active, deleting that partition will make parted fail with "Device or resource busy".
- Ngôn ngữ chính
- Python
- Star
- 8.5k
- Fork
- 785
- Merge trung bình
- 15 giờ 35 phút
- Pull request đã merge (30 ngày)
- 16
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của archlinux/archinstall
-
Same town at timezone listĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
archlinux/archinstall#4836 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
dms profileCó thể đã có người làm @h8d13 đã nhận 23 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
archlinux/archinstall#4820 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
wipe_dev() fails with ENOSPC on partitions smaller than 1024 bytes (ChromeOS GPT layouts)Có thể đã có người làm @edu-ap đã nhận 26 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
archlinux/archinstall#4807 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Enrolling fido2 mid installĐang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
archlinux/archinstall#4603 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Create `archinstall-meta` package to tie in all dependenciesCó thể đã có người làm @VykosMolt đã nhận 55 ngày trước. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
archlinux/archinstall#4385 · 2 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của archlinux/archinstall
Issue tương tự
-
[Resource] agent-claimcheckĐang mở
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 85/100
yzhao062/awesome-auditable-ai#45 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
NVIDIA/flare-local-inference#90 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area/streaming comp/gateway P2 platform/telegram type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
NousResearch/hermes-agent#144897 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
request-theme
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
LizardByte/ThemerrDB#9575 ·
Maintainer thường phản hồi trong vòng 1 ngày