• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Importing BE from another system


Aspiring Daemon

Thanks: 127
Messages: 555

I try to import boot environment from one laptop to another.
Source is FreeBSD 11-STABLE, destination is 11.1-RELEASE.

1. On the donor: zfs send zroot/ROOT/stable@trn |gzip > /tmp/backup.gz
2. On recipient: gzcat /tmp/backup.gz |zfs recv -uv zroot/ROOT/stable
3. beadm activate stable

On reboot, system can't mount root

Mounting from zfs:zroot/ROOT/stable failed with error 6.

Loader variables:
I know, that formally, STABLE is unsupported, but error 6 is ENXIO (device not found), that's very strange error.

I rebooted to my old BE and mounted/checked zroot/ROOT/stable. Everything seems to be in place, zfs options are the same as well. I have 'fat' BEs, that shares another pool for /home.

zroot               30,5G   273M    96K  none
zroot/ROOT          30,5G   273M    96K  none
zroot/ROOT/default  18,0G   273M  16,8G  /
zroot/ROOT/stable   12,2G   273M  12,2G  /mnt
zroot/ROOT/temp      342M   273M   342M  /
zroot/tmp             96K   273M    96K  /tmp
abishai@moonstar:~ % zfs get all zroot/ROOT/stable |grep local
zroot/ROOT/stable  mountpoint            /mnt                        local
zroot/ROOT/stable  canmount              noauto                      local
Obviously, / was set initially, I changed it to /mnt for investigation.

abishai@moonstar:~ % zpool get all zroot| grep local
zroot  bootfs                         zroot/ROOT/stable              local
zroot  feature@async_destroy          enabled                        local
zroot  feature@empty_bpobj            active                         local
zroot  feature@lz4_compress           active                         local
zroot  feature@multi_vdev_crash_dump  enabled                        local
zroot  feature@spacemap_histogram     active                         local
zroot  feature@enabled_txg            active                         local
zroot  feature@hole_birth             active                         local
zroot  feature@extensible_dataset     enabled                        local
zroot  feature@embedded_data          active                         local
zroot  feature@bookmarks              enabled                        local
zroot  feature@filesystem_limits      enabled                        local
zroot  feature@large_blocks           enabled                        local
zroot  feature@sha512                 enabled                        local
zroot  feature@skein                  enabled                        local
I think I'm missing something easy.


Staff member

Thanks: 6,089
Messages: 26,977

I know, that formally, STABLE is unsupported
Contrary to -CURRENT, -STABLE is supported. As long as it's a recent -STABLE from a supported major branch (10-STABLE and 11-STABLE at this time).


Aspiring Daemon

Thanks: 127
Messages: 555

Looks like the problem is boot environment content, not import mistake. I'm able to boot with vanilla kernel, not with custom one I have for laptop. I repeated the issue with kernel recompile.
My config is
include GENERIC

nooptions INET6

device evdev
How can this lead to error 6 ?!


Son of Beastie

Thanks: 1,262
Messages: 2,683

This is just a guess, but considering the big difference in size between zroot/ROOT/default and zroot/ROOT/stable I'd start by checking the exact differences between those two environment. Because that difference in size wasn't caused by merely using a different kernel, which leads me to believe that your new environment might be missing some important system files.


Aspiring Daemon

Thanks: 127
Messages: 555

Difference is OK, initial /home import archive left and forgotten on root. I can boot imported root after I put vanilla kernel into /boot/kernel and I'm sure that ECHIDNA kernel made with the config above, so If it's not FreeBSD dislikes Grecian myths, INET6 becomes mandatory or evdev becomes buggy. Laptop is not very fast compiling guy, so it will take a while to check whats wrong. My bet is for INET6, it runs deeper.