Reinstalling Backing up Database Failed



  • Hello all and George

    I put my fog server on private switch. I want to reinstall fog enabling it’s own dhcp server. But when I do this I get the error that

    Backing up database… failed!

    Now I am thinking to uninstall fog

    https://wiki.fogproject.org/wiki/index.php?title=Uninstall_FOG

    Then reinstall. But, would I need to connect to internet? To redownload packages etc? I know once I hit that dhcp switch I will bother the entire lab here.

    Ran these commands (database maintenance):

    https://wiki.fogproject.org/wiki/index.php?title=Troubleshoot_MySQL#Database_Maintenance_Commands

    But still same error.
    AND AND AND
    setenforce 0
    getenforce is permissive

    but an SELinux denial alert keeps coming up

    SELinux is preventing /usr/bin/passwd from ioctl access on the file /home/cos/Downloads/fog_1.4.4/bin/error_logs/fog_error_1.4.4.log.

    Thanks for the help!

    EDIT: SELinux alert updated



  • @sebastian-roth Yeah, my supervisor is satisfied with the process. It is working. Thanks so much for your help guys!


  • Developer

    @jackiejack said in Reinstalling Backing up Database Failed:

    BUT pxe boot process asked for tftp server ip addr.

    If I remember correctly this can happen if both the normal DHCP (in your case the home router) and dnsmasq provide next-server information. So there is not much we can do about it. You’d need to change your DHCP setup to get rid of that issue. I’d say play with that stuff for a bit longer over Christmas and then see if you wanna change to a different DHCP server and toss dnsmasq altogether.

    I am marking this solved now. Please open a new thread if you have any further questions or issues. Better to not discuss too many different things in one thread as it makes it very confusing for people who search the forums for answers to their questions.



  • @jackiejack deployed sysprepped image unto real host on private switch. dnsmasq looks like it’s working well with my home router.
    Target went into OOBE.

    BUT pxe boot process asked for tftp server ip addr.
    Target computer legacy boot and disable pxe boot in order to boot from hard drive. It didn’t seamlessly go to OOBE as soon as deployment tasked finished.

    Feelin good.



  • @jackiejack uploading my sysprepped image from vm! But it asks me for tftp server address. It not automatic.



  • @jackiejack Something weird:
    on ubuntu
    systemctl stop ufw
    systemctl status ufw
    inactive

    pxe vm and it got the fog menu. I was on the first line “boot from harddrive” for a split second and then it boot into windows.

    I loaded up a snapshot (sysprepping) then pxe boot. Now not even finding 1.39.

    Puzzle indeed

    The time when the fog boot menu came up, it asked me just before for tftp server. So I put 192.168.1.39. Then it went to the fog menu (it was only up for a split second). An SELinux alert/denial thing came up on fog server



  • @george1421 running centos - disabled firewalld and setenforce 0

    I can get a windows 10 on the same subnet not windows 7

    Now I am NOT getting contact with 1.39 when pxe boot on vm


  • Moderator

    @jackiejack This is an interesting puzzle.

    you have a pxe booting client on the same subnet as the fog server that is getting a timeout trying to download undionly.kkpxe, yet the tftp service is running and we can assume undionly.kkpxe is listed in the /tftpboot directory.

    If you have a working windows 7 or newer computer on the same subnet, install the tftp client feature on the windows computer. Then open a windows command prompt and try to get undionly.kkpxe using the tftp client program.

    Just for my sanity, you did disable the firewall on that ubuntu server right?



  • @george1421
    udp listening on 69

    3 files in undi*



  • @george1421 I will do those steps but now when I pxe boot vm it can’t see x.x.1.39


  • Moderator

    @jackiejack Then can you do this.

    sudo netstat -an|grep 69 this will see if the tftp server is running.

    ls -la /tftpboot/undi* to see if you have the boot files in the right spot



  • @george1421 Yes, static


  • Moderator

    @jackiejack from your second picture dnsmasq / what ever is working because the next server and boot file name is making to the client computer. what it looks like is its timing out trying to download the file. Is 192.168.1.39 the current IP address of your fog server?




  • Moderator

    @jackiejack While I can’t say for absolute, as long as you don’t have ics-dhcp, udp port 67 listening indicates you have a dhcp server running on that server. I know that was not real conclusive, its just because I don’t know what you installed previously.

    You can run the following command to see if the dnsmasq process is running in memory.

    sudo ps aux|grep dnsmasq You should see the dnsmasq command with its command line switches.

    You can also run the following command and query systemd
    sudo systemctl status dnsmasq





  • @george1421
    Is this how it supposed to be? I don’t see “dnsmasq”

    0_1513177516020_dnsmasq.png


  • Moderator

    @jackiejack For dnsmasq, you just need to install your linux distributions package. Just ensure that it is 2.76 or newer. Most distributions have that version now. That is the first version to support both uefi and bios (legacy) booting dynamically.

    Then ensure no other .conf files are in /etc/dnsmasq.d directory. Then create a new config file called ltsp.conf (it can be anything as long as it ends in .conf, but keep the standard). In that /etc/dnsmasq.d/ltsp.conf file add the following configuration:

    # Don't function as a DNS server:
    port=0
    
    # Log lots of extra information about DHCP transactions.
    log-dhcp
    
    # Set the root directory for files available via FTP.
    tftp-root=/tftpboot
    
    # The boot filename, Server name, Server Ip Address
    dhcp-boot=undionly.kpxe,,<fog_server_IP>
    
    # Disable re-use of the DHCP servername and filename fields as extra
    # option space. That's to avoid confusing some old or broken DHCP clients.
    dhcp-no-override
    
    # inspect the vendor class string and match the text to set the tag
    dhcp-vendorclass=BIOS,PXEClient:Arch:00000
    dhcp-vendorclass=UEFI32,PXEClient:Arch:00006
    dhcp-vendorclass=UEFI,PXEClient:Arch:00007
    dhcp-vendorclass=UEFI64,PXEClient:Arch:00009
    
    # Set the boot file name based on the matching tag from the vendor class (above)
    dhcp-boot=net:UEFI32,i386-efi/ipxe.efi,,<fog_server_IP>
    dhcp-boot=net:UEFI,ipxe.efi,,<fog_server_IP>
    dhcp-boot=net:UEFI64,ipxe.efi,,<fog_server_IP>
    
    # PXE menu.  The first part is the text displayed to the user.  The second is the timeout, in seconds.
    pxe-prompt="Booting FOG Client", 1
    
    # The known types are x86PC, PC98, IA64_EFI, Alpha, Arc_x86,
    # Intel_Lean_Client, IA32_EFI, BC_EFI, Xscale_EFI and X86-64_EFI
    # This option is first and will be the default if there is no input from the user.
    pxe-service=X86PC, "Boot to FOG", undionly.kpxe
    pxe-service=X86-64_EFI, "Boot to FOG UEFI", ipxe.efi
    pxe-service=BC_EFI, "Boot to FOG UEFI PXE-BC", ipxe.efi
    
    dhcp-range=<fog_server_ip>,proxy
    
    

    ref: https://forums.fogproject.org/topic/8725/compiling-dnsmasq-2-76-if-you-need-uefi-support/5

    Replacing <fog_server_ip> with the IP address of your fog server.
    Then issue a sudo systemctl enable dnsmasq
    and then sudo systemctl restart dnsmasq to start the service.

    To see if dnsmasq is running and listening issue the following command netstat -an | grep 67 That should show if the dnsmasq service is listening on udp port 67



  • @george1421 I think I want to try that dnsmasq thing tomorrow. You have any tutorials. Or should I just download it?

    I would be happy if I can use my home router and then disable dnsmasq when I am ready to put it back on the lab network. My supervisor said once I deploy a syspreped fog service image, we will consider um isolating the lab network, add our own dhcp server, multicast the images and come next morning with hook back up everything as it was. Sneaky, but beats hopping from computer to computer with FOS usb stick


  • Moderator

    @jackiejack I have been only loosely following this thread so if this response is crazy then please ignore.

    If you setup fog in your home lab, you can use your home router and not use/need isc-dhcp running on your fog server. If you have a dhcp server in your imaging network then you don’t need to use isc-dhcp in your work network either.

    In the case of your home network, most home internet routers/firewalls have a dhcp server built in. But most home routers don’t support pxe booting. BUT, you can install a service on your fog server to supply the missing pxe booting information without needing to modify anything on your dhcp server. This service (dnsmasq) will work the easiest if the fog server and pxe booting client are on the same subnet.

    The reason that FOG needs internet access to install it all for FOG itself. FOG does download precompiled binary files, but also the linux distribution needs to reach out to the distribution’s repository to download needed packages. So at least when fog is installed internet access is required or you would have to download and install by hand all required packages. I can tell you that is not a fun time. If you fog server does not have direct internet access, but can have access via a proxy server fog can be installed that way too.

    One final thought, FOG doesn’t like it when you change the FOG server’s IP address after FOG is installed. The issues can be fixed, just realize you will need to go in and change a few settings in the webgui and a few config files. Normally we would just have you rerun the fog installer to fix the missing bits, but that won’t work on your isolated network.


 

515
Online

41.8k
Users

12.3k
Topics

116.1k
Posts