Solved ada0p* disappearing after mounting zfs root

I recently installed 14.2-RELEASE and upgraded to 14.3-RELEASE, and chose zfs and my root partition during initial install. The order of my partitions was messed up since the root was made before the swap, so i booted my linux partition and fixed the partition order using fdisk, but after doing that, my partitions have disappeared from /dev/ada and now i need to use /dev/diskid. Is this pure user error and can I fix it?

I have also mounted it on linux and set the mount using "doas zfs set mountpoint=/freebsd root" so I'll try to fix set it back to "/" later. This also happens on the 14.2-RELEASE live DVD.
 
gpart show -p
Code:
=>        34  1953525101    diskid/DISK-2422E8B600E5  GPT  (932G)
          34        2014                              - free -  (1.0M)
        2048     4194304  diskid/DISK-2422E8B600E5p1  efi  (2.0G)
     4196352    15728640  diskid/DISK-2422E8B600E5p2  freebsd-swap  (7.5G)
    19924992    15728640  diskid/DISK-2422E8B600E5p3  linux-swap  (7.5G)
    35653632   958935040  diskid/DISK-2422E8B600E5p4  linux-data  (457G)
   994588672   958398464  diskid/DISK-2422E8B600E5p5  freebsd-zfs  (457G)
  1952987136      537999                              - free -  (263M)
gpart list
termbin
zpool list -v
Code:
NAME                           SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
root                           456G  9.53G   446G        -         -     0%     2%  1.00x    ONLINE  -
  diskid/DISK-2422E8B600E5p5   457G  9.53G   446G        -         -     0%  2.08%      -    ONLINE

The partition showing freebsd-swap is actually a udf partition i made in linux that i mean to format to swap, but i haven't been able to since my partitions won't show in bsdconfig.
 
Please add following two sysctl(8) keys to /boot/loader.conf and reboot system:
Code:
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
This should populate /dev/ada0 with partition device nodes, and the ZFS pool will get the wanted device name ( /dev/ada0p5). Also, gpart(8) will show now the device names instead of diskids.

You can display a short description of the keys (or OID - Object ID) with sysctl -d <key>
 
I have also mounted it on linux and set the mount using "doas zfs set mountpoint=/freebsd root" so I'll try to fix set it back to "/" later. This also happens on the 14.2-RELEASE live DVD.
when you're mounting a ZFS in a rescue environment, you should use mkdir -p /altroot; zpool import -R /altroot pool to avoid having to muck with the mount points of the datasets.
 
you should use mkdir -p /altroot; zpool import -R /altroot pool to avoid having to muck with the mount points of the datasets.
Keep in mind the CD and DVD images are read-only, even if you 'burned' them to a memory stick. You won't be able to create that mount point there. You can use /tmp/altroot for example as /tmp is a writable tmpfs(5) filesystem. The installer itself uses /mnt as altroot.
 
Back
Top