OpenWrt Forum Archive

Topic: Asus WL-500g Premium - missing /etc/config/network

The content of this topic has been archived on 30 Jan 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi!

I'm new to OpenWRT society, but I'm fascinated about it.

I have a problem and could not get any solution by reading wiki, how-to, forum ...

I'm using Asus WL-500g Premium running Kamikaze with X-WRT. While I was playing in web interface I somehow disable all lan ports (wireless was already). So the result is that I can not access my router anymore.
I tried and managed using failsafe mode. I can telnet to router. Then i wanted to follow instructions on editing /etc/configuration files (/etc/config/network)
The problem is that I have only:

root@OpenWrt:/etc/config# ls
dhcp      dropbear  firewall    system


Can anyone help me?


Regards,
Nejc

not sure how those went missing... but they're definately needed.  They define the VLANs & such...

Should look similar to the following...

#### VLAN configuration
config switch eth0
        option vlan0    "1 2 3 4 5*"
        option vlan1    "0 5"


#### Loopback configuration
config interface loopback
        option ifname   "lo"
        option proto    static
        option ipaddr   127.0.0.1
        option netmask  255.0.0.0


#### LAN configuration
config interface lan
        option type     ''
        option ifname   "eth0.0"
        option proto    static
        option ipaddr   X.X.X.X
        option netmask  255.255.255.0


#### WAN configuration
config interface        wan
        option ifname   "eth0.1"
        option proto    'static'
        option dns      'X.X.X.X X.X.X.X'
        option ipaddr   'X.X.X.X'
        option netmask  '255.255.255.0'
        option gateway  'X.X.X.X'

config "interface" "wifi"
        option proto    'static'
        option ipaddr   'X.X.X.X'
        option netmask  '255.255.255.0'


(I blanked out a lot of my info with X.X.X.X but they still should be self explanitory)

Another simple fix would have been to just reload the firmware.   All those files would be restored.

i think the /etc/config/network
is generated at boot, using /etc/init.d/netconig

maybe this helps...

could probably run firstboot...  anyhow... still... yeah.  (there's other config files missing too)

It's X-Wrt. Ask in their forum. I don't know what they are doing...

Watch what you are doing before causing a disaster. smile
You are looking into the read only squashfs file system.

This is the standard failsafe procedure. There is nothing X-Wrt specific.

Run

mount_root

to mount jffs2 partition to see the actual state of files.

You can run

firstboot

to reinitialize jffs2 to defaults, the network config will be regenerated at the next boot. Otherwise continue reading.

If the /etc/config/network is missing (or if it is heavily broken then delete it) and you can regenerate it by running /etc/init.d/netconfig or restart the device and it will be regenerated with default values at boot.

You can restore remaining config files by symlinking (or copying) them from the original place in the squashfs partition, e.g.:

ln -sf /rom/etc/config/cron /etc/config/cron

or

cp -f /rom/etc/config/cron /etc/config/cron

If you are not brave enough to make these modifications, reflash the device by the mtd command or tftp.

forum2008: They are watching you. smile

The discussion might have continued from here.