OpenWrt 86x obstacles

That is where Ubuntu automatically mounts a USB drive when it is plugged in. As initially set up, OpenWrt doesn't automatically mount drives.

Assuming kmod-usb-storage is installed, plugging in a USB drive will create a /dev/sdX family of devices, where X is a letter that starts with "a" then "b" is used for the next drive, etc. So your original boot drive is likely /dev/sda. and the USB will be /dev/sdb.

/dev/sdX is the whole drive, you actually want the first (and for a USB stick, generally the only) partition on /dev/sdb which is /dev/sdb1.

There isn't a /media directory but the empty directory /mnt is conventionally used for temporary mounts. So the command is mount /dev/sdb1 /mnt. If all of this works you can then find your files in /mnt.

Depending on the hardware situation, it's usually easy enough to shut down OpenWrt, remove the drive with OpenWrt installed and mount it on another machine, and copy files directly to it which will be usable when you reboot OpenWrt.

I'm learning a lot of Ubuntu ....but I'm so bad at commands.

Acording to the quote So you mean it's easier to put the file on open wrt and run from here. But where to put it -folder? There are two drives one small one with a boot folder and a bigger one with a root folder. Where to put and what command to write? Thanks for all guys

Put it in the big one with the root folder under /root/.
When you boot the router and login with SSH you'll find it in your home directory.

1 Like

Think I made it :robot:

No! No lan but wan has lights but no internet tried to opkg update but failed to reach internet.

Did I install or not? Is there a problem with the PC? DD-wrt is running on it and win and Ubuntu.

"Is up to date" means it was already installed.

Install pciutils then you can run a lspci to see if the PCI bus is working. Maybe your motherboard's chipset requires some sort of PCI driver.

Pretty sure you just said that you have no internet connectivity, so obviously it won't be able to opkg update and opkg install anything.

what is the network topology at the moment? what is the output of ip addr show?
Do you have some existing network you can plug the LAN port into in order to get access to the internet and do opkg update, opkg install various things?

Have no internet. I wanna try again tomorrow

I think what might be your best bet is to establish internet via some other router, temporarily if needed, and put this device's LAN port onto that router's LAN... and then you can update, install, configure to your hearts content....

It looks like you have the module installed to support your ethernet card. Assuming the card works.

So everything is working? I just tried to opkg update to test if I had internet. Lan to lan ...I will try that...from there I can install online content? I'm a little confused I thought that my x86 would work as a "normal" router.

you can do whatever you want with your device. once all the hardware is working. you should post the output of ip addr show with the device plugged into your existing network

That shows your ethernet cards are all recognized, and your LAN has been bridged to eth0 correctly. Next you probably need to set up WAN, make it a DHCP client, make it physically part of eth1, and plug an ethernet cable into eth1 and see what happens.

But wan is already plugged into the card.

Rj45 in the first port from router lan port. That's what you mean or? It was in when I did the IP command. There is something wrong no?

You have exactly 1 ethernet plugged in, and it's plugged into eth0 which is the port your OpenWrt install is using for the OpenWrt LAN.

Do you have a WAN interface set up in OpenWrt? I think by default it doesn't have one in x86.

You should be able to add one with:

config interface 'wan'
    option ifname 'eth1'
    option proto 'dhcp'

in your /etc/config/network

1 Like

Plug eth0 into your PC instead. With the PC at defaults (obtain IP automatically) it should obtain an IP and then you can ssh to the router at 192.168.1.1.

Then to get Internet access, as @dlakelan said set up one of the other ports as wan.

Leaving eth0 connected to your house network as it is now is likely to cause other network devices to get a wrong IP and malfunction.

1 Like

Watch out! Your photos have your geographic location in the metadata!

I think it's working internet on eth1

But how do I get eth0 wan and eth1-3 to lan...it a router right :wink:

You say I should ssh on eth0 192.168.1.1 and then what? I want to see the the GUI

Edit /etc/config/network.

In the lan section set option ifname 'eth1 eth2 eth3'
This sets up a kernel bridge (software switch) linking the three ports as well as the lan functions of OpenWrt.

Make sure there's a wan section like this:

config interface 'wan'
    option ifname 'eth0'
    option proto 'dhcp'
    option hostname 'openwrt-x86'

The hostname line is optional (and you can use any name) but it is likely to be useful later.

This assumes you will plug eth0 cable into another network which has a DHCP server and is linked to the Internet. A conventional home network meets these requirements.

If the IP address used by the WAN network turns out to be in the range 192.168.1.X you will need to change the lan IP in OpenWrt to something that doesn't conflict. ip addr show will show if you received a wan IP successfully.

In order to see GUI connect PC to a port that is part of the lan, then have it obtain an IP address automatically. Use web browser to go to 192.168.1.1 or 'openwrt.lan' This of course requires that the build you have installed contains the LuCI web interface server.

It will be easiest if you do the initial change you want first in command line, and then get your device plugged into the LAN and you can gui all you like. Trying to make these changes in the gui will lead to rollback because you're changing which ports you connect on etc.

Follow @mk24 instructions above. Then shut down the system, plug your internet source into eth0 and plug your laptop or some other device into eth1. Reboot the box, and you should be able to use your laptop/LAN machine to go to http://192.168.1.1/ to see the LuCI GUI.

1 Like