Backup data from corrupted (?) card

Hmm yeah there seems to be an issue with the drive on a different level :thinking:.

1 Like

Hi again! Looks like my sd card is failing again, but this time i have a backup on a usb stick.
Can i copy the backup to another usb drive and use it as boot drive, instead of the sd card?

The backup themselves can’t be used to boot a new system directly. You would need a fresh install. There you could specify (before first initial boot) within dietpi.txt to use the backup and to perform a restore automatically within the first boot setup process.

i’ve changed the setting within dietpi.txt, removed the sd card and plugged the usb stick on

seems like it didn’t work. Am i missing something?

Not sure if Í understood.

You flashed a new image to a new USB stick?
You set AUTO_SETUP_BACKUP_RESTORE=1 within dietpi.txt?
Anything else configured inside dietpi.txt?
And you plug in the stuck containing the backup?
This all before booting system first time?
How did you perform first time install? Manually or automatic?

This is what i have done:

  • Flashed Dietpi on the new USB stick

  • Set AUTO_SETUP_BACKUP_RESTORE=1 (didn’t change anything else)

  • Plugged the new USB stick, the other one with the backup, and turned on my Pi4 without the SD that i was using

and does your system boot? Did you login via SSH to perform first time setup?

looks like it isn’t booting for some reason, can’t find it on my network

do you have any activity on the ACT led? Can you connect a screen to check what happen?

sorry for the image, but i had to connect it to my tv

ok let’s da one step in addition to verify if USB boot is enabled. For this, we need a spare SD card, flash a temp system and boot from SD without any USB device attached. Once done we can check on settings.

currently i don’t have any spare SD, i can the use the one that i’m already using, with the current Dietpi install, if it’s ok

should be fine, we need the system online only. Doesn`t matter what SD card used :slight_smile:

ok, i’m good to go :smiley:

following is based on Raspberry Pi Documentation - Raspberry Pi hardware

Can you check bootloader configuration?

rpi-eeprom-config
[all]
BOOT_UART=0
WAKE_ON_GPIO=1
POWER_OFF_ON_HALT=0
DHCP_TIMEOUT=45000
DHCP_REQ_TIMEOUT=4000
TFTP_FILE_TIMEOUT=30000
TFTP_IP=
TFTP_PREFIX=0
BOOT_ORDER=0x1
SD_BOOT_MAX_RETRIES=3
NET_BOOT_MAX_RETRIES=5
[none]
FREEZE_VERSION=0

there you go. It’s booting from SD only. Let’s enable USB mass storage boot.

Be careful on adjusting the bootloader :wink:

sudo -E rpi-eeprom-config --edit

Set BOOT_ORDER=0xf41 and leave the editor. If you are fine, reboot your system using SD again. Once back online check bootloader

rpi-eeprom-config

looks like it doesn’t keep the change.

After edited the value, i press CTRL + S to save, then CTRL+X to exit, and then sudo reboot

But BOOT_ORDER=0x1 still the same

it should be fine to simply leave the file using CTRL+X and once ask to save use Y. Afterwards you should see something like this.

################################################################################

*** To cancel this update run 'sudo rpi-eeprom-update -r' ***

*** INSTALLING /tmp/tmpv4hrpw12/pieeprom.upd  ***

   CURRENT: Wed Jan 11 17:40:52 UTC 2023 (1673458852)
    UPDATE: Wed Jan 11 17:40:52 UTC 2023 (1673458852)
    BOOTFS: /boot
Using recovery.bin for EEPROM update

EEPROM updates pending. Please reboot to apply the update.
To cancel a pending update run "sudo rpi-eeprom-update -r".
root@DietPiProd:~#

nothing, i get what you said above, then rebooted, still no changes