Solved Cannot bootup zroot after upgrade to mirror and detached original one.

My FreeBSD has a 250GB disk and I'm trying to upgrade it to two larger mirrored ZFS disks
I referred https://forums.freebsd.org/threads/howto-convert-single-disk-zfs-on-root-to-mirror.49702/ to upgrade form single disk to mirrored ZFS.
But when I detached original disk (ada2) it cannot boot-up.
zpool detach zroot ada2p3.eli
Did I miss something? How to remove the old disk ada2 safely?

Thanks.

Here is my current partitions:
Code:
# gpart show -lp
=>        40  1953525088    ada0  GPT  (932G)
          40      409600  ada0p1  efiboot2  (200M)
      409640        4056          - free -  (2.0M)
      413696   134217728  ada0p2  swap2  (64G)
   134631424  1818890240  ada0p3  zfs2  (867G)
  1953521664        3464          - free -  (1.7M)

=>        40  1953525088    ada1  GPT  (932G)
          40      409600  ada1p1  efiboot1  (200M)
      409640        4056          - free -  (2.0M)
      413696   134217728  ada1p2  swap1  (64G)
   134631424  1818890240  ada1p3  zfs1  (867G)
  1953521664        3464          - free -  (1.7M)

=>       40  488397088    ada2  GPT  (233G)
         40     409600  ada2p1  efiboot0  (200M)
     409640       2008          - free -  (1.0M)
     411648   16777216  ada2p2  swap0  (8.0G)
   17188864  471207936  ada2p3  zfs0  (225G)
  488396800        328          - free -  (164K

And zpool status
Code:
# zpool status -v
  pool: zroot
 state: ONLINE
  scan: resilvered 154G in 0 days 00:32:14 with 0 errors on Sun Oct 18 18:22:01 2020
config:

    NAME            STATE     READ WRITE CKSUM
    zroot           ONLINE       0     0     0
      mirror-0      ONLINE       0     0     0
        ada1p3.eli  ONLINE       0     0     0
        ada0p3.eli  ONLINE       0     0     0
        ada2p3.eli  ONLINE       0     0     0

errors: No known data errors

# zpool list
NAME    SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT
zroot   224G   154G  70.3G        -         -    45%    68%  1.00x  ONLINE  -
 
The screen update is very fast, but I can see it's loading EFI x86 stuff then shows no boot hard disk.
 
zkaa71n, can you please detail the exact error messages you're receiving upon the failed boot? Per https://www.freebsd.org/doc/en/books/handbook/boot-introduction.html, it sounds like you might be getting stuck at stage three - but we can't be sure, because we don't have enough information to clearly make a determination.

Shamelessly borrowing from http://catb.org/~esr/faqs/smart-questions.html#beprecise:
Be precise and informative about your problem
  • Describe the symptoms of your problem or bug carefully and clearly.
  • Describe the environment in which it occurs (machine, OS, application, whatever). Provide your vendor's distribution and release level (e.g.: “Fedora Core 7”, “Slackware 9.1”, etc.).
  • Describe the research you did to try and understand the problem before you asked the question.
  • Describe the diagnostic steps you took to try and pin down the problem yourself before you asked the question.
  • Describe any possibly relevant recent changes in your computer or software configuration.
  • If at all possible, provide a way to reproduce the problem in a controlled environment.
There's a lot of knowledgeable users (and developers) on the forum who will be able to help you out (and some may offer additional suggestions based on what you've provided already), but the more information you can provide, the more we'll be able to help out.
 
OK, I managed to film to boot up messages.
It first shows
Code:
>> FreeBSD EFI boot block
   Loader path: /boot/loader.efi
   Loading Path: \EFI\BOOT\BOOTX64.EFI
   Load Device: PCiRoot (0x0)/Pci(0x1f,0x2)/Sata(0x1,0x0)/HD(1,GPT,82e4cbe4-10fe-11eb-ab9b-7c0507939961,0x28,0x64000)
   BootCurrent: 000c
   BootOrder: 000a 0001 0002 000b 000c[*] 0009 0004 0005
   Probing 9 block devices............. done
    ZFS found no pools
    UFS found no partitions
Failed to load '/boot/loader.efi'
panic: No bootable partitions found!
And then next message:
Code:
ERROR: No boot disk has benn detected or the disk has failed.

Alos, something weird is that it didn't ask me GELI passphrase.

Screen capture below:
Screen Shot 2020-10-19 at 8.49.42 AM.png

Screen Shot 2020-10-19 at 8.50.46 AM.png
 
I resolved it by copy old BOOTX64.EFI (which was created by 12.1-RELEASE installer) into new disks (which were created by gpart bootcode -p /boot/boot1.efifat ).

I'm surprised gpart bootcode -p /boot/boot1.efifat has wrong BOOTX64.EFI file!
 
Back
Top