• 0

SD card dies, but System on HDD... How to repair?


gas_85
 Share

0

Question

Armbianmonitor:

Hello,
I have trouble with my SD Card - it goes in Read Only mode. What I have:

 

  1. I have Running System from the HDD (installed by nand-sata-install command)
  2. My Cubietruck is online for now, but I'm afraid do switch it off.
  3. I try to run dd command to make a backup of RO SD card and reuse image on a new SD card, but it does not succeed:
# dd if=/dev/mmcblk0 bs=10M | gzip -c > /media/dataPartition/sdcard.img.gz
dd: error reading '/dev/mmcblk0': Input/output error
0+0 records in
0+0 records out
0 bytes copied, 0.00503184 s, 0.0 kB/s

I read the forum regarding backup and restore and my question is following:

 

  1. Is there is a way to prepare new SD card and simply insert it into the running machine and reboot without starting from zero?
    1. Like set only the boot partition and clone the rest from hdd?
    2. Try to clone boot from the old SD?
  2. Make it sense to pull out old SD card and try to make backup of it on Laptop and then write this image to the new SD card?
Link to post
Share on other sites

4 answers to this question

Recommended Posts

  • 0

I did as you told: install Armbian on a new SD, bootup, create user and set passwords. After I adjust /boot/armbianEnv.txt to set UUID to my drive and then rebooted successfully.

One point, because older SD was going into RO mode, I have badly installed package: initramfs-tools, and future apt upgrade were finished with an error. So I have to reinstall it by command:

sudo apt install --reinstall initramfs-tools:armhf

After this everything works good, thanks!

 

UPDATE:

I was a bit wrong, Kernel has some problems, this is an error when I try to run iptables:

$ sudo iptables -vnL 
modprobe: ERROR: ../libkmod/libkmod.c:586 kmod_search_moddep() could not open moddep file '/lib/modules/4.19.57-sunxi/modules.dep.bin'
modprobe: FATAL: Module ip_tables not found in directory /lib/modules/4.19.57-sunxi
iptables v1.6.1: can't initialize iptables table `filter': Table does not exist (do you need to insmod?)
Perhaps iptables or your kernel needs to be upgraded.

I try this and that with update and upgrade, but helps only to re-install the same kernel via armbain-config>System>Other>choose the same Kernel as I have had before.

Edited by gas_85
Some additional Info
Link to post
Share on other sites

Donate and support the project!

  • 0
37 minutes ago, gas_85 said:

Make it sense to pull out old SD card and try to make backup

There is no need to do such backup, since your "rootfs" is on the HDD.

Simply reburn image on new SDCard, do the initial boot setup (passwd & new user), then edit /boot/armbianEnv.txt so that "rootdev=UUID=" point to you HDD according to "blkid" report.

Link to post
Share on other sites

Guest
This topic is now closed to further replies.
 Share

0