Ubuntu Image for FOG Clients
-
Server
- FOG Version: 1.3.5
- OS: Ubuntu 16.04
Client
- Service Version: 0.11.11
- OS: Ubuntu 16.04
Description
I created a source image on one of my client machines and installed FOG client as well. I was able to successfully capture this image and clone to multiple machines with ease. However, after cloning the BIOS seems to boot straight into the OS and does not boot over the network.
After seeing this, I manually changed the BIOS settings on the new cloned machine to boot first from the network. This made the cloned machine boot from the FOG server first and then after choosing the
Boot from disk
option, all I see is a blank cursor and nothing loads. I played around with theBIOS Exit Type
in FOG and instead of a blank cursor I got a message along the lines ofwaiting for PXE.... Starting cmain()
and nothing happens after that.Here are my questions:
- How should I prepare my source image? Do I need to disable some bootloader option when I Install the OS on my source machine? I would my client machines to boot from the FOG server first before the cloned OS so that I can wipe the drive, re-image etc.
- How do I prevent the BIOS boot order from changing after installing Ubuntu?
My goal is to be able to clone multiple machines with the source image (which I’ve already done) and then be able wipe these cloned machines and overwrite them with new images when needed. if the machines boot straight to the hard drive then I will not be able to do this.
I did manage to install FOG client on the machine, but I have not been able to issue commands to FOG client and couldn’t find any instructions on doing so. Any help regarding this would be appreciated as well.
-
@fogubuntu said in Ubuntu Image for FOG Clients:
How do I prevent the BIOS boot order from changing after installing Ubuntu?
System boot order is set in firmware on each host. This isn’t something that fog does, it’s something you do.
How should I prepare my source image? Do I need to disable some bootloader option when I Install the OS on my source machine? I would my client machines to boot from the FOG server first before the cloned OS so that I can wipe the drive, re-image etc.
You don’t need to disable anything, don’t need to do anything particularly special to image Ubuntu - the main thing is to not use LVM. fog does not currently support resizable LVM in Linux, but does support resizing basic Ext4 partitions for Linux images. You can use non-resizable LVM images for Linux, but you’ll surely find yourself in a bind soon because of it.
The FOG Client doesn’t accept commands via CLI, it accepts commands from the FOG Server in the form of snapins, printers, reboots, shutdowns, and things that are integrated in the FOG Server. All documentation for the fog client specifically is here: https://wiki.fogproject.org/wiki/index.php?title=FOG_Client and for sending bash scripts and such, search the forums for Snapins, there are probably a thousand threads about it. Plus these may interest you:
https://wiki.fogproject.org/wiki/index.php?title=Snapin_Examples
https://wiki.fogproject.org/wiki/index.php?title=SnapinPacks -
Thank you for the response. Manually changing the boot order on each machine should not be an issue. However, once I do this and have the clients boot the FOG PXE menu and select
Boot from disk
, I get a blank screen with a cursor and the OS does not load.Will re-installing Ubuntu on the source machine without LVM fix this? I am unable to determine what is causing this.
-
@fogubuntu For fixing the blinking cursor, I know you’ve already said you’ve messed around with the Exit Type - have you tried all the exit type options? And where are you changing the exit type?
-
@Wayne-Workman Yes, I tried all the exit types. I changed this in the following location:
FOG Configuration > iPXE Boot Menu > Exit to Hard Drive type
-
@fogubuntu That’s just the default for newly registered hosts. Change the setting for the host you’re working with in Host Management. Pictured below.
-
@Wayne-Workman I did change it there too. Changing in the default for newly registered hosts worked the same way. Some options resulted in a blank screen with a blinking cursor and some had a message saying
Starting cmail()...
and nothing happened. -
@fogubuntu This is interesting. Can you run some commands on your reference machine you’re working with (on it’s OS) and get us the output so we can see how the disk is laid out please? Please copy/paste the output into a code box.
lsblk pvdisplay vgdisplay lvdisplay df -h fdisk -l
-
@Wayne-Workman Following is the output for
df -h
:Filesystem Size Used Avail Use% Mounted on udev 7.8G 0 7.8G 0% /dev tmpfs 1.6G 9.7M 1.6G 1% /run /dev/sda2 213G 12G 191G 6% / tmpfs 7.8G 260K 7.8G 1% /dev/shm tmpfs 5.0M 4.0K 5.0M 1% /run/lock tmpfs 7.8G 0 7.8G 0% /sys/fs/cgroup /dev/sda1 511M 3.6M 508M 1% /boot/efi tmpfs 1.6G 4.0K 1.6G 1% /run/user/108 tmpfs 1.6G 56K 1.6G 1% /run/user/1000
And the output of
fdisk -l
Disk /dev/ram0: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram1: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram2: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram3: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram4: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram5: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram6: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram7: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram8: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram9: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram10: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram11: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram12: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram13: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram14: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/ram15: 64 MiB, 67108864 bytes, 131072 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk /dev/sda: 232.9 GiB, 250059350016 bytes, 488397168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: 4430D5FA-2CED-4B96-A4E8-E41E0DAFEE53 Device Start End Sectors Size Type /dev/sda1 2048 1050623 1048576 512M EFI System /dev/sda2 1050624 455012351 453961728 216.5G Linux filesystem /dev/sda3 455012352 488396799 33384448 15.9G Linux swap Disk /dev/sdb: 7.5 GiB, 8015314944 bytes, 15654912 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x15e2543d Device Boot Start End Sectors Size Id Type /dev/sdb1 * 0 3035519 3035520 1.5G 0 Empty /dev/sdb2 14432 19295 4864 2.4M ef EFI (FAT-12/16/32)
-
@fogubuntu Looks like a GPT type disk, you should be using the UEFI exit types. Please try all of those on the host you’re working with.
-
@Wayne-Workman I did try all the exit types but I will give this another shot. What is the difference between
Host BIOS Exit Type
andHost EFI Exit Type
?I did also change the boot type on the client machine’s BIOS to UEFI.
-
@fogubuntu said in Ubuntu Image for FOG Clients:
What is the difference between Host BIOS Exit Type and Host EFI Exit Type?
The BIOS exit type only applies to BIOS type systems. So this is the setting used if it’s operating as BIOS. If the system is UEFI, then only the EFI exit type setting is used for that system.
I did also change the boot type on the client machine’s BIOS to UEFI.
When and on what? The reference machine? The destination machine? Before capture? After capture? Before deployment? After deployment?
I’m thinking this whole thing may be a mix-up of system settings. Here’s some rules:
If your reference machine is operating in BIOS mode when you capture the image - then all machines you deploy this image to must be in BIOS mode for it to work right.
If your reference machine is operating in UEFI mode when you capture the image - then all machine syou deploy this image to must be in UEFI mode for it to work right - and secure boot must be disabled.
-
@Wayne-Workman said in Ubuntu Image for FOG Clients:
When and on what? The reference machine? The destination machine? Before capture? After capture? Before deployment? After deployment?
I changed the setting on the destination machine after deployment.
Using the same settings as the reference machine did not work either.
-
@Wayne-Workman I used the same settings as the source machine on the clients and I still get the blank screen or
Starting cmain()
message and the OS won’t load.Is there any other settings I should look into to fix this?
-
@fogubuntu you didn’t run all the commands that I previously requested - I need the output of those to determine if your using lvm or not. Fog does not support Resizable lvm - the image will not be usable.
-
You’ve tried “EFI Exit” with rEFInd? This really doesn’t seem to be a problem with LVM or disk information, directly.
It really really feels like it’s trying to boot across incompatible types.
Please try network booting using EFI by enabling the Network Stack and PXE Network Stack. Then try setting the “EFI Exit” to rEFInd.
This will mean you need to use one of the EFI labeled boot files, but this can typically be automated.