UFS disk migration

I currently a 16gb SD Card running FreeBSD-12.0--->(UFS) in a raspberry-pi and soon I'd like to a larger SD Card.
If I simply "dd if="16gb_sd" of="larger_sd", will that be suffice to boot and retain data?
If not, what would be the most effective and safest way to migrate that current smaller working environment to a larger one?

Thanks in Advance
 
Your best bet is to dump(8) piped to restore(8).
They don't copy things like partition table, boot sector and the like. They can only backup/restore UFS filesystems.

In this case a blind 1-to-1 copy with dd(1) is probably the easiest to do. On the new SD card you may get complaints from gpart(8) though, but those are easily fixed with gpart recover. You will also want to gpart resize and use growfs(8) to extent the existing UFS partiton to the full SD card size.
 
Or you could try "man gpart". Create a new boot partition and freebsd/slice with ufs partition. Install bootcodes. I have no experience with raspberry bootcodes ... Maybe a dd of some file.
Copy over the ufs with any means. Simplest is cp -axfv ; Better tar cvf | tar xvf ; Better rsync for the flags; Better dump,restore.
Or :
 
Thanks guys,
What worked was just dd input-smaller-sd to output.img
Then dd output.img to bigger sd
And then once I logged in, a /etc/rc.d/growfs onestart was suffice.

thanks again.
 
Back
Top