FOS boot USB quick image issue.
-
Hello all,
I built a USB booting fos image using these instructions:
https://forums.fogproject.org/topic/7727/building-usb-booting-fos-image/4
https://forums.fogproject.org/topic/9073/fog-boot-alternatives/18The goal is to get the helpdesk team to be able to deploy via the usb because of issues we have on certain models (X1 Yoga, and Lenovo P52) not being able to get the bzImage/init.xz files via the normal PXE booting method. The issue that I am having is shown in the video but basically when I try doing the quick image deploy, everything appears to work but it skips the actual part of going into PartClone.
Video of this happening:
https://drive.google.com/file/d/1wRj_z9emPN1rBrsw4P4VzYDSA50ftMKO/view?usp=sharingI previously had it working with this config:
set myfogip=10.100.71.8 set myimage=/boot/bzImage set myinits=/boot/init.xz set myloglevel=4 set timeout=-1 set fogimage=2018-07-17Win10-1803UEFI set imageid=9 insmod all_video menuentry "1. FOG Quick Image Deploy $fogimage" { echo loading the kernel linux $myimage loglevel=$myloglevel initrd=init.xz root=/dev/ram0 rw ramdisk_size=127000 keymap= web=$myfogip/fog/ storage=$myfogip:/images/ storageip=$myfogip boottype=usb consoleblank=0 rootfstype=ext4 imgPartitionType=all chkdsk=0 capone=1 type=down imgid=$imageid img=$fogimage imgType=n osid=9 echo loading the virtual hard drive initrd $myinits echo booting kernel... }
One day seemingly out of no where it stopped working and only does what is shown in the video. It seems like the scipt thinks that it worked but skips the PartClone imaging portion.
I have tried rebuilding the USB, and I also upgraded from FOG 1.4.4 to 1.5.5.
I’m curious if anyone else has seen this issue or can look over my configs to see if I’m missing something. Or maybe there is a place in the logs I can look at.Currently I have a workaround that works well, where I use the normal Image Deploy grub menu item:
menuentry "1.5 FOG Image Deploy/Capture" { echo loading the kernel linux $myimage loglevel=$myloglevel initrd=init.xz root=/dev/ram0 rw ramdisk_size=127000 keymap= web=$myfogip/fog/ boottype=usb consoleblank=0 rootfstype=ext4 echo loading the virtual hard drive initrd $myinits echo booting kernel... }
This is less ideal as someone has to log into the FOG web server and deploy the image form there first.
Thanks in advance for any help!
-
Just be aware that the kernel and the inits need to be current with your FOG server build. Or to say it a different way, you can’t user the kernel and inits from FOG 1.4.4 on a FOG 1.5.5 server.
From your video I couldn’t tell what the error was. Could you get a clear screen shot of the actual error? It looks like it was working as it should from the video.
-
@blindhelix Are you able to deploy this exact same image to a different host that can PXE boot? Please try and let us know.
As well please post a screenshot of the full image settings in the FOG web UI and output of the following commands:
ls -al /images/2018-07-17Win10-1803UEFI
-cat /images/2018-07-17Win10-1803UEFI/d1.fixed_size_partitions
-file /images/2018-07-17Win10-1803UEFI/d1p1.*
-
@Sebastian-Roth It would be also interesting to see from a normal ipxe boot, when quick image is selected and the same image is picked, does it do the same thing? Its not clear if its an issue with quick image, the target image, or FOS via USB.
-
@george1421 That is super helpful. I’ll get the new kernel and init and try again.
With the video I don’t think there was an exact error. It just said its going to use partclone to copy the image over and then never does. Hopefully that makes sense. I can get a video of what a working one does over PXE if that helps. -
@Sebastian-Roth This is the only image that we use currently, and it does work via PXE boot. It also works when we use the USB with the “FOG Image Deploy/Capture” GRUB menu item. I don’t believe its an issue with the image itself. I should have made that clear in my original post. My bad.
-
@george1421 I should have also clarified better in my original post that when we use PXE boot we use quick image, not like a register host and then push image method. So to answer your question, when we do a normal PXE boot, choose quick image, and pick that same image, it works. At least with the other models that do not require the USB bootable FOS.
-
@blindhelix OK then make sure your kernels and inits on the usb are in sync with your fog server. You can get them from your fog server in /var/www/html/fog/service/ipxe directory.
-
@george1421 I tried just copying the files from the place you specified and it still did not work. When I have a minute I’ll try rebuilding the flash drive as last time I tried that I was still on 1.4.4.
-
Just for clarity I ran through the ipxe menus using a browser and ended up with this deployment script
set fog-ip 192.168.1.53 set fog-webroot fog set boot-url http://${fog-ip}/${fog-webroot} kernel bzImage loglevel=4 initrd=init.xz root=/dev/ram0 rw ramdisk_size=255000 web=http://192.168.1.53/fog/ consoleblank=0 rootfstype=ext4 mdraid=true mac= ftp=192.168.1.53 storage=192.168.1.53:/images/ storageip=192.168.1.53 osid=9 irqpoll chkdsk=0 img=NYCClone imgType=n imgPartitionType=all imgid=35 imgFormat=5 capone=1 type=down imgfetch init.xz boot
I would then rewrite it as the following (I also think I found the problem)
linux $myimage loglevel=$myloglevel initrd=init.xz boottype=usb root=/dev/ram0 rw ramdisk_size=255000 web=http://$myfogip/fog/ consoleblank=0 rootfstype=ext4 ftp=$myfogip storage=$myfogip:/images/ storageip=$myfogip osid=9 irqpoll chkdsk=0 img=$fogimage imgType=n imgPartitionType=all imgid=$imageid imgFormat=5 capone=1 type=down
There is a new kernel parameter or at least one that is not currently in the grub menu as well as now the protocol needs to be added to the
web=
parameter. In the case of the new parameter itsimgFormat=
This is the Image Manager manager field in the image definition.5
is Partclone Zstd and it appears0
is Partclone GZip. From what I’ve been able to reverse engineer. That number comes from the ordinal number of items in the Image Manager list in the web ui. With the first drop down list entry being 0. You will need to set the imgFormat value correctly for your image. With this parameter missing I can understand why the actual image deployment is failing to launch partclone. -
@george1421 Thank you so much! I’ll try this hopefully tonight but it might end up being tomorrow. Seriously, thank you for following up.
-
@george1421 DUDE it worked after adding imgFormat=0 (for gzip). Thank you again!
For anyone having the same issue I ended up with this GRUB menu item:
set myfogip=10.100.71.8 set myimage=/boot/bzImage set myinits=/boot/init.xz set myloglevel=4 set timeout=-1 set fogimage=2018-07-17Win10-1803UEFI set imageid=9 insmod all_video menuentry "1. FOG Quick Image Deploy $fogimage" { echo loading the kernel linux $myimage loglevel=$myloglevel initrd=init.xz root=/dev/ram0 rw ramdisk_size=127000 keymap= web=$myfogip/fog/ storage=$myfogip:/images/ storageip=$myfogip boottype=usb consoleblank=0 rootfstype=ext4 imgPartitionType=all chkdsk=0 capone=1 type=down imgid=$imageid img=$fogimage imgFormat=0 imgType=n osid=9 echo loading the virtual hard drive initrd $myinits echo booting kernel... }