LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 11-01-2015, 09:29 AM   #1
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Rep: Reputation: 1
Backup NVRAM from a remote device to a local computer


I tried backup(copy) NVRAM from remote embedded device using telnet and console access(over a WAN), and save it to a file on local computer.
The MTD partition map for NVRAM:
Code:
MTDs:
dev:    size   erasesize  name
mtd7: 00050000 00010000 "nvram"

Mounts:
...
/dev/mtdblock7 /nvram jffs2 rw 0 0

NVRAMADDR=0x48FB0000
I run on local computer:
Code:
nc -l -p 5555 > nvram.bak
and on remote device:
Code:
dd if=/dev/mtdblock7 bs=00010000 count=5 | nc 192.168.1.20 5555
but got the following:
Code:
BusyBox v1.4.2 (2010-04-30 17:58:45 CST) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

~ # dd if=/dev/mtdblock7 bs=00010000 count=5 | nc 192.168.1.20 5555
5+0 records in
5+0 records out
nc: cannot connect to remote host (192.168.1.20): Connection timed out
and on local PC:
Code:
admin@debian:~/Downloads$ nc -l -p 5555 > nvram.bak
Can't grab 0.0.0.0:5555 with bind
What can be the problem?

Last edited by dorsio; 11-01-2015 at 09:31 AM.
 
Old 11-02-2015, 09:56 PM   #2
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,984

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
There are a few hundred great examples on the web on netcat. Funny part is that they seem to be all different. To add to the confusion no all netcat is compiled the say.

I might suggest you try this web page for an example. Kind of the opposite of they way you have it set up.
http://www.cyberciti.biz/tips/howto-...r-network.html

Be sure the ports are open too.

Other page
"
On the VM: nc -l -p 9001 | dd of=/dev/sda

On your source machine: dd if=/dev/sda | nc 9001
"

Last edited by jefro; 11-02-2015 at 09:58 PM.
 
Old 11-03-2015, 01:35 PM   #3
dorsio
Member
 
Registered: Apr 2014
Distribution: Debian
Posts: 92

Original Poster
Rep: Reputation: 1
Thanks for tips. I tried different versions of command, but no one of them is working. I always get error "Cannot connect to remote host (x.x.x.x): Connection timed out." Perhaps netcat implementation on Busybox is somehow limited.
Also,I find that the same BusyBox v1.4.2 version installed on two similar devices, have difference in defined functions: Busybox on one device have no 'nc' option defined.
I tried use TFTP and it works fine.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
VPS daily backup and send to local computer conflicker Linux - Newbie 1 07-05-2013 05:42 PM
Control local X session from remote computer TheCrow33 Slackware 7 09-02-2012 01:28 PM
Using a remote serial device as if it was local sternocera Linux - Hardware 2 11-05-2010 12:13 PM
LXer: Easy local and remote backup of your home network LXer Syndicated Linux News 0 07-26-2006 11:33 AM
How To Remote Backup Files From Another Linux Computer? knight2k Linux - Software 2 08-17-2004 03:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration