• 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

abishai

Well-Known Member

Thanks: 105
Messages: 468

#1
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

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

Loader variables:
  vfs.root.mountfrom=zfs:zroot/ROOT/stable
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.

Code:
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
Code:
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.

Code:
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.
 

SirDice

Administrator
Staff member
Administrator
Moderator

Thanks: 5,480
Messages: 25,654

#2
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).
 

abishai

Well-Known Member

Thanks: 105
Messages: 468

#3
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
Code:
include GENERIC
ident ECHIDNA

nooptions INET6

device evdev
options EVDEV_SUPPORT
How can this lead to error 6 ?!
 

ShelLuser

Daemon

Thanks: 801
Messages: 2,008

#4
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.
 

abishai

Well-Known Member

Thanks: 105
Messages: 468

#5
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.