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 ?
-
@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.
-
@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.
-
@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.
-
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…
-
I think, I got it… - link text
-
@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.
-
OK, I need a few days… I’ll give you a feedback…
-
I was able to do it with Fedora 27 LiveCD. I can boot the CD, but I cannot login.
Do you know the credentials ?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/W27Mount 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/loopCopy 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/W27Setup a new FOG iPXE boot menu entry:
In the fog WebGUI go to FOG Configuration->iPXE New Menu Entry
Set the following fieldsMenu 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 -
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 fieldsMenu 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 -
@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/osYou 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.
-
@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… -
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.gzextract 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/installadjust and umount:
cd /tmp
rm -rf ./netboot
umount /mnt/loopSetup a new FOG iPXE boot menu entry:
In the fog WebGUI go to FOG Configuration->iPXE New Menu Entry
Set the following fieldsMenu 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 -
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 ?
-
@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.
-
#!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
-
@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.
-
Thank you very much, Gentlemen !
-
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 ?