Add ISO to fog server
-
Hi,
im pretty new with this great project, so i’ll be happy to get help on this -
im trying to add multiple ISO images including OS’s like windows and Ubuntu to Fog 1.2.0 boot menu (inside the advance menu).
i found many guides that shows how to add specifics tools (like SystemRescueCD and Dell Diagnostic), but is there any guides that can show me how to add different tools, including customs tool in ISO Format?thank you!
-
First off, this is only my first week working on this new format so I’m not an expert, but I am having fun cracking it.
- On your Fog Server Web interface go to: Fog Configuration
- Select: FOG PXE Boot Menu Configuration
- Expand: Advanced Configuration Option
You will get an empty text entry box.
- Add the following text:
menu
item --gap – ------------- Advanced Menu --------------
item RETURN Return to the Top Menu
choose --default RETURN --timeout 30000 target && goto ${target}:RETURN
boot [URL]http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac[/URL]} ||
prompt
goto MENUautoboot
[/CODE]- Let’s tear this text apart using the reference at [url]http://ipxe.org/cmd[/url]:
- The script label. A reference pointer you can “GOTO”. In this case it is called “MENU”
Bmenu[/B]
- COMMAND: Create a menu with the specified name and title. If no name is specified, the default (unnamed) menu will be created.
Bitem --gap – ------------- Advanced Menu --------------[/B]
- COMMAND: Add a menu ITEM with the specified label and display text.
- OPTION: Add a menu separator. If the --gap option is specified, the menu item will function as a menu separator (which cannot be selected by the user).
- OPTION: The double dashes prevent iPXE from interpreting the dashes used in the readable display text of “------------- Advanced Menu --------------” as an option.
B------------- Advanced Menu --------------[/B] - DISPLAYTEXT: The readable display text I assigned to this menu item
Bitem RETURN Return to the Top Menu[/B]
- COMMAND: Add a menu ITEM with the specified label and display text.
- OPTION: the script label (RETURN) that will be run if you select it.
- DISPLAYTEXT: The readable display text I assigned to this menu item
Bchoose --default RETURN --timeout 30000 target && goto ${target}[/B]
- COMMAND (and many options): In 30000 milliseconds (30 seconds) the iPXE Menu will by default CHOOSE to go to the script label RETURN.
Bboot [URL=‘http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac’][U][COLOR=#0066cc]http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac[/COLOR][/U][/URL]} ||[/B]
Bprompt[/B]
Bgoto MENU[/B]- The script label. A reference pointer you can “GOTO”. In this case it is called “RETURN”
- COMMAND (and many options): Download and BOOT an executable image
- COMMAND: PROMPT the user to press a key, displaying the specified text and waiting for the specified timeout (in milliseconds). If no timeout is explicitly specified, or if a zero timeout is specified, then iPXE will wait indefinitely.
- COMMAND: Jump to a script label. In this case “MENU”
Bautoboot[/B]
- COMMAND: Boot from a network interface. iPXE will open the first specified network interface and attempt to boot from it
- PXE boot a sample client and you will now see a new option at the bottom of the list “Advanced Menu”
- Select that option and you will now be directed to the very simple menu you just entered at #4.
- Now let’s add an ISO to boot from.
- Repeat Steps 1-3
- Add booting to a simple .ISO by making your entire text now look like:
menu
item --gap – ------------- Advanced Menu --------------
item WINPE50 Boot to a Windows PE 5.0 x86 (Win8.1)
item RETURN Return to the Top Menu
choose --default RETURN --timeout 30000 target && goto ${target}:WINPE50
imgfetch [URL]http://${fog-ip}/iso/winpe50_x86.iso[/URL]
boot memdisk iso raw ||
goto MENU:RETURN
boot [URL]http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac[/URL]} ||
prompt
goto MENUautoboot
[/CODE]- Let’s tear the added text apart using the reference at [url]http://ipxe.org/cmd[/url]:
Bitem PE50 Boot to a Windows PE 5.0 x86 (Win8.1)[/B]
- COMMAND: Add a menu (ITEM) with the SCRIPT LABEL (PE50) and display text (Boot to a Windows PE 5.0 x86 (Win8.1))
Bimgfetch [url]http://${fog-ip}/iso/winpe50_x86.iso[/url][/B]
Bboot memdisk iso raw ||[/B]
Bgoto MENU[/B]- The script label (WINPE50)
- COMMAND: Download (IMGFETCH) an image from the specified URL ([url]http://${fog-ip}/iso/winpe50_x86.iso[/url])
- COMMAND: BOOT the currently selected image.
- if the first two COMMANDS fail somehow, GOTO the script label MENU all over again.
- Let’s expand that to include 3 more .ISOs and an iPXE shell!
menu
item --gap – ------------- iPXE Boot Menu -------------
item WINPE31 Boot PE 3.1 x86 (Win7)
item WINPE40 Boot PE 4.0 x86 (Win8.0)
item WINPE50 Boot PE 5.0 x86 (Win8.1)
item GANDALF32 Boot Gandalf’s PE 5.1 x86 (Win8.1u)
item SHELL iPXE Shell
item RETURN Return to the Top Menu
choose --default WINPE50 --timeout 30000 target && goto ${target}:WINPE31
imgfetch [URL]http://${fog-ip}/iso/winpe31_x86.iso[/URL]
boot memdisk iso raw ||
goto MENU:WINPE40
imgfetch [URL]http://${fog-ip}/iso/winpe40_x86.iso[/URL]
boot memdisk iso raw ||
goto MENU:WINPE50
imgfetch [URL]http://${fog-ip}/iso/winpe50_x86.iso[/URL]
boot memdisk iso raw ||
goto MENU:GANDALF32
imgfetch [URL]http://${fog-ip}/iso/Gandalf_Win8.1uPE_x86v3.iso[/URL]
boot memdisk iso raw ||
goto MENU:SHELL
shell ||
goto MENU:RETURN
boot [URL]http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac[/URL]} ||
prompt
goto MENUautoboot
[/CODE]You will notice that where most people use chain, I use boot. Where others use initrd, I use imgfetch. If you go to [url]http://ipxe.org/cmd[/url] you’ll see that some commands have aliases that behave the exact same way. I prefer the command aliases I use simply because they appeal to my way of thinking and reading the language.
The commands IMGFETCH and BOOT seem to contraindicate or duplicate legacy methodology and confuses me a bit. I’m going to try some variants to clear this up for myself some more.
BTW, I store my .ISOs and any other iPXE menu-driven materials in /var/www/html/iso (Ubuntu). I think the Debian equivalent would be /var/www/iso .
-
When I try this, I get the advanced menu and the everything but when I press enter with your first example to launch an iso of mine it just goes straight to HDD. The same when I try to return or escape out of the menu.
I see the /var/www/html/iso folder isn’t on ubuntu by default so I assume you created it, the imgfetch url you have doesn’t include the html part though. Does it know this by default?
Can you maybe post a list of the content in your iso folder? I’ve read something about memdisk earlier on, I think I’m missing it and maybe that’s why I get this kind of behaviour. I’m new to this so If somebody could point of the obvious steps that are needed to get this working it would be nice.
-
Hey sudburr,
I just tried this with ElementaryOS iso, placed in [url]http://FOGIP/fog/public/iso/elementaryos.iso[/url] (I also have a copy of memdisk there) and all I get is
[QUOTE]FATAL: INT18: BOOT FAILURE[/QUOTE]
when I try to boot a VM or a laptop with that option.I have tried all permutations and I don’t seem to be able to sort it out.
I have been trying to load a liveCD from FOG for a week now, everything is pointing to older version which I don’t want to use now as my server is already setup.
Why are there no clear instructions on how to do this in the Wiki? They’re all for older versions.
-
Here ya go:
[CODE]:/var/www/html/iso# ls -la
total 2996404
drwxrwxrwx 4 root root 4096 Sep 23 17:01 .
drwxr-xr-x 3 root root 4096 Sep 2 15:34 …
-rwxr-xr-x 1 root root 520009728 Sep 5 13:10 boot-repair-disk-32bit.iso
drwxr-xr-x 2 root root 4096 Sep 5 12:43 clonezilla
-rwxr-xr-x 1 root root 15507456 Sep 23 11:26 dban-2.2.8_i586.iso
-rwxr-xr-x 1 root root 232783872 Sep 23 12:17 debian-7.6.0-amd64-netinst.iso
-rwxr-xr-x 1 root root 642940928 Sep 5 13:10 Gandalfs_Win8PE_x86_updated.iso
drwxr-xr-x 2 root root 4096 Sep 5 12:02 gparted
-rwxr-xr-x 1 root root 623890432 Sep 5 13:11 Hirens.BootCD.15.2.iso
-rwxr-xr-x 1 root root 207398912 Sep 5 13:11 winpe31_x86.iso
-rwxr-xr-x 1 root root 464146432 Sep 5 13:11 winpe40_x86.iso
-rwxr-xr-x 1 root root 361603072 Sep 5 13:11 winpe50_x86.iso
[/CODE]
[CODE]:/var/www/html/iso/clonezilla# ls -la
total 131560
drwxr-xr-x 2 root root 4096 Sep 5 12:43 .
drwxrwxrwx 4 root root 4096 Sep 23 17:01 …
-rwxr-xr-x 1 root root 9517 Jun 30 03:29 filesystem.packages
-rwxr-xr-x 1 root root 12 Jun 30 03:29 filesystem.packages-remove
-rwxr-xr-x 1 root root 115499008 Jun 30 03:29 filesystem.squashfs
-rwxr-xr-x 1 root root 1474560 Apr 8 2013 freedos.img
-rwxr-xr-x 1 root root 14517356 Jun 30 03:29 initrd.img
-rwxr-xr-x 1 root root 364384 Oct 8 2013 ipxe.lkn
-rwxr-xr-x 1 root root 176764 Oct 24 2011 memtest
-rwxr-xr-x 1 root root 2650160 Aug 29 00:37 vmlinuz
[/CODE]
[CODE]:/var/www/html/iso/gparted# ls -la
total 185856
drwxr-xr-x 2 root root 4096 Sep 5 12:02 .
drwxrwxrwx 4 root root 4096 Sep 23 17:01 …
-rwxr-xr-x 1 root root 12596 Sep 5 12:02 filesystem.packages
-rwxr-xr-x 1 root root 20 Sep 5 12:02 filesystem.packages-remove
-rwxr-xr-x 1 root root 171208704 Sep 5 12:02 filesystem.squashfs
-rwxr-xr-x 1 root root 16240872 Sep 5 12:02 initrd.img
-rwxr-xr-x 1 root root 176764 Sep 5 12:02 memtest
-rwxr-xr-x 1 root root 2650160 Sep 5 12:02 vmlinuz
[/CODE]This is for my Ubuntu server. I’m assuming for Debian that the path will be /var/www/iso
CMIIW, when fetching via the http: interface, the files must be under the server’s www path.
A memdisk boot environment is already a part of FOG.
I am unfamiliar with ElementaryOS.
-
ElementaryOS is Ubuntu based, so it should work just the same. However I am attempting to load a full ISO, not just the netinstall. Do you think that makes a difference? Also, can you please confirm you’re using 1.2.0? As I have replicated your exact setup, and it doesn’t work.
My WWW files are under /var/www/, and that’s where FOG sits and I can certainly access and download the ISO with a browser and wget also, so there’s access to it. On my end, it simply does not load.
-
[quote=“TuxMeister, post: 37752, member: 26507”]ElementaryOS is Ubuntu based, so it should work just the same. However I am attempting to load a full ISO, not just the netinstall. Do you think that makes a difference? Also, can you please confirm you’re using 1.2.0? As I have replicated your exact setup, and it doesn’t work.
My WWW files are under /var/www/, and that’s where FOG sits and I can certainly access and download the ISO with a browser and wget also, so there’s access to it. On my end, it simply does not load.[/quote]
What OS is installed on your FOG Server? Specifically the Rev number? (e.g. Ubuntu 14.04, Ubuntu 10.04, etc…?)
-
Tom, I installed FOG over ElementaryOS Luna which is based on Ubuntu 12.04 LTS. Would this interfere with it? I’m also having another issue, maybe I should open a new thread. Now when I image a VM to the server, the files get uploaded correctly, but in the images list, the new image has a size on client of 0 and a size on Server of just 56.56MB.
-
I know this is an old thread but it doesn’t look like it was answered. I found that I am having the same problem as TuxMeister getting a boot failure. Are there supposed to be other TFTP boot files inside the ISO folder and where do I find these files?