I have an img (made with dd) of a FreeBSD installation on a 1TB HD.
This time i need to use a smaller disk (500GB), and of course if I try just to restore the same image it won't work, but even if I tried to manually adjust partition table and MBR my system doesn't boot.
What i did:
After dding, i went straight to sfdisk in order to adjust MBR ending sector, then i used parted to shrink partition to correct boundary.
To my calculations, given that the partition begins at sector 2048, for a 500GB disk it is correct to set ending sector at 976771120 (976773168 total).
New partition is then 2048 -> 976771120, and new MBR also uses this logic. In fact, I can reach FreeBSD boot manager 1st stage, but then i'm stuck at boot prompt (error 66). Maybe i'm not aware of how next bootloader stages work, probably is it not enough to fix partition scheme and MBR to make FreeBSD boot? There could be some conf file read early somewhere that also needs to be fixed? Not my primary OS so I'm on a trial/error process. Thanks
EDIT: added output, sorry for pic but my only choice. Didn't remember that real data were really few( <2GB).
First disk, 500GB scheme (not working). Second disk, 1TB original scheme (working).
I could already go with this and proceed with my work, but i think it's still interesting to understand what went wrong.