Results 1 to 8 of 8

Thread: dhcp server won't start at boot time

  1. #1
    Join Date
    Feb 2006
    Beans
    17

    dhcp server won't start at boot time

    I'm having trouble getting the dhcp-server to start on my ubuntu ltsp server on boot, I have to start it manually every time.

    It appears there is a start up script in the right place for booting

    /etc/rc5.d/S40dhcp3-server

    ?

  2. #2
    Join Date
    Mar 2006
    Location
    Williams Lake
    Beans
    Hidden!
    Distro
    Ubuntu Development Release

    Re: dhcp server won't start at boot time

    I have dhcp3-server in rc2.d, rc3.d, rc4.d and rc5.d.

    Try removing dhcp3-server using:

    Code:
    sudo update-rc.d -f dhcp3-server remove
    then adding it again:

    Code:
    sudo update-rc.d dhcp3-server defaults

  3. #3
    Join Date
    Oct 2009
    Beans
    2

    Re: dhcp server won't start at boot time

    I have the same problem as the OP. I tried the above suggestion, but no dice. dhcp3-server still won't start on boot.

    Here's what I did, and my current rc.d links:
    Code:
    $ sudo update-rc.d -f dhcp3-server remove
    $ sudo update-rc.d dhcp3-server defaults
    $ ls -l /etc/rc*.d/*dhcp*
    lrwxrwxrwx 1 root root 22 2009-10-03 16:48 /etc/rc0.d/K20dhcp3-server -> ../init.d/dhcp3-server
    lrwxrwxrwx 1 root root 22 2009-10-03 16:48 /etc/rc1.d/K20dhcp3-server -> ../init.d/dhcp3-server
    lrwxrwxrwx 1 root root 22 2009-10-03 16:48 /etc/rc2.d/S20dhcp3-server -> ../init.d/dhcp3-server
    lrwxrwxrwx 1 root root 22 2009-10-03 16:48 /etc/rc3.d/S20dhcp3-server -> ../init.d/dhcp3-server
    lrwxrwxrwx 1 root root 22 2009-10-03 16:48 /etc/rc4.d/S20dhcp3-server -> ../init.d/dhcp3-server
    lrwxrwxrwx 1 root root 22 2009-10-03 16:48 /etc/rc5.d/S20dhcp3-server -> ../init.d/dhcp3-server
    lrwxrwxrwx 1 root root 22 2009-10-03 16:48 /etc/rc6.d/K20dhcp3-server -> ../init.d/dhcp3-server
    Any suggestsions? I'm going to try the following as a workaround. Add these lines to /etc/rc.local
    Code:
    /etc/init.d/dhcp3-server status
    if [ "$?" -ne 0 ]; then
      echo "Starting dhcp3-server from rc.local"
      /etc/init.d/dhcp3-server start
    fi
    Phil
    Last edited by philv123; October 4th, 2009 at 01:21 AM. Reason: added a line to /etc/rc.local

  4. #4
    Join Date
    Oct 2009
    Beans
    2

    Re: dhcp server won't start at boot time

    I figured out my problem. Posting the fix here in case this helps anyone else.
    1) Change /etc/default/dhcp3-server. Got the hint to do this from this post
    Find the line that says INTERFACES="" and change to INTERFACES="eth0" (or whatever is correct for you).

    2) Change permissions of /etc/dhcp3/dhcpd.conf. I had it set to
    $ ls -l /etc/dhcp3/dhcpd.conf
    -rw-r----- 1 root root 5609 2009-09-14 21:08 /etc/dhcp3/dhcpd.conf

    But dhcp3 runs as user/group dhcpd so 'sudo chgrp dhcpd /etc/dhcp3/dhcpd.conf' fixed it.

    $ ls -l /etc/dhcp3/dhcpd.conf
    -rw-r----- 1 root dhcpd 5609 2009-09-14 21:08 /etc/dhcp3/dhcpd.conf

    After making the above 2 changes, dhcp3-server starts at boot for me. Hope this helps someone else.

    Phil

  5. #5
    Join Date
    Apr 2009
    Beans
    2

    Smile Re: dhcp server won't start at boot time

    Quote Originally Posted by philv123 View Post
    Hope this helps someone else.
    This helped me a ton. I work on so many distros and they all have their own place to put things. I just wanted to get this service working again and your tip fixed it first time. Same issue, same fix. I don't know what the crap happened.

    For a while, I had the rc.local hack in. But now I can take that out. Thanks!!

  6. #6
    Join Date
    Apr 2010
    Beans
    7
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: dhcp server won't start at boot time

    I had the same exact problem as you and I used your (philv123) fix and it worked perfectly for me. Thanks a ton!

    -Will

  7. #7
    Join Date
    Mar 2011
    Beans
    4

    Re: dhcp server won't start at boot time

    This fix didn't work for me. The only thing that worked was to create a startup script that would sleep for 20 to 40 secondes before restarting the dhcp-server service. So it would restart it at about the same time that I would start it manually.

  8. #8
    Join Date
    Dec 2011
    Beans
    5

    Re: dhcp server won't start at boot time

    Hi

    I am VERY new to this, thought I needed a quick DHCP server and it is not working.

    Works fine starting manually, but is not starting automatically, same as everybody else. Have been through philv123 notes and still telling me status - Not Running!

    I am using Ubuntu 10.4, not sure what else will help to track the issue.

    Thanks

    Cracked It

    My fault, using the workstation version (said I was new) and had not set the IP details in /etc/network/interfaces, had set in the GUID so was not configured until you log in !!!
    Last edited by ITJeff; January 1st, 2012 at 04:18 PM. Reason: Cracked it

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •