Can't cd to /mnt/usb and there is no /dev/sda1

Posted by imok 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 06:06AM
Hi there...I have flashed my TL-WR842ND router (v.2) with the latest OpenWRT image here:

[wiki.openwrt.org] (using r40698)

I changed the password and can SSH in, so the build appears to work. However, if I plug in a USB drive, the USB light comes on but I can't find it. There is no /dev/sda1, and I can't cd to /mnt/usb.

Can you please give me some suggestions so that I can get to the next step on this install?

Thanks!
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 08:08AM
Hi imok,
trunk images are not supported.

USB drivers are not preinstalled on stock OpenWRT images. So you need to connect your device the internet and then run some installation scripts.

1. connect to Internet (connect via WAN port to your home network)
2. login via telnet/ssh
3. Connect USB stick to your device
4. run the following commands
Language: PHP
opkg install http://stable.openwrt.piratebox.de/all/packages/pbxopkg_0.0.6_all.ipk opkg update opkg install box-installer
5. Trigger installation
box_installer_start.hs

Hope that helps

Matthias
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 03:10PM
Is there a workaround for wget issues? I get a "failed to download [..."]; and "wget returned 1" message.

I can ping IP addresses on the internet, e.g. 8.8.8.8, so I have connectivity. Thanks again for your help..wish I could have used a better build, but my late-version router is all I've got.
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 03:19PM
ping 8.8.8.8 work, but no DNS resolution?
add

nameserver 8.8.8.8

to /etc/resolv.conf on your openwrt system.
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 03:30PM
Can I use vi for that? Will it save?
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 03:31PM
yes you can use vi or simply

echo "nameserver 8.8.8.8" >> /etc/resolv.conf

Matthias
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 04:32PM
> 5. Trigger installation
>
> box_installer_start.hs
>

Yes, I can now get the packages and see the usb with the install folders, but this command doesn't do anything if I just type it in. Do I need to do something here if I can get to the usb and just run the "mtd write..." command? I tried it, and the router updated the firmware off the usb, but I still have an OpenWRT box sending an OpenWRT ssid.

Thx-

EDIT: nevermind! got it! I wasn't in /bin.



Edited 1 time(s). Last edit at 06/12/2014 04:55PM by imok.
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 05:28PM
Okay - I think I have figured out the problem...is there a solution?

I have installed OpenWRT successfully. I moved the auto_package_done to auto_package, and successfully executed the box_installer_start.sh script. It ran.

I restarted my router - my SSID now shows PirateBox, and I can still access USB. Definite progress.

Problem is...I'm not sure that anything else installed. There is nothing in /opt/piratebox. No Kareha, etc.

I don't want to run the "mtd write -r openwrt<TAB> firmware" command if I don't have to since this will install the openwrt package without USB support again, and if the firmware without USB support installs first, then it won't find the rest of the Piratebox files on the USB drive. Is there a quick and dirty way to get the servers installed and up and running? It appears everything is operating okay right now with USB and SSID getting updated...i don't want to start breaking things again.



Edited 2 time(s). Last edit at 06/12/2014 05:51PM by imok.
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 07:13PM
Hi,
did you used the trunk image or attitude adjustment?

Matthias
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 12, 2014 08:11PM
Going to guess trunk, since I only have a Windows box and am not sure how to compile a TL-WR842-v2 build from attitude adjustment.
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 13, 2014 09:57AM
add run the following line on your piratebox

echo "/etc/init.d/piratebox start" >> /etc/rc.local

That fixes the startup for PirateBox. If you want to run the media server, you need to add another line.

Matthias
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 13, 2014 03:46PM
Mathias - you are excellent. This is great. Up and running!

I know this is all just open source hacks, but this TL-WR842ND v.2 router is a great one that would really benefit from having an easy build process like the other TP-Link boxes. (This unit has removable antennas, so can get a lot more range - I'm thinking like a neighborhood chat service.)
Re: Can't cd to /mnt/usb and there is no /dev/sda1
June 13, 2014 04:10PM
I'm a fan of the 8424ND. Version 1 was quite cheap and has enough power & range smiling smiley

I just recognized that v2 is also available in our backport image-source. I just uploaded it to our stable repository.