Services (TFTP, MySQL) not starting after reboot on Lubuntu 13.10



  • [b]### SOLVED ###[/b]
    The issue was with a bug that Ubuntu doesn’t properly start services.
    My issue was only with tftpd-hpa, but this probably can be applied to other services as well.

    /etc/init/tftpd-hpa.override:

    
    manual
    
    

    /etc/rc.local:

    
    sleep 30
    start tftpd-hpa
    exit 0
    
    

    [b]### Original post###[/b]
    Hi,
    I’m trying to install FOG on a compuer that’s running Lubuntu 13.10. This has happened twice, and I’ve gotten similar results both times.
    I did a fresh install, updated everything, then installed FOG. Everything ran fine, and soon we were able to start booting from the PXE server, registering hosts, and taking images.
    However, after we rebooted the computer, we ran into issues. Both times, the TFTP server refused to start. The first time, the MySQL service broke as well, but the second time it seems to still be working.

    Since I reinstalled the OS after the first failure, I’m unable to give any more details about it, but we haven’t done anything to the second install.

    Here’s the /etc/default/tftpd-hpa config file.

    # /etc/default/tftpd-hpa
    # FOG Modified version
    TFTP_USERNAME="root"
    TFTP_DIRECTORY="/tftpboot"
    TFTP_ADDRESS="0.0.0.0:69"
    TFTP_OPTIONS="-s"
    

    Thanks!


  • Moderator

    @maples, post: 44776, member: 29215 said:

    [B]### SOLVED ###[/B]
    The issue was with a bug that Ubuntu doesn’t properly start services.
    My issue was only with tftpd-hpa, but this probably can be applied to other services as well.

    /etc/init/tftpd-hpa.override:

    >
    manual
    
    >```
     
    /etc/rc.local:
    

    sleep 30
    start tftpd-hpa
    exit 0

    [B]### Original post###[/B]
    Hi,
    I’m trying to install FOG on a compuer that’s running Lubuntu 13.10. This has happened twice, and I’ve gotten similar results both times.
    I did a fresh install, updated everything, then installed FOG. Everything ran fine, and soon we were able to start booting from the PXE server, registering hosts, and taking images.
    However, after we rebooted the computer, we ran into issues. Both times, the TFTP server refused to start. The first time, the MySQL service broke as well, but the second time it seems to still be working.

    Since I reinstalled the OS after the first failure, I’m unable to give any more details about it, but we haven’t done anything to the second install.

    Here’s the /etc/default/tftpd-hpa config file.

    ># /etc/default/tftpd-hpa
    # FOG Modified version
    TFTP_USERNAME="root"
    TFTP_DIRECTORY="/tftpboot"
    TFTP_ADDRESS="0.0.0.0:69"
    TFTP_OPTIONS="-s"
    >```
     
    Thanks!
     
     
     
    #letsmakescripts
     
    Just hash-tagging this... I'm working on something...

  • Developer


  • Moderator

    @Junkhacker, post: 44883, member: 21583 said:

    regarding the backups of config files, i thought i would share what i’ve started doing.
    i create a local git repository on my desktop for each server
    before editing a config file, i copy the file over to the git repo for that server so that i have the original version.
    whenever i make a change, i commit the change to the config file in the git repo as well.
    this gives me a complete log of all changes i make to the server’s configuration and i make notes in the commit logs about what i did and why.

    Could you share some resources about that? I’m absolutely a total noob with doing Repos… and that other stuff you just said…


  • Developer

    http://fogproject.org/wiki/index.php/FOG_(r2922)_Configuration_on_Fedora_21_Workstation_inside_Windows_Server_2012_Hyper-V_using_ProxyDHCP#Set_the_FOG_services_to_start_30_seconds_after_boot[/quote]

    regarding the backups of config files, i thought i would share what i’ve started doing.
    i create a local git repository on my desktop for each server
    before editing a config file, i copy the file over to the git repo for that server so that i have the original version.
    whenever i make a change, i commit the change to the config file in the git repo as well.
    this gives me a complete log of all changes i make to the server’s configuration and i make notes in the commit logs about what i did and why.


  • Developer

    @maples, post: 44833, member: 29215 said:

    It’s working now. I made /etc/init/tftpd-hpa.override that contains “manual” and I changed my /etc/rc.local to

    >
    sleep 30
    start tftpd-hpa
    exit 0
    
    >```
     
    Does this forum have a "thread solved" button? I know that some others do, but I haven't found it yet.
     
    Thanks!
     
     
    No not exactly (for the Solved button) but you are welcome to edit your main post, Leave a note on the solution and put a BOLD line at the top that explains the issues have been resolved, remember to put code in the code brackets so it is easier to copy and paste without the darn emojis!!!!
     
    Like this:
     
    [B]***SOLVED***[/B]
    Thanks (list of persons that helped)
     
    This seems to have solved my issue of [issue goes here]:
    

    {Actual resolution of the issue}

     
    I appreciate all your help and support!


  • It’s working now. I made /etc/init/tftpd-hpa.override that contains “manual” and I changed my /etc/rc.local to

    
    sleep 30
    start tftpd-hpa
    exit 0
    
    

    Does this forum have a “thread solved” button? I know that some others do, but I haven’t found it yet.

    Thanks!


  • Moderator

    I edited my /etc/rc.d/rc.local file in Fedora to delay the startup of fog services.

    You could try it… Worst thing that happens is it won’t work, you un-do it, and go with another method. Don’t be afraid to experiment; it’s the VERY best way to learn. Make backups of files with the copy command for a safety net (I never did, I use snapshots in a VM).

    Although it doesn’t apply to tftp, you can look here to see how I delay FOG services in Fedora to get you started…

    http://fogproject.org/wiki/index.php/FOG_(r2922)_Configuration_on_Fedora_21_Workstation_inside_Windows_Server_2012_Hyper-V_using_ProxyDHCP#Set_the_FOG_services_to_start_30_seconds_after_boot



  • So for the tftpd service, I would create /etc/init/tftpd-hpa.override (overwrite if it already exists), and it should contain only the word “manual”

    From what I’ve found, /etc/rc.local gets run at the end of every runlevel. We only want to start it once, so wouldn’t it be a better idea to put a startup (with delay) script into one of the /etc/rcX.d/ directories?

    MySQL seems to be working for now, but would you suggest doing the same thing for that service as well?

    Thanks!


  • Senior Developer


Log in to reply
 

361
Online

38746
Users

10569
Topics

100052
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.