Can FOG replace my urbackup Server ?



  • Hi, I am an absolute beginner… I just would like to know if FOG can replace my urbackup Server ?



  • Kali Install 2017.3 - v.01

    create the required directories:

    mkdir -p /images/os/kali/2017.3/install/ /tftpboot/os/kali/2017.3/install/ /tmp/netboot/ /mnt/loop/

    rsync or wget kali-linux-2017.3-amd64.iso to /iso

    rsync -avzr --progress /<your-path>/kali-linux-2017.3-amd64.iso /iso/

    Mount the Kali ISO:

    mount -o loop -t iso9660 /iso/kali-linux-2017.3-amd64.iso /mnt/loop

    We need to download the netboot kernel:

    cd /tmp/netboot
    wget http://repo.kali.org/kali/dists/kali-rolling/main/installer-amd64/current/images/netboot/netboot.tar.gz

    extract tarball:

    tar -zxf netboot.tar.gz

    Copy the files:

    rsync -avzr --progress /mnt/loop/* /images/os/kali/2017.3/install
    rsync -avzr --progress /tmp/netboot/debian-installer/amd64/{linux,initrd.gz} /tftpboot/os/kali/2017.3/install

    adjust and umount:

    cd /tmp
    rm -rf ./netboot
    umount /mnt/loop

    Setup a new FOG iPXE boot menu entry:

    In the fog WebGUI go to FOG Configuration->iPXE New Menu Entry
    Set the following fields

    Menu Item: os.Kali.install.2017.3
    Description: Kali Install 2017.3
    Parameters:
    kernel tftp://${fog-ip}/os/kali/2017.3/install/linux
    initrd tftp://${fog-ip}/os/kali/2017.3/install/initrd.gz
    imgargs linux initrd=initrd.gz root=/dev/nfs netboot=nfs nfsroot=${fog-ip}:/images/os/kali/2017.3/install ip=dhcp rw language=de country=AT keymap=de hostname=kali domain=test.lan
    boot || goto MENU
    Menu Show with: All Hosts

    0_1511449825460_01773900-5092-438b-b746-4e375709c391-grafik.png



  • @george1421
    OK, thanks for your comments… I will study it tomorrow, no more time this day… I tried also the installer-version of kali, what I will show you in the next reply…


  • Moderator

    @fpausp Very nice. Thank you for the efforts put into documenting this.

    I only have one comment, and its only a comment on iPXE and protocols.

    tftp works very well that is why its widely accepted method of pxe booting and some kernels only support loading the boot strap kernel by tftp. The down side to tftp is that its not a very fast communication protocol and some PXE Roms are broken when it comes to cross subnet routing. That is one of the reasons why the FOG developers opted to use iPXE as replacement boot ROM.

    iPXE supports booting via many different protocols(tftp, http, https, nfs, sanboot, iscsi, etc). FOG uses a mixture of tftp and http for FOS kernel booting. HTTP was primarily used because its a much faster, scalable, and routable protocol than with standard tftp.

    In your example for kali live. You could have just as easily use http or nfs to boot your kali live image. Using http protocol could work, but I’ve seen several distributions where it breaks because of the FOG API and redirection created in apache to make it work.

    kernel tftp://${fog-ip}/os/kali/2017.3/live/vmlinuz
    initrd tftp://${fog-ip}/os/kali/2017.3/live/initrd.img
    imgargs vmlinuz initrd=initrd.img append boot=live components fetch=tftp://${fog-ip}/os/kali/2017.3/live/filesystem.squashfs
    

    Could be restated as this using the http protocol

    kernel http://${fog-ip}/os/kali/2017.3/live/vmlinuz
    initrd http://${fog-ip}/os/kali/2017.3/live/initrd.img
    imgargs vmlinuz initrd=initrd.img append boot=live components fetch=http://${fog-ip}/os/kali/2017.3/live/filesystem.squashfs
    

    The risk above is on the imgargs line with the fetch entry. The kernel has to support what ever protocol you use here. Its iPXE responsiblity to deliver kernel and initrd to the target computer. Once that is done the target kernel takes over and is responsible for delivering anything on the imgarg line. BUT, the advantages is that http is light speed faster than tftp with kernel load times. That is why FOG uses http to deliver FOS to the target computers.

    You could have also rewritten this using the nfs protocol, for additional speed improvements over tftp.

    kernel nfs://${fog-ip}/os/kali/2017.3/live/vmlinuz
    initrd nfs://${fog-ip}/os/kali/2017.3/live/initrd.img
    imgargs vmlinuz initrd=initrd.img append boot=live components fetch=nfs://${fog-ip}/os/kali/2017.3/live/filesystem.squashfs
    

    Now again the risk is the fetch command, if the kernel doesn’t support nfs then booting will break.

    For those who might like to try and experiment with booting different protocols here is the fog server path associated with the protocol.

    tftp://${fog-ip}/os == /tftpboot/os
    http://${fog-ip}/os == /var/www/html/os
    nfs://${fog-ip}/os == /images/os

    You could use sanboot, AoE, or iscsi boot but that would require you to create a block level device (i.e. hard drive) to host your boot images.

    When selecting the protocol you have to be mindful of where that server services calls its home, root, or base directory.

    The point is in the end use the right protocol for the task you are trying to achieve.



  • Kali Live 2017.3 - v0.1

    create the required directories:

    mkdir -p /iso /mnt/loop /tftpboot/os/kali/2017.3/live/

    rsync or wget kali-linux-2017.3-amd64.iso to /iso

    rsync -avzr --progress /<your-path>/kali-linux-2017.3-amd64.iso /iso/

    mount the ISO:

    mount -o loop -t iso9660 /iso/kali-linux-2017.3-amd64.iso /mnt/loop

    copy the files into your tftpboot-path:

    rsync -avzr --progress /mnt/loop/live/{initrd.img,vmlinuz,filesystem.squashfs} /tftpboot/os/kali/2017.3/live/

    umount iso:

    umount /mnt/loop

    Setup a new FOG iPXE boot menu entry:

    In the fog WebGUI go to FOG Configuration->iPXE New Menu Entry
    Set the following fields

    Menu Item: os.Kali.live.2017.3
    Description: Kali Live 2017.3
    Parameters:
    kernel tftp://${fog-ip}/os/kali/2017.3/live/vmlinuz
    initrd tftp://${fog-ip}/os/kali/2017.3/live/initrd.img
    imgargs vmlinuz initrd=initrd.img append boot=live components fetch=tftp://${fog-ip}/os/kali/2017.3/live/filesystem.squashfs
    boot || goto MENU
    Menu Show with: All Hosts

    0_1511447761943_4c382092-19a9-44c7-9290-d092ec4047b2-grafik.png



  • I was able to do it with Fedora 27 LiveCD. I can boot the CD, but I cannot login.
    Do you know the credentials ?

    0_1511432785834_0426d751-d8a9-4d79-b8e7-d0c75ecfb832-grafik.png

    Here is what I have done…

    Fedora 27 Workstation

    First we’ll create the required directories:

    mkdir /images/os/fedora
    mkdir /images/os/fedora/W27
    mkdir /tftpboot/os/fedora
    mkdir /tftpboot/os/fedora/W27

    Mount the Fedora 27 ISO:

    mount -o loop -t iso9660 /iso/Fedora-Xfce-Live-x86_64-27-1.6.iso /mnt/loop

    Copy the files:

    cp -R /mnt/loop/* /images/os/fedora/W27
    umount /mnt/loop

    Copy the pxe boot kernel and intfs to the tftpboot directory:

    cp /images/os/fedora/W27/isolinux/vmlinuz /tftpboot/os/fedora/W27
    cp /images/os/fedora/W27/isolinux/initrd.img /tftpboot/os/fedora/W27

    Setup a new FOG iPXE boot menu entry:

    In the fog WebGUI go to FOG Configuration->iPXE New Menu Entry
    Set the following fields

    Menu Item: os.FedoraW27
    Description: Fedora Workstation v27
    Parameters:
    kernel tftp://${fog-ip}/os/fedora/W27/vmlinuz
    initrd tftp://${fog-ip}/os/fedora/W27/initrd.img
    imgargs vmlinuz initrd=initrd.img root=live:nfs://${fog-ip}/images/os/fedora/W27/LiveOS/squashfs.img ip=dhcp repo=nfs://${fog-ip}/images/os/fedora/W27 splash quiet
    boot || goto MENU
    Menu Show with: All Hosts



  • OK, I need a few days… I’ll give you a feedback…


  • Moderator

    @fpausp Also this tutorial: https://forums.fogproject.org/topic/10944/using-fog-to-pxe-boot-into-your-favorite-installer-images

    If you come across other live cds that you have a solution for, please let me know and I will add it added to that thread.



  • I think, I got it… - link text



  • OK gentleman, thanks a lot for your answers. The next thing, I have to solve, is to boot from some linux live-cd’s.

    I use this option: “dhcp-boot=undionly.kpxe,192.168.xxx.xxx” on my existing dhcp-server. Which files must I edit on FOG to add some live-cd’s ?

    A Step-by-Step HowTo would be great…


  • Moderator

    @fpausp said in Can FOG replace my urbackup Server ?:

    I just would like to know if FOG can replace my urbackup Server ?

    No. One’s a utility for backing up files, and the other’s for deploying operating systems. Two very different things.


  • Developer

    @fpausp said in Can FOG replace my urbackup Server ?:

    urbackup

    This seems to be a file based backup/restore solution (just reading the specs, have never used this myself). FOG doesn’t do file based operations but rather backups and restores full disks and partitions. So FOG is a very different thing than UrBackup from my point of view.


Log in to reply
 

385
Online

39.4k
Users

11.1k
Topics

105.3k
Posts

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