by streckus » Tue Jan 04, 2022 2:01 pm
$this->bbcode_second_pass_quote('trustnt', 'I')s there a way to recover the image after updating? Because it's a hassle to reinstall and configure everything again.
I was able to downgrade the image for my Raspberry Pi via my PC's pacman by mounting the SD card:
$this->bbcode_second_pass_code('', '
mkdir rpi
sudo mount /dev/sdd2 rpi
sudo mount /dev/sdd1 rpi/boot
')
I then first made a backup of this mounted rpi folder using rsync -a in case I break something.
Afterwards, I changed into that directory and called the following pacman command to downgrade using a cached version of raspberrypi-bootloader:
$this->bbcode_second_pass_code('', '
cd rpi
sudo pacman -U var/cache/pacman/pkg/raspberrypi-bootloader-20211207-1-any.pkg.tar.xz -r . --config etc/pacman.conf --gpgdir etc/pacman.d/gnupg/ --arch aarch64 -v
')
The extra flags set the root directory, config file and gpg directory to the ones mounted from the Pi's SD card, specify the architecture to aarch64 in my case and -v enables verbose output (to see if the paths were set correctly).
Afterwards, the modification times in rpi/boot were back to Dec 12, 2021 and I was able to boot using the SD card in my Raspberry Pi again.
Pacman did output the following errors (translated from German) in the command above which are probably due to aarch64 binaries not being able to run on a x64 machine:
$this->bbcode_second_pass_code('', '
Could not call execv (Error in Program File format)
Error: Command could not be executed correctly.
')
As far as I can tell, the downgrade still seems to work though.