by graysky » Sat Dec 16, 2023 9:01 am
Just partition the new uSD as you wish (see official guide) then using an uSD reader on another system, make a backup tarball of the old one and extract it to the new one. if you have a uSD reader that allows for two cards you could just mount the partitions and rsync their contents directly. Let's assume you want to do one at a time (to retain the tarball as a backup).
For example, to backup the old card on your other linux machine (as root):
[code]
cd /some_place_with_plenty_of_space
mkdir boot root
mount /dev/sdx2 root
mount /dev/sdx1 root/boot
cd root
bsdtar cfp /scratch/foo.tar --exclude 'var/cache/pacman/pkg/*'
sync
cd ..
umount boot root[/code]
Now you can insert the new card and partition it (again see the official guide) and (as root):
[code]
mount /dev/sdx1 boot
mount /dev/sdx2 root
bsdtar xpf foo.tar -C root
sync
mv root/boot/* boot
umount root boot
[/code]