UFS How can I clone the FreeBSD microSD of my Raspberry Pi in a bigger microSD card

Hello,
I have FreeBSD 13.1 running on my 128Gb microsd card perfectly well, but now I need/want more space in /usr/local/www.

If I buy a bigger card, a 256Gb for example, is it possible to expand the system if I clone the 128Gb card into the new 256Gb card? How could I expand it?

Thanks in advance.

Joan
 
Have a good look at the man page for growfs. It'll tell you what you need to know. The Raspberry Pi uses that to expand into the size of the card upon first boot as well, so you may find the initial bootup script for that useful.
 
Though you could do a dd, repair the gpt and more easily expand the last partition or use other tools to move partitions for resizing others that currently had no free space after them, for a new disk you may consider partition, format, and transfer just the data (ufs=dump & restore, zfs=zfs send & recv) which will minimize writes to the new drive and may accelerate the transfer as a result. If sticking with dd, you can consider if you want to use features like 'conv=sparse' to skip writing blocks containing only zeroes which can help for speed and amount of written data.
 
Making it smaller would be interesting too. Like, download the 5GB aarch64 image, remove /usr/lib/debug and resize it to 1200MB
 
Back
Top