gas_85 Posted September 2, 2019 Posted September 2, 2019 Armbianmonitor: http://ix.io/1U34 Hello, I have trouble with my SD Card - it goes in Read Only mode. What I have: I have Running System from the HDD (installed by nand-sata-install command) My Cubietruck is online for now, but I'm afraid do switch it off. 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: Is there is a way to prepare new SD card and simply insert it into the running machine and reboot without starting from zero? Like set only the boot partition and clone the rest from hdd? Try to clone boot from the old SD? 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?
martinayotte Posted September 2, 2019 Posted September 2, 2019 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. 1
gas_85 Posted September 2, 2019 Author Posted September 2, 2019 Thanks! I will try do this. Last year I did the same as you told and it did not work for me... Lets see now. Is there is a way to automate this prcess? E.g. added User (copy /etc/passwd and /etc/shadows)?
martinayotte Posted September 2, 2019 Posted September 2, 2019 55 minutes ago, gas_85 said: Is there is a way to automate this prcess? E.g. added User (copy /etc/passwd and /etc/shadows)? Of course ! But this is only to recover SDCard boot, then /etc/passwd and /etc/shadows are still the old one located on HDD.
Solution gas_85 Posted September 3, 2019 Author Solution Posted September 3, 2019 (edited) 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 September 3, 2019 by gas_85 Some additional Info
Recommended Posts