Lilo - static IP setting on boot


Forum: Networking
Topic: Lilo - static IP setting on boot
started by: gpcola

Posted by gpcola on Mar. 25 2006,14:35
I've been trying to get DHCP disabled in DSL but I'm not having much success unfortunately...  

According to the < DSL wiki > you need to do the following:

Quote
How can I enter and save my static IP settings?

To save static IP settings with backup/restore we need to make changes in two areas.

Boot the CD with the cheatcode dsl nodhcp or add nodhcp to the APPEND line in the Lilo or Grub bootloaders.

We need to add the static IP information to the /opt/bootlocal.sh file. This file is backed up in the /home/dsl/.filetool.lst file by default. For this step you will need to know the static IP, Default Gateway and DNS nameserver of your ISP. With this information your /opt/bootlocal.sh file should have the following entries.

ifconfig eth0 xxx.xxx.x.xx
route add default gw xxx.xxx.x.x
echo nameserver xx.xx.xxx.xx > /etc/resolv.conf
ifup eth0

With these two steps you should have your static connection up and running the next boot. Make sure you back them up!


I added the nodhcp flag to the APPEND line in the Lilo bootloader /etc/lilo.conf

Quote
append="hda=scsi hdb=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdg=scsi apm=power-off nomce noapic nodhcp"


...and edited /opt/bootlocal.sh, adding the necessary IP's but it still uses DHCP when the hardware is detected...

Not sure where to go from here because I followed the instructions and it doesn't want to work :(

Can anyone offer advice as to where I've gone wrong?  I'm a linux/networking noob so be gentle please  :laugh:

Posted by roberts on Mar. 25 2006,21:55
I am assuming that this is a hard drive install.

After you edit /etc/lilo.conf then you usually run lilo to install it.

Posted by gpcola on Mar. 26 2006,01:23
Yep it's a hd install.

So just editing the file isn't enough?  I had just assumed that lilo.conf was being read during the boot process.

When you say run lilo what command do I run exactly?  Is it just 'lilo'? And from within which folder would I need to run it?

Sorry for the noob questions, but like I say, I am just that  :D

Posted by doobit on Mar. 26 2006,01:30
I also noticed you did not include the command "dsl" anywhere in the line. I think you need to include that to distinguish it from a kernel command.
Posted by cbagger01 on Mar. 26 2006,05:47
Yes, you need to rerun the command for lilo from the command prompt (for example, inside a terminal window)

The name of the command is "lilo"

Posted by gpcola on Mar. 26 2006,13:15
Ok guys that's got it I think :D

Thanks for everyone's help in this matter.  Appreciate the fast responses.

As an aside, it might be an idea to add some more detailed instructions to the wiki for noobs like myself.  I'd have never figured out the missing piece of the puzzle without your help...

Posted by gpcola on Mar. 26 2006,19:59
nm
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.