Info: Upgrading from Stretch (9) to Buster (10)
-
Hi,
I was still running my Neuron M103 on Raspbian 9 and I wanted to upgrade now.
As my heating is attached to the Neuron I did not want to have days of troubleshooting. It should be running fine after the upgrade.
So I checked Debian to see what to do for such an upgrade. In short:
- Check package status
- Check additional repositories (like unipi)
- Edit
sources.list
and files insources.list.d
to match buster apt update
apt upgrade
apt full-upgrade
apt autoremove
reboot
In the end it worked smooth. Some minor issues (there were two
mervis
symlinks pointing to each other in/etc/nginx/sites-available
and/etc/nginx/sites-enabled
. Simply deleted them).I just had one major issue which in the end took me hours to resolve:
The
/boot
- partition has been only 50M as this was the early default when I installed it initially. The upgrade did fail because of not having enough disk space there. Initially I expected this to be an easy step to increase partition size but it wasn't.Step-by-step:
- Shutdown my Neuron and removed the SD disk (32G)
- Plugged-in my SD to a Debian computer, there installed as /dev/sda
- Took image backup of both partitions
dd if=/dev/sda1 of=/srv/neuron.sda1.img
dd if=/dev/sda1 of=/srv/neuron.sda2.img
- Used
fdisk /dev/sda
to remove the partitions and recreatesda1
with a size of 500M which obviously moved the start of sda2. Created sda2 with a size a little bit smaller than it has been before. - Formatted
/dev/sda1
withmkfs.vfat
(had to be installed throughapt install dosfstools
)
Note: Simply resizing did not work asfatresize
,parted
neither Windows are able to handle such small FAT32 partitions. So format from scratch and copy existing files over:
rsnyc -av /mnt/old.boot/ /mnt/new.boot
- Resize the image of sda2 as it is larger than the new size of sda2 (could have done before on the device, though):
e2fsck -f ./neuron.sda2.img; resize2fs ./neuron.sda2.img 20G
- Bring back the smaller image:
dd if=neuron.sda2.img of=/dev/sda2
Note: It complained about "no more space on device" which is expected but does not harm as there is no data on the missing bits. - Resize the filesystem now to match the (new) partition size:
resize2fs /dev/sda2
umount
and unplug the SD from Linux, plug it into the Neuron and power on.
Worked fine and once the partition issues have been solved the
apt upgrade
andapt full-upgrade
steps went smooth.Now my Neuron is running fine on Raspbian 10. I just had to recompile my own application as there was a version mismatch with one of the used libraries.
/KNEBB
-