I have a few old rpi 3b+ still running stretch which i would like to upgrade to either bullseye or buster. They are all remote and i access them via AnyDesk or reverse ssh tunnels as a backup.
I have attempted to simply upgrade into buster/bullseye on a rpi at home, with the same setup as these remote ones. My hope was that i would upgrade, then reverse ssh or AnyDesk into it after the upgrade, but they never managed to upgrade properly (attempted about 6 tiems with multiple variations and always failed for one reason or another). I can't risk not being able to remote login, so i'm looking at other options.
Ideally here is what i'd like to do:
- Remote log into my rpi.
- Download a pre-configured image of buster/bullseye (with all the things i need, Anydesk etc..).
- Reboot the rpi into the newly downloaded OS image.
I've looked into using some multiboot tools, but they generally need you to do all the setup on a separate SD ard / USB etc. I need to be able to perform all these remotely via AnyDesk or ssh, and on the SD card that contains the currently running OS.
Anyone able to give me some pointers?
Any chance you have some usefule info form pioints 1&2? struggling to find some solution that can be done remotely, while the OS is running...
– LecauseAndThePi Sep 15 '23 at 14:26resize2fs
, then reduce the partition size accordingly (gparted
). Set up your reference partition locally, runfstrim
on it, then just take the SD card from your local installation, usezstd -T0 -15 < /dev/sdd3 > partitionimage.zstd
(assuming /dev/sdd3 is that partition you want to ship to your remote RPi) to make a compressed device image. Copy that over to your target Rpi and uncompress it on the fly: – Marcus Müller Sep 15 '23 at 14:57ssh root@targetrpi zstd -d -o /dev/sdxx < partitionimage.zstd
, where/dev/sdxx
is the partition you plan to overwrite with the image. (You might need to installzstd
on your local machine and the remote Rpi first, but it's a fast decompressor and even in the relatively high15
compression setting a reasonably fast compressor, so a good choice for this problem) – Marcus Müller Sep 15 '23 at 14:57