unbricking through USB flash drive

westhealth

n3wb
Joined
Oct 12, 2020
Messages
22
Reaction score
1
Location
Palm Springs, California
there seems to be a way to unbrick DVR through USB flash drive instead of uart connection with ttl adapter.
this info below was posted on another forum. any idea how I can use this same method to flash firmware and unbrick?

"
it is possible to hook into the boot process before the DVR software starts, by inserting a USB stick with a file named “autoexec.sh” in the root directory. I have used this to get rid of the default root password and to have the system start an NTP server to keep the time constantly up to date (something the DVR8-4550 will not do despite what the documentation says. My USB stick contains the following files:
autoexec.sh

#!/bin/sh
mount -t tmpfs tmpfs /tmp
cd /mnt/usb
[ -d /tmp/autoexecs ] || mkdir /tmp/autoexecs
cp autoexecs/* /tmp/autoexecs
cd /tmp/autoexecs
chmod 755 *.sh
./custom-inits.sh &

autoexecs/ntp-server:

pool.ntp.org

autoexecs/passwd

root:*:0:0::/root:/bin/sh

autoexecs/custom-inits.sh

#!/bin/sh
mount -o bind passwd /etc/passwd
sleep 30
/usr/sbin/ntpd -p cat ntp-server
"
 

2ndLeaf

Young grasshopper
Joined
Dec 13, 2018
Messages
49
Reaction score
16
Location
California
Thanks for sharing this information. I have a Dahua NVR4208-4KS2 in boot loop. I try the mechanism you mentioned but it doesn't help. Could you let me know which forum you found this information? I would like to do more research.
 
Top