OpenWrt Forum Archive

Topic: 'hardwiring' bootup configuration options?

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

Hi there. Hoping this little question doesn't come off too newbish, but to be frank im fairly green to OpenWRT (though I already have a dd-wrt enabled router going and I've had some experience with various linux distros here and there and can hold my own on a command line environment given access to google to look up stuff wink )

Anyways, I have this FON router here which I have some pretty odd expectations of. Those being to nuke anything that makes it a routing device, give it one interface/ip off the single WAN port which would be a dhcp address from the upstream dd-wrt router, then with ssh access, turn it into a micro-server type device to run small apps here and there like an httpd, ftpd, etc.. coupled with a CIFS mounted share. It's already half on it's way with the antenna being fully removed (right now it is making good use as an external antenna for the minipci card on my dell laptop which alternatively uses mere pieces of scrap metal under the LCD bezel as antennas), essentially (and literally) neutering the device. Though it still seems to get a decent signal out locally so I could probably keep that option open for certain applications later on.

Well, my first problem is this: I've tried numerous kamikaze atheros builds including one from x-wrt.org and all seem to run fine (well, the x-wrt.org build seemed to nag about a missing nvram mount on numerous pages. if this could be explained, i'd greatly appreciate it.), but I can't seem to get it to even hold a custom set static ip on eth0. It all reverts after a reboot and it ends up at 192.168.1.1 again which conflicts with the upstream router.

Is there any way around this so that it will hold the configuration after a reboot? Or am I looking at a custom compile of kamikaze with a custom boot script of sorts compiled into the image?

Thanks for any help.

Upon bootup it should reformat the flash and give you a jffs2 filesystem, at that point anything you change on the filesystem should persist across reboots.

Well, I'll be honest with you. The only thing I tried was an 'ifconfig -a eth0 192.168.1.5' to give it a static ip. at that point it took and I could re-telnet in from the new address. but once I called a 'reboot' from the telnet interface and it came back up, I found it reverted back to 192.168.1.1 . I don't know if I should attempt something else here or what.

Well, I kinda found a way around this little issue. I just went in and compiled my own copy of the image with the WAN interface set for dhcp by default. All seems to be running real smooth so far. I did run into a minor problem right off the bat with a gateway address not being set on the adapter so access to anything off the LAN would error out. I edited that into the /etc/config/network file and rebooted and it held fine.

The discussion might have continued from here.