Machstorm Posted December 4, 2008 Share Posted December 4, 2008 When I try to use the mtd -e "RedBoot config" write out.hex "RedBoot config" reboot command I get "/path (no this not the real path)/out.hex : no such directory" even though I know I copied it over in scp. I tried to copy it again using SCP, but it tells my that there is no such directory when I try to copy out.hex. I know that the path to file is correct. Quote Link to comment Share on other sites More sharing options...
PLuNK Posted December 4, 2008 Share Posted December 4, 2008 What are the permissions on the file(s) Can you provide some actual output of the commands please? Don't know exactly what your trying to do.. Quote Link to comment Share on other sites More sharing options...
digininja Posted December 4, 2008 Share Posted December 4, 2008 Did you reboot after copying it over? If so then it is cleared out on a reboot, just scp it again. Quote Link to comment Share on other sites More sharing options...
Machstorm Posted December 4, 2008 Author Share Posted December 4, 2008 root@OpenWrt:~# scp /home/machstorm/Pineapple/out.hex root@192.168.10.1:/temp Password: /home/machstorm/Pineapple/out.hex: No such file or directory root@OpenWrt:~# sh: turning off NDELAY mode I did reboot it after I used the mtd -e vmlinux.bin.l7 write openwrt-ar531x-2.4-vmlinux-CAMICIA.lzma vmlinux.bin.l7 reboot in step 9 Now it will not copy the file over when I am connected in SSH Quote Link to comment Share on other sites More sharing options...
digininja Posted December 4, 2008 Share Posted December 4, 2008 root@OpenWrt:~# scp /home/machstorm/Pineapple/out.hex root@192.168.10.1:/temp it is /tmp not /temp Quote Link to comment Share on other sites More sharing options...
Machstorm Posted December 4, 2008 Author Share Posted December 4, 2008 Doh, now I know I need some sleep. I have been up way to long. Sorry guys Grrr! even with the change I still get the same error After SSH'ing back into it for a fourth time the command finally took Quote Link to comment Share on other sites More sharing options...
PLuNK Posted December 4, 2008 Share Posted December 4, 2008 You don't need to be logged into the host for the scp copy to take place, The reason you specify the host & user on the remote host is to login to it. Quote Link to comment Share on other sites More sharing options...
Machstorm Posted December 4, 2008 Author Share Posted December 4, 2008 Well atleast i got the file copied over. machstorm@linux-rum0:~> scp /home/machstorm/Desktop/Pineapple/out.hex root@192.168.10.1:/temp root@192.168.10.1's password: out.hex 100% 4096 4.0KB/s 00:00 Now, I still have the same problem when I use the mtd -e "RedBoot config" write out.hex "RedBoot config" reboot. Message still says: " root@OpenWrt:~# mtd -e "RedBoot config" write out.hex "RedBoot config" Couldn't open image file: out.hex" Quote Link to comment Share on other sites More sharing options...
digininja Posted December 4, 2008 Share Posted December 4, 2008 Well atleast i got the file copied over. machstorm@linux-rum0:~> scp /home/machstorm/Desktop/Pineapple/out.hex root@192.168.10.1:/temp This will copy the file to a file called /temp on the device. You need to change it to /tmp/ to copy it to the temporary directory and retain the filename. Quote Link to comment Share on other sites More sharing options...
Machstorm Posted December 4, 2008 Author Share Posted December 4, 2008 Yeah, I corrected it after I posted but I still get the same error Quote Link to comment Share on other sites More sharing options...
digininja Posted December 4, 2008 Share Posted December 4, 2008 On the device, do ls /tmp and see what you get. The file is being copied to somewhere and if you do the line I said then it should end up in the /tmp directory. Make sure you have the / on the end of the scp line so that it definitely makes it into the directory. And are you in /tmp when you run the mtd command? try explicitly referencing /tmp/out.hex . Quote Link to comment Share on other sites More sharing options...
Machstorm Posted December 4, 2008 Author Share Posted December 4, 2008 I tried it and ls -la and this is what I got: root@OpenWrt:~# ls /tmp dhcp.leases log resolv.conf scp hostapd.conf network-config run spool root@OpenWrt:~# dir -ash: dir: not found root@OpenWrt:~# ls -la drwxrwxrwt 7 root root 240 Jan 1 02:00 . drwxr-xr-x 1 root root 0 Jan 1 01:32 .. drwx------ 2 root root 60 Jan 1 00:55 .ssh drwxr-xr-x 2 root root 40 Jan 1 01:28 .webif -rw-r--r-- 1 root root 0 Jan 1 00:01 dhcp.leases -rw-r--r-- 1 root root 143 Jan 1 00:01 hostapd.conf drwxr-xr-x 2 root root 80 Jan 1 00:00 log -rw-r--r-- 1 root root 68 Jan 1 00:01 network-config -rw-r--r-- 1 root root 0 Jan 1 00:01 resolv.conf drwxr-xr-x 2 root root 100 Jan 1 01:28 run -rw-r--r-- 1 root root 0 Jan 1 01:37 scp drwxr-xr-x 3 root root 60 Jan 1 00:01 spool I tried copying the file over again and I am getting errors. Quote Link to comment Share on other sites More sharing options...
PLuNK Posted December 4, 2008 Share Posted December 4, 2008 Try "cd /tmp" then run the command you want again. (With the posted corrections) Also try "mtd -e "RedBoot config" write /tmp/out.hex "RedBoot config" Quote Link to comment Share on other sites More sharing options...
digininja Posted December 4, 2008 Share Posted December 4, 2008 I tried copying the file over again and I am getting errors. What errors, post exactly the command and exactly the errors. Quote Link to comment Share on other sites More sharing options...
Machstorm Posted December 4, 2008 Author Share Posted December 4, 2008 root@OpenWrt:~# cd /tmp root@OpenWrt:~# mtd -e "RedBoot config" write out.hex "RedBoot config" Couldn't open image file: out.hex! root@OpenWrt:~# reboot I tried this command with the path to out.hex and got the same error Quote Link to comment Share on other sites More sharing options...
PLuNK Posted December 4, 2008 Share Posted December 4, 2008 Remember the tmp directory is temporary so whenever you restart all files get purged. Quote Link to comment Share on other sites More sharing options...
Machstorm Posted December 4, 2008 Author Share Posted December 4, 2008 I know, I have when back and had copied the out.hex over each time but for some reason the folder and the file are not showing up I found a solution. I opened a seperate terminal and performed the scp copy with out SSH and it worked Quote Link to comment Share on other sites More sharing options...
PLuNK Posted December 4, 2008 Share Posted December 4, 2008 Hmm... Don't want to look like a ass hole but.. "TOLD YOU SO!" Look up a few posts.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.