PDA

View Full Version : Static IP address



jdally
04-16-2004, 09:52 PM
Any ideas how a hdd installation can be configured to a static ip address on boot up? (I am currently running netcardconfig each time my computer starts up!)

OErjan
04-16-2004, 10:36 PM
you could save your home directory and the configs with the two comands (in the kde menus).
that is: klick yourself to these.

KNOPPIX | Configure | Create a persistent KNOPPIX home

AND (taken from the faq at http://www.knoppix.net/docs/index.php/FaqUsing )
directory
Go to the K-menu > KNOPPIX > Configuration and choose "save config", you can save to floppy or to an already existing partition on the harddrive. (on a windows partition s fine)
sadlt that about wndows only aplies if you do NOT have NTFS on the partition.
To restore it, at the "boot:" prompt type in "knoppix myconfig=scan", and it should find and restore your saved settings at boot time.


if you save to hdd or floppy or usb pendrive you can then reopen with the cheatcodes

boot: knoppix home=scan myconfig=scan
and of course any other necesary cheatcodes, you should have all settings/bookmarks... intact.

OErjan
04-16-2004, 10:38 PM
oops, hdd installed!
eeeh, then it SHOULD keep the settings.
have you gotten any error messages?
what does dmesg|grep eth say?

jdally
04-17-2004, 04:51 PM
On boot up the ethernet card is detected - it just defaults to dhcp - although it does store the ip address in the file /etc/sysconfig/network-scripts/ifcfg-eth0, it just ignores it on boot.
I've tried passing the kernel option nodhcp, but then the network card isn't configured at all.
Oh well I had better start delving into the init.d scripts.

baldyeti
04-17-2004, 06:50 PM
although it does store the ip address in the file /etc/sysconfig/network-scripts/ifcfg-eth0, it just ignores it on boot.I think it is /etc/network/interfaces you need to be looking at.

jdally
04-17-2004, 06:50 PM
Ok I've not got static IP address on my hdd install, by doing the following:-
edit /etc/init.d/networking
Change the first "ifup -a" to "ifup --force -a"

cd cd /etc/rc5.d/
ln -s /etc/init.d/networking S90networking

Changing /etc/init.d/networking is a bit ugly, but it works.

You can also add other links to /etc/rc5.d/ for other services at boot, eg ssh:-
ln -s /etc/init.d/ssh S99ssh

Durand Hicks
04-17-2004, 08:35 PM
A cleaner solution is to edit /etc/pcmcia/network.opts and put the static lines in there accordingly except for dns. Also, if you needed to add startup scripts to start services, open a console as root and type:
update-rc.d servicetostart defaults and press enter.