Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Messed up /dev/mtdblock2, possible to restore from uBoot? EDIT: SOLVED! #170

Open
daveribs opened this issue Sep 6, 2021 · 1 comment
Open

Comments

@daveribs
Copy link

daveribs commented Sep 6, 2021

Hi, I have a HeimVision HM203 IP camera. It reports GK710XS. I was messing around with UART and this hack and I managed to mess up the filesystem. I tried making the persistent hack work with my device, which mostly uses /bak/ for all the files (start.sh, etc.) instead of /home/, but it doesn't boot properly anymore. It boots then constantly throws an error message for some time, then reboots. I currently do not have an SD card and would prefer trying to restore without one. I have backups for /dev/mtdblock2, /dev/mtdblock3, /dev/mtdblock4 and the zImage kernel, but I'm not sure how to restore mtdblock from uBoot. I can boot zImage from uBoot TFTP. Linux OS still kinda works for some time, but it's extremely hard to work with because error messages are constantly being spammed on the UART serial console until it reboots.

Is it possible to restore mtdblock from uBoot? I know I could load it in RAM from TFTP and restore it with some command, but I don't know the memory locations of the partitions. Does someone know how I could find this?

@daveribs
Copy link
Author

daveribs commented Sep 7, 2021

Just want to report that I was finally able to make everything work on a cheap HeimVision HM203 (link here). I had to edit some stuff since this camera stores stuff in /bak instead of /home. Since /bin is RO, I had to use 'mount --bind' instead of cp.

  • I remounted /bak as RW (mount -o rw,remount /bak)
  • I dropped all hack files from the RO hack in /bak/hack
  • I took the commands from debug_cmd.sh that use "mount --bind" instead of "cp" and put them in /bak/start.sh (with paths to /bak instead of /media since we're running from flash)
  • Everything works like a charm and I was able to accomplish everything without an SD card. But I did need UART :P

@daveribs daveribs changed the title Messed up /dev/mtdblock2, possible to restore from uBoot? Messed up /dev/mtdblock2, possible to restore from uBoot? EDIT: SOLVED! Sep 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant