NicknDi wrote: ↑Mon Aug 17, 2020 9:53 am
Is there a way to re-flash just the boot partition, or will I have to start again from scratch?
Why would you want to change boot partition? You can access files on it (read, write delete...).
If you want to change the boot partition size, you can do that with
gparted, but you must first boot from a different drive.
To increase the boot partition size, first resize (shrink) the rootfs partition, then move it to free some space for boot partition. then expand the boot partiton.
Moving the rootfs partition will take some time as all data must be rewritten...
You can also
backup/restore your system to your PC using
rsync:
Mount boot & rootfs partition from your RPi sdcard/USB on your PC, then execute:
Code: Select all
sudo rsync -r -t -p -o -g -x --delete-after -l -H -D --numeric-ids -s -W -S --inplace -h -h --info=name0 --info=progress2 <boot_partiton_mount>/ <boot_backup folder>/
sudo rsync -r -t -p -o -g -x --delete-after -l -H -D --numeric-ids -s -W -S --inplace -h -h --info=name0 --info=progress2 <rootfs_partiton_mount>/ <rootfs_backup folder>/
sudo sync
Unmount your RPi sdcard/USB and
reformat as you want (you can also add the swap partition), mount the boot&rootfs again and restore:
Code: Select all
sudo rsync -r -t -p -o -g -x --delete-after -l -H -D --numeric-ids -s -W -S --inplace -h -h --info=name0 --info=progress2 <boot_backup folder>/ <boot_partiton_mount>/
sudo rsync -r -t -p -o -g -x --delete-after -l -H -D --numeric-ids -s -W -S --inplace -h -h --info=name0 --info=progress2 <rootfs_backup folder>/ <rootfs_partiton_mount>/
sudo sync
You will also need to change the partitions IDs (and rootfs filesystem type, if changed) in cmdline.txt and fstab.