Page 1 of 1

NEW RPi and swapping across a SSD

Posted: Mon 25 Mar 2024 6:27 pm
by Nottub
Apologies for the long message but here goes: (I will be using the GUI to do this if possible) :mrgreen:

OLD RPi

Existing RPi (pi) has an external SSD called 'CumulusMX' (all the CMX files and directories run directly from the root of this drive, it is not used for anything else).

It is set to auto mount at boot and CMX also set to start at boot.

The path is 'home/pi/CumulusMX' :D

NEW RPi

I now have a new RPi4B (pi2) running Bookworm and want to swap the SSD from the old RPi (pi) to the new RPi (pi2). Without any input from me (apart from plugging in and booting up) the SSD auto loads to 'Media/pi2/CumulusMX'. (I would like it to match the old RPi i.e 'home/pi/CumulusMX).

Should I manually create a new directory under 'home/pi2/CumulusMX', then run 'sudo mount /dev/sda1 /mnt/pi2/CumulusMX'

Do i need to amend the fstab code with the uuid details?

Do i need to unmount the drive on the new RPi before doing any of this?

Am I way off the mark, or just accept this 'Media/Pi2/CumulusMX' location on the new RPi? :bash:

EDIT —- having spent some time looking this up on’t tinternet I’ll probably leave it in the Media/pi2 folder. Seems like the easiest option — EDIT


Thanks for looking

Martyn

Re: NEW RPi and swapping across a SSD

Posted: Tue 26 Mar 2024 4:15 pm
by Nottub
After a little head scratching and visits to Google, I managed to mount my SSD to the home/pi2 directory, :D which is where I wanted it. here's how I did it:

Booted up the RPi2 with the SSD connected to a USB port.

sudo mkdir /home/pi2/CumulusMX -To create a new CumulusMX directory where I wanted it. In the home/pi2/ directory.

sudo umount /dev/sda1 - to unmount the SSD as it auto mounted at boot to the Media/pi2 directory.

sudo mount /dev/sda1 /home/pi2/CumulusMX - To mount to the directory I want it to i.e. home/pi2/

So far so good :clap: . CumulusMX did indeed show the SSD contents (Cumulus files and folders only, as expected). Next to ensure that this was the norm at each boot.

sudo blkid - To identify the UUID of the SSD to allow the fstab file to be amended and allow auto mount to my chosen location when booted.

sudo nano /etc/fstab - brought up the fstab - where I added 'UUID=8EFA6137FA611D29 /home/pi2/CumulusMX auto nofail,uid=1000,gid=1000,noatime 0 0' Don't ask me what that's all about but I used that before (apart from the UUID which was different, and the directory details).

And with fingers crossed a reboot

sudo reboot -and it worked!

So now I have two RPi's both able to read from the SSD, the older one with 'Buster', the newer Pi with 'Bookworm'.

My next challenge (when V4 is released), is to update CumulusMX.

Martyn

Re: NEW RPi and swapping across a SSD

Posted: Sun 31 Mar 2024 5:34 pm
by mcrossley
Good info, thanks for posting the solution.