• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

Can FOG replace my urbackup Server ?

Scheduled Pinned Locked Moved Solved
General
4
18
3.9k
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F
    fpausp
    last edited by fpausp Nov 23, 2017, 1:27 PM Nov 23, 2017, 2:37 PM

    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

    G 1 Reply Last reply Nov 23, 2017, 2:58 PM Reply Quote 1
    • G
      george1421 Moderator @fpausp
      last edited by george1421 Nov 23, 2017, 9:00 AM Nov 23, 2017, 2:58 PM

      @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.

      Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

      1 Reply Last reply Reply Quote 0
      • F
        fpausp
        last edited by fpausp Nov 23, 2017, 9:15 AM Nov 23, 2017, 3:10 PM

        @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…

        1 Reply Last reply Reply Quote 0
        • F
          fpausp
          last edited by fpausp Nov 23, 2017, 1:28 PM Nov 23, 2017, 3:12 PM

          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

          1 Reply Last reply Reply Quote 0
          • F
            fpausp
            last edited by fpausp Mar 30, 2018, 5:37 AM Mar 30, 2018, 11:12 AM

            Hi, I use 1.5.0 now and made an iPXE Menu entry…
            After I boot, the entry is not visible, but I can boot, its just ugly to see nothing :).

            How can I fix that ?

            G 1 Reply Last reply Mar 30, 2018, 11:41 AM Reply Quote 0
            • G
              george1421 Moderator @fpausp
              last edited by Mar 30, 2018, 11:41 AM

              @fpausp Please post a screen shot of the fog configuration page used to create the iPXE menu. Also please post the output of this command. Insert the fog server IP in the proper spot and insert it into a browser of your choice.
              http://<fog_server_ip>/fog/service/ipxe/boot.php?mac=00:00:00:00:00:00

              This url will display the content of the iPXE menu.

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              1 Reply Last reply Reply Quote 0
              • F
                fpausp
                last edited by Mar 30, 2018, 3:49 PM

                0_1522424844394_0732eb7a-6c16-456b-89b8-c355e42bc8fc-grafik.png

                #!ipxe
                set fog-ip <my-fog-ip>
                set fog-webroot fog
                set boot-url http://${fog-ip}/${fog-webroot}
                cpuid --ext 29 && set arch x86_64 || set arch i386
                goto get_console
                :console_set
                colour --rgb 0x00567a 1 ||
                colour --rgb 0x00567a 2 ||
                colour --rgb 0x00567a 4 ||
                cpair --foreground 7 --background 2 2 ||
                goto MENU
                :alt_console
                cpair --background 0 1 ||
                cpair --background 1 2 ||
                goto MENU
                :get_console
                console --picture http://<my-fog-ip>/fog/service/ipxe/bg.png --left 100 --right 80 && goto console_set || goto alt_console
                :MENU
                menu
                colour --rgb 0xff0000 0 ||
                cpair --foreground 1 1 ||
                cpair --foreground 0 3 ||
                cpair --foreground 4 4 ||
                item --gap Host is NOT registered!
                item --gap -- -------------------------------------
                item fog.local Boot from hard disk
                item fog.memtest Run Memtest86+
                item fog.reginput Perform Full Host Registration and Inventory
                item fog.reg Quick Registration and Inventory
                item fog.deployimage Deploy Image
                item fog.multijoin Join Multicast Session
                item fog.sysinfo Client System Information (Compatibility)
                item os.UrBackup.RestoreCD
                choose --default fog.local --timeout 3000 target && goto ${target}
                :fog.local
                sanboot --no-describe --drive 0x80 || goto MENU
                :fog.memtest
                kernel memdisk initrd=memtest.bin iso raw
                initrd memtest.bin
                boot || goto MENU
                :fog.reginput
                kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=127000 web=http://<my-fog-ip>/fog/ consoleblank=0 rootfstype=ext4 storage=<my-fog-ip>:/images/ storageip=<my-fog-ip> loglevel=4 mode=manreg
                imgfetch init_32.xz
                boot || goto MENU
                :fog.reg
                kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=127000 web=http://<my-fog-ip>/fog/ consoleblank=0 rootfstype=ext4 storage=<my-fog-ip>:/images/ storageip=<my-fog-ip> loglevel=4 mode=autoreg
                imgfetch init_32.xz
                boot || goto MENU
                :fog.deployimage
                login
                params
                param mac0 ${net0/mac}
                param arch ${arch}
                param username ${username}
                param password ${password}
                param qihost 1
                isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
                isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
                param sysuuid ${uuid}
                :fog.multijoin
                login
                params
                param mac0 ${net0/mac}
                param arch ${arch}
                param username ${username}
                param password ${password}
                param sessionJoin 1
                isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
                isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
                param sysuuid ${uuid}
                :fog.sysinfo
                kernel bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=127000 web=http://<my-fog-ip>/fog/ consoleblank=0 rootfstype=ext4 storage=<my-fog-ip>:/images/ storageip=<my-fog-ip> loglevel=4 mode=sysinfo
                imgfetch init_32.xz
                boot || goto MENU
                :os.UrBackup.RestoreCD
                kernel tftp://${fog-ip}/os/urbackup/vmlinuz
                initrd tftp://${fog-ip}/os/urbackup/initrd.img
                imgargs vmlinuz initrd=initrd.img append boot=live config username=urbackup fetch=tftp://${fog-ip}/os/urbackup/filesystem.squashfs
                boot || goto MENU
                param sysuuid ${uuid}
                :bootme
                chain -ar http://<my-fog-ip>/fog/service/ipxe/boot.php##params ||
                goto MENU
                autoboot
                
                G 1 Reply Last reply Mar 30, 2018, 3:53 PM Reply Quote 0
                • G
                  george1421 Moderator @fpausp
                  last edited by george1421 Mar 30, 2018, 10:01 AM Mar 30, 2018, 3:53 PM

                  @fpausp The description field is required if you want the menu item to show up in the menu.

                  As long as

                  kernel tftp://${fog-ip}/os/urbackup/vmlinuz
                  initrd tftp://${fog-ip}/os/urbackup/initrd.img
                  

                  Files are located in /tftpboot/os/urbackup/ it should work once you add in the Menu title (description)

                  @Developers @UIDevelopers That field name (Description) probably needs to be change to “Menu Title” or something to show that its a mandatory field.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

                  1 Reply Last reply Reply Quote 0
                  • F
                    fpausp
                    last edited by Mar 30, 2018, 3:59 PM

                    Thank you very much, Gentlemen !

                    0_1522425586302_a0107849-1562-4f76-ba34-e4bc75b9933d-grafik.png

                    1 Reply Last reply Reply Quote 0
                    • F
                      fpausp
                      last edited by fpausp Apr 2, 2018, 7:04 AM Apr 2, 2018, 12:58 PM

                      I think it is a BUG, I have to do it twice befor it is permanent saved.

                      Another Question:
                      Howto sort iPXE Menu Item Settings ?

                      0_1522673895600_32b8ec19-c0b9-44e8-822d-dd4214236248-grafik.png

                      1 Reply Last reply Reply Quote 0
                      • 1 / 1
                      • First post
                        Last post

                      161

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project