Recovery From Micro SD Failure on Raspberry Pi 2B: Booting From a USB SATA SSD

by _Thunder_ in Circuits > Raspberry Pi

98 Views, 0 Favorites, 0 Comments

Recovery From Micro SD Failure on Raspberry Pi 2B: Booting From a USB SATA SSD

pi8.jpg

When using an old Raspberry pi 2B with a micro sd card to boot from a USB Sata SSD, over time the micro sd can fail. In order to build a new micro sd card and boot again from the USB sata SSD. I have a process that has worked with me that I'm sharing. Without any responsibility of the usage and practice.

In the past I have used this Instructables to help me on the setup: Working Procedure to Make Raspberry Pi 2b V1.1 Boot From Usb Sata SSD.

I was doing similar procedure to reproduce the micro sd. But I found that after several trials that the /etc/fstab on the USB Sata SDD was with the wrong PARTUUID and was need to update to the correct to have all access to the SSD. Because only update the /etc/fstab and /boot/cmdline.txt were not sufficient because was in a state of read only access on most of situations.

Using the chatgpt to speed up.

rasp1.JPG

The strategy was first to create a new micro sd card using the Raspberry Pi Imager and installing image with no desktop environment and selecting the Bookworm Operating System version.

Start the raspberry pi 2B with the micro sd and the USB Sata SSD also connect.

rasp2.JPG

Provided a password to the root using the command sudo passwd root and update the password to be more easy to work. Then use the command su and provide the previous password.

rasp3.JPG

Create a mount point mkdir /mnt/ssd, it is possible to get the structure partition using the command lsblk, the partition that need to be used is the sda2 in my case but is need to validate for each case.

rasp4.JPG

Mount the SSD on the mount point create with the following command mount /dev/sda2 /mnt/ssd.

rasp5.JPG

With the access to the USB sata SSD is possible to update the using the nano nano /mnt/ssd/etc/fstab, I have used the same value from the for the PARTUUID from Working Procedure to Make Raspberry Pi 2b V1.1 Boot From Usb Sata SSD.

The example is below that is on the file fstab:

proc /proc proc defaults 0 0

PARTUUID=60123f76-01 /boot vfat defaults 0 2

PARTUUID=60123f76-02 / ext4 defaults,noatime 0 1

rasp6.JPG

rasp7.JPG

Update the nano /boot/cmdline.txt or nano /boot/firmware/cmdline.txt but I also update the nano /etc/fstab with the same PARTUUID=60123f76.

Applying all the changes I was able to boot again the USB sata SSD, without lose any data.

With this info I hope to help those who have the same problem.

Also update on SSD nano /mnt/ssd/boot/cmdline.txt or nano /mnt/ssd/firmware/boot/cmdline.txt the PARTUUID=60123f76.

It the file cmdline.txt on the firmware folder do not exist, copy the line from the microsd card file cmdline.txt and paste it.

The update nano /mnt/ssd/etc/fstab the PARTUUID=60123f76.

This final step will allow when boot the ssd have the correct partition in case exist a difference.