Solved migrated from one machine to another – can't login

I migrated from one server to another using ZFS snapshots.

I created a snapshot on the old machine (which was encrypted).

On the new machine, I first installed the same FreeBSD version (10.3) and had it creat the ZFS File System and Partitions (unencrypted).

I then logged in via Live-CD, enabled SSHD (key-auth) and sent the zfs snapshots from the old system:

zfs send -R zroot@migrate | ssh root@xxx.xxx.xxx.xxx "zfs recv -vFd zroot"

So far everything seemed to work.

Then the boot mount wasn't found. On the new system I had the problem that I didn't have the bootpool zfs pool (because it isn't encrypted)
I created a tarball with the boot folder of the old machine and replaced the empty mountpoint on the new system with the contents of /boot of the old system.

Now the system booted.
However, when I try to login via the virtual console, I seem to be stuck in a loop…

When I enter my old root password, the "Welcome to FreeBSD" texts disappear but nothing happens. No shell opens.
When I hit enter again, a new login line appears, asking me again to log in.

Is there anything I completely missed?
Something I could have made wrong?

Your help is greatly appreciated!
 
I basically did the same thing a few days ago, except I didn't used the -d switch for receiving the snapshot. Check also, that the filesystems on the receiving side are not mounted.
 
OK I think I found the issue.
I was able to login via SSH.
I found out that the login over the virtual console didn't work on the old system as well (as root). Seems like I misconfigured some kind of restriction?
After I added a password to another user I was able to login.

So the migration went fine (I just had to update the IPs).

Now I'm on to find a replacement for ezjail to be able to upgrade to 11.0

Thank you very much!
 
But still: Why can't I login as root over the virtual console?
I didn't change anything in ttys or login.conf
 
What is the message after trying to log in?
As I understood, you are able to log in as root via SSH?
Logging in as root via SSH is disabled via sshd config.

But I thought that logging in over the virtual console of my server provider should be possible as root?
Or am I wrong on this part?

There is no error when I log in as root over the virtual console.

All the text appears as if I was just logged in but there is no shell line.

If I hit enter, I'm confronted with a new line that says login: again.
 
sysutils/ezjail works on FreeBSD-11.0 for me.
It does for me too…
In a thread on this forum someone wrote about incompatibilities.
I upgrades anyways (after saving a snapshot) and it seems to work.
I still keep getting error messages after ezjail-admin update -u (about folders in /newjail) and the program hasn't been updated for a really long time so I guess migrating to something like py3-iocage in the future might be inevitable…
 
I found out what the problem was.
In .zpreztorc I hat
Code:
# Auto start a session when Zsh is launched in a local terminal.
zstyle ':prezto:module:tmux:auto-start' local 'no'

So that when I login over SSH and do su - root iterm2 opens a tux window with the last session.
Seems like I will have to rethink that…
 
Since the $TERM_PROGRAM environment variable is lost when I do su - root, I changed the tmux module in zprezto to always initiate tmux -CC when
':prezto:module:tmux:auto-start' local
was set to yes.
But this seems to cause serious problems when being called inside a virtual console (or any other Terminal than iTerm.

I haven't found a way around this (by using zprezto) and am now simply calling
su - root -c 'tmux -CC new -A -s tmux' after login (I created a profile with this command in iTerm2).
 
Back
Top