I'm planning to use rsync to clone an entire FreeBSD server to another machine, overwriting the files of the existing old FreeBSD OS (minus /etc/hostid
and a few others)
But that would break the boot process I think? I imagine I would need to reinstall the boot loader after that, but there seems to be a few different flavors of boot loaders (MBR, PMBR, GPT, EFI...) It appears I'm supposed to use gpart bootcode
but how do I know which scheme I should use?
The disk looks like this
# gpart show
=> 63 140623749 da0 MBR (67G)
63 140616882 1 freebsd [active] (67G)
140616945 6867 - free - (3.4M)
=> 0 140616882 da0s1 BSD (67G)
0 16777216 2 freebsd-swap (8.0G)
16777216 123839666 1 freebsd-ufs (59G)