I had a 500 GB SSD used as cache on my NAS but the estimated lifespan was going too down so I’ve replaced it.
Now I’m using the SSD in an USB enclosure attached to Raspberry Pi 4 to boot Astroberry, but due to low estimated lifespan (1%), (and because I don’t know where to store the Astroberry microSD without loosing it
) I’ve set the microSD as fallback.
Here how I’ve made it.
1) Backup the Astroberry SD from my computer:
Identify the SD volume
save a copy on computer
gzip -dc /Volumes/4TB-Foto/Astrofoto/astroberry2022-04-21.gz | sudo dd of=/dev/disk8s4
2) restore the backup on SSD
with
balenaEtcher
I selected the backup file and restored on SSD
3) [optional] additional partition for images
I prefer to keep the images on another partition, so I can easier restore the system on a smaller SD and set selective backup, so I’ve attached the only SSD to USB 3 port, booted and installed gparted on Astorberry.
I’ve se they astroberry as owner of the new mountpoint
sudo chown -R astroberry:astroberry /media/astroberry/astrofoto/
then I moved the folders ~/Light, ~/Dark, ~/Bias and ~/Flat to the new partition and created symbolic links
ln -s /media/astroberry/astrofoto/Light ~/Light; ln -s /media/astroberry/astrofoto/Dark ~/Dark; ln -s /media/astroberry/astrofoto/Flat ~/Flat; ln -s /media/astroberry/astrofoto/Bias ~/Bias
4) change PARTUUID
I’ve rebooted with SD card and SSD attached but restoring from the backup I’ve got the same PARTUUID, so I can’t define what is the correct partition to mount.
so, thanks to
this guide
I changed the PARTUUID:
astroberry@astroberry:~ $ sudo fdisk /dev/sda
Welcome to fdisk (util-linux 2.33.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors
Disk model: SSD 860 EVO 500G
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 33553920 bytes
Disklabel type: dos
Disk identifier: 0x9efc3dd8
Device Boot Start End Sectors Size Id Type
/dev/sda1 8192 532479 524288 256M c W95 FAT32 (LBA)
/dev/sda2 532480 307732479 307200000 146.5G 83 Linux
/dev/sda3 307732480 976773119 669040640 319G 83 Linux
Command (m for help): x
Expert command (m for help): i
Enter the new disk identifier: 0x860e500
Disk identifier changed from 0x9efc3dd8 to 0x0860e500.
Expert command (m for help): r
Command (m for help): w
The partition table has been altered.
Syncing disks.
so now they are different: