Freebsd 13.0 with root on zfs on hyper-v 2012

Can't boot. Can't load kernel.
From comand prompt ls, lszfs, more work fine, but load /boot/kernel/kernel fails.

But it can boot if add one more disk with FreeBSD 13.0 installed on it.
Both base and kernel must be installed. With only kernel it can load kernel at boot, but can't load modules.

How to boot system with only one disk?
 
Can you boot from a downloaded .iso/.img of a freebsd-install boot CD/USB image ?
I don't now how vhd(x) is presented to the freebsd kernel. But if you can boot from that you can layout partition schemes and install bootcode where hyper-v is looking.
 
Can't boot. Can't load kernel.
Those are actually two different things. Can't boot means it is not even able to load loader(8), but not able to find the kernel is a loader(8) error message. So it does boot, it's just that loader(8) can't seem to find the kernel. What is the disk layout? And what's in /boot/loader.conf?
 
gpt with 2 partitions, first boot and second system.
So it's freebsd-boot and freebsd-zfs then?

Code:
zfs_load="YES"
vfs.root.mountfrom="zfs:sys"
Remove the vfs.root.mountfrom. The dataset to boot from should be set with zpool set bootfs.
Code:
root@molly:~ # zpool get bootfs zroot
NAME   PROPERTY  VALUE               SOURCE
zroot  bootfs    zroot/ROOT/default  local
 
There are 3 parameter you can use in /boot/loader.conf
For my legacy boot of zfs it is
Code:
loaddev="disk2p9:"
### Selects the default device to loader the kernel from
currdev="zfs:ZT/ROOT/default:"
### Specify the root partition to mount
vfs.root.mountfrom="zfs:ZT/ROOT/default"
 
Code:
zpool status -v
  pool: sys
 state: ONLINE
config:

    NAME        STATE     READ WRITE CKSUM
    sys          ONLINE       0     0     0
      da1p2     ONLINE       0     0     0

errors: No known data errors

zpool list -v
NAME        SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
sys         31.5G  8.83G  22.7G        -         -     1%    28%  1.00x    ONLINE  -
  da1p2    31.5G  8.83G  22.7G        -         -     1%  28.0%      -  ONLINE
 
There are 3 parameter you can use in /boot/loader.conf
For my legacy boot of zfs it is
Code:
loaddev="disk2p9:"
### Selects the default device to loader the kernel from
currdev="zfs:ZT/ROOT/default:"
### Specify the root partition to mount
vfs.root.mountfrom="zfs:ZT/ROOT/default"
Does not help.
But it change one thing - ZFS: i/o error appear before loading kernel.
 
Status and list seems ok.
What's the output of:
Code:
zfs list -o name,canmount,mountpoint
And
Code:
gpart show -p
Code:
zfs list -o name,canmount,mountpoint
NAME                    CANMOUNT  MOUNTPOINT
sys                      on        /
sys/swap                 -         -
sys/tmp                  on        /tmp
sys/usr                  on        /usr
sys/usr/home             on        /usr/home
sys/usr/local            on        /usr/local
sys/usr/ports            on        /usr/ports
sys/usr/src              on        /usr/src
sys/var                  on        /var
sys/var/db               on        /var/db
sys/var/db/mysql         on        /var/db/mysql
sys/var/db/mysql/ib_log  on        /var/db/mysql/ib_log
sys/var/log              on        /var/log
sys/var/tmp              on        /var/tmp

gpart show -p
=>     40  4194224    da0  GPT  (2.0G)
       40     1024  da0p1  freebsd-boot  (512K)
     1064  4193200  da0p2  freebsd-zfs  (2.0G)

=>      40  67108784    da1  GPT  (32G)
        40      1024  da1p1  freebsd-boot  (512K)
      1064  67107760  da1p2  freebsd-zfs  (32G)
 
Which zpool resides on that partition ?

loader.conf would be something like, but loaddev and currdev can mostly be omitted.
Code:
loaddev="disk2p2:"
currdev="zfs:sys:"
vfs.root.mountfrom="zfs:sys"
 
Back
Top