[Bug 301022] bsdinstall(8): add option to wipe disks for scripted installations
Date: Sun, 22 Nov 2026 22:02:03 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=301022
Bug ID: 301022
Summary: bsdinstall(8): add option to wipe disks for scripted
installations
Product: Base System
Version: 15.1-RELEASE
Hardware: Any
OS: Any
Status: New
Severity: Affects Many People
Priority: ---
Component: bin
Assignee: bugs@FreeBSD.org
Reporter: vermaden@interia.pl
Hi,
as suggested here:
- https://github.com/freebsd/freebsd-src/pull/2541#issuecomment-7068868169
I am creating new ticket for potential automatic wiping of disks for
automated/scripted installation.
See Also:
- https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=300044
Example 'wiping' implementations:
- https://github.com/vermaden/scripts/blob/master/storage-wipe-clean-end.sh
-
https://codeberg.org/ngie/freebsd-powertools/src/branch/main/shell/wipe-gpt-partitions.sh
Potential variable name for that purpose:
- ZFSBOOT_WIPE_DISKS=YES
It should at least clear these:
- partition table/schema:
# gpart destroy -F ${DEV}
- ZFS labels:
# zpool labelclear -f ${DEV}"
- leftovers:
# dd bs=1m count=20 if=/dev/zero of=${DEV}
# DISKINFO=$( diskinfo -v ${DEV} )
# MED_SIZE=$( echo "${DISKINFO}" | awk '/# mediasize in sectors/ {print $1}'
)
# SEC_SIZE=$( echo "${DISKINFO}" | awk '/# sectorsize/ {print $1}'
)
# DD_OSEEK=$(( ${MED_SIZE} - ( ${SEC_SIZE} * 40 ) ))
# dd bs=${SEC_SIZE} if=/dev/zero of=${DEV} oseek=${DD_OSEEK}
Regards,
vermaden
--
You are receiving this mail because:
You are the assignee for the bug.