OPNsense Forum

English Forums => General Discussion => Topic started by: vivekmauli14 on September 19, 2025, 07:22:52 AM

Title: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: vivekmauli14 on September 19, 2025, 07:22:52 AM
On a previosuly installed opnsense 25.7 when I booted into the 25.7 installer for reinstalling, it would fail with errors like "No disks present". When I dropped into the live shell to wipe the disk manually, I hit a wall of errors:

gpart destroy failed with Device busy

zpool destroy -f zroot failed with pool or dataset is busy

Even the low-level dd command failed with Operation not permitted

I was completely locked out from touching the internal hard drive, even as root. This was new to me; I've reinstalled older versions like 24.7 on many devices before without ever seeing this kind of stubborn lock.

How do I smoothly reinstall the machine without needing of another bootables of Gpart for drive cleaning ?

Thanks
Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: Patrick M. Hausen on September 19, 2025, 08:06:53 AM
What does zpool status say in the live shell?
Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: vivekmauli14 on September 22, 2025, 11:26:58 AM
Hi Patrick,

My zpool status returns this :

root@Marge:~ # zpool status
  pool: zroot
 state: ONLINE
config:

        NAME        STATE     READ WRITE CKSUM
        zroot       ONLINE       0     0     0
          ada0p4    ONLINE       0     0     0

errors: No known data errors
root@opnsense:~ #


Also am I the only one facing this issue while reinstalling?
Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: Patrick M. Hausen on September 22, 2025, 12:44:50 PM
Then type "mount" please and post the output.
Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: vivekmauli14 on September 30, 2025, 07:55:42 AM
Hi Patrick,

This is the output for mount: mount (https://ibb.co/tMrKkqbs)
Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: Patrick M. Hausen on September 30, 2025, 10:24:07 AM
Please post the output here, I am not clicking on obscure external links. You can attach images right in the forum. Also I block so called "image hosting" services.
Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: vivekmauli14 on September 30, 2025, 10:46:16 AM
Oh alright:

Here it is:

(https://i.ibb.co/4Zrt98jT/Screenshot-2025-09-30-112357.png)

root@Marge:~ # mount
/dev/iso9660/OPNSENSE_INSTALL on / (cd9660, local, read-only)
devfs on /dev (devfs)
tmpfs on /tmp (tmpfs, local)
zroot/tmp on /tmp (zfs, local, noatime, nosuid, nfsv4acls)
zroot/usr/src on /usr/src (zfs, local, noatime, nfsv4acls)
zroot/var/mail on /var/mail (zfs, local, nfsv4acls)
zroot/home on /home (zfs, local, noatime, nfsv4acls)
zroot/var/audit on /var/audit (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/crash on /var/crash (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/log on /var/log (zfs, local, noatime, noexec, nosuid, nfsv4acls)
zroot/var/tmp on /var/tmp (zfs, local, noatime, nosuid, nfsv4acls)
<above>:/tmp/.cdrom/boot on /boot (unionfs, local, noatime, nosuid, nfsv4acls)
<above>:/tmp/.cdrom/conf on /conf (unionfs, local, noatime, nosuid, nfsv4acls)
<above>:/tmp/.cdrom/etc on /etc (unionfs, local, noatime, nosuid, nfsv4acls)
<above>:/tmp/.cdrom/home on /home (unionfs, local, noatime, nosuid, nfsv4acls)
<above>:/tmp/.cdrom/root on /root (unionfs, local, noatime, nosuid, nfsv4acls)
<above>:/tmp/.cdrom/usr on /usr (unionfs, local, noatime, nosuid, nfsv4acls)
<above>:/tmp/.cdrom/var on /var (unionfs, local, noatime, nosuid, nfsv4acls)
devfs on /var/dhcpd/dev (devfs)
devfs on /var/unbound/dev (devfs)
/usr/local/lib/python3.11 on /var/unbound/usr/local/lib/python3.11 (nullfs, local, read-only)
/lib on /var/unbound/lib (nullfs, local, read-only)
root@Marge:~ #


Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: Patrick M. Hausen on September 30, 2025, 10:48:12 AM
The zpool is imported/mounted as I suspected. That is why you cannot overwrite it.

Try

zpool export zroot
Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: vivekmauli14 on September 30, 2025, 11:02:42 AM
It says:

root@OPNsense:~ # zpool export zroot
cannot unmount '/var/log': pool or dataset is busy
root@OPNsense:~ #

and for every try got this device busy error.

Do I need to rename the default dataset for this from zroot to something else?
Title: Re: Reinstalling OPNsense 25.7 on a ZFS Disk? ("No Disks Present" / "Device Busy")
Post by: Patrick M. Hausen on September 30, 2025, 11:11:21 AM
I would boot into something different from the OPNsense installer - plain FreeBSD or Linux - and wipe the disk with dd at this stage.

I don't know why the installer would import an existing pool.