Hi all,
I've got a FreeBSD installation on my VPS, it uses ZFS as its file system. At the end of last year I wanted to clone it onto a local VirtualBox VM, so I did something like the following:
Now I got a bit busy so put this down for a bit, and I've come to revisit it. I've created a VirtualBox VM with similar specs to my VPS and loaded up mfsbsd. I've partitioned the disk similar to my VPS:
I then created a zpool called "zroot", mounted it under /mnt, enabled root SSH login (in mfsbsd), and started doing a ZFS:
This took a fair while (there's ~44GB of data) but eventually completed without error.
Lastly, I wrote the boot code (from the received ZFS dataset, in case there was anything special. I've tried from the mfsboot and I get a very similar issue), exported the pool and rebooted:
When I rebooted I was greeted by the following:
I'm now at a loss as to where I went wrong. I'm pretty sure I've heard people doing the above, but my Google-fu doesn't seem to be working as I can't find any documentation/blog posts on it…
Any pointers would be most grateful,
Ben
I've got a FreeBSD installation on my VPS, it uses ZFS as its file system. At the end of last year I wanted to clone it onto a local VirtualBox VM, so I did something like the following:
Code:
# zfs snap -r zroot@2018-11-06
# zfs send -R zroot@2018-11-06 | gzip | ssh my.home.system "cat > /data/backup/vps/vps_2018-11-06.zfs.gz"
Now I got a bit busy so put this down for a bit, and I've come to revisit it. I've created a VirtualBox VM with similar specs to my VPS and loaded up mfsbsd. I've partitioned the disk similar to my VPS:
Code:
root@mfsbsd:~ # gpart show
=> 40 167772080 ada0 GPT (80G)
40 2008 - free - (1.0M)
2048 1024 1 freebsd-boot (512K)
3072 1024 - free - (512K)
4096 4194304 2 freebsd-swap (2.0G)
4198400 163571712 3 freebsd-zfs (78G)
167770112 2008 - free - (1.0M)
I then created a zpool called "zroot", mounted it under /mnt, enabled root SSH login (in mfsbsd), and started doing a ZFS:
Code:
cat /data/backup/vps/vps_2018-11-06.zfs.gz | gunzip | ssh root@172.16.0.224 zfs receive -vF zroot
This took a fair while (there's ~44GB of data) but eventually completed without error.
Lastly, I wrote the boot code (from the received ZFS dataset, in case there was anything special. I've tried from the mfsboot and I get a very similar issue), exported the pool and rebooted:
Code:
root@mfsbsd:~ # gpart bootcode -b /mnt/boot/pmbr -p /mnt/boot/gptzfsboot -i 1 ada0
partcode written to ada0p1
bootcode written to ada0
When I rebooted I was greeted by the following:
Code:
|
Can't find /boot/zfsloader
FreeBSD/x86 boot
Default: zroot:/boot/kernel/kernel
boot:
/
Can't find /boot/kernel/kernel
FreeBSD/x86 boot
Default: zroot:/boot/kernel/kernel
boot: ?poudriere
FreeBSD/x86 boot
Default: zroot:/boot/kernel/kernel
boot:
I'm now at a loss as to where I went wrong. I'm pretty sure I've heard people doing the above, but my Google-fu doesn't seem to be working as I can't find any documentation/blog posts on it…
Any pointers would be most grateful,
Ben
Last edited: