Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Can't write boot code to ZFS replacement drive

    Scheduled Pinned Locked Moved Problems Installing or Upgrading pfSense Software
    3 Posts 2 Posters 693 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • V
      vitaprimo
      last edited by

      I just replaced a drive from a ZFS mirror following the advice in the ZFS sticky, the command line's and some blog I found; I was able to replace the drive successfully, actually it was easier than I though it was gonna be, but in the last step I'm asked to write the boot code but it won't let me.

      I did zpool status and the array is full online. I had like 5min downtime. ๐Ÿ˜

      1 Reply Last reply Reply Quote 0
      • D
        droeders
        last edited by

        Try running the following sysctl, and then re-run the gpart command:

        
        sysctl kern.geom.debugflags=0x10
        
        
        1 Reply Last reply Reply Quote 0
        • V
          vitaprimo
          last edited by

          [2.4.2-RELEASE][root@ FQDN]/root: sysctl kern.geom.debugflags=0x10
          kern.geom.debugflags: 0 -> 16

          [2.4.2-RELEASE][root@FQDN]/root: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0
          gpart: /dev/ada0p1: Operation not permitted

          Then I went rogue and tried my own:

          [2.4.2-RELEASE][root@FQDN]/root: gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0p1
          gpart: No such geom: ada0p1.

          As you may see, I have no clue how disk geometry works. ๐Ÿ˜‚ I'm very happy I didn't for more than a few minutes offline though, now I have time to schedule a reinstall. Whoever came up with backup & restores on pfSense is a f*cking genius! They way packages reinstall themselves and everything is back as before it just amazing. Thanks for your help!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.