Boot from USB instead of iPXE



  • Hi,

    We just recently updated to 1.0.1 and found out that FOG now uses iPXE instead of just PXE.
    I have looked into iPXE and mostly it works good, although sometimes a bit slower than the old PXE.
    The problem we’re facing is that we bought around 100 Lenovo Thinkpad Yogas for our school teachers and because ultrabooks no longer have an RJ-45 adapter we had to buy usb to ethernet adapters for each one. Only problem there is that iPXE isn’t compatible with any usb to ethernet adpater so it doesn’t find any network devices.

    We also bought a couple of Lenovo Yoga 2, which have a PXE Boot Option altough this doesn’t really work. (I don’t want to ask for help in this forum as it’s not really related ;))

    Now to kill 2 birds with one stone: would it be possible to create a small Linux distro which boots up from a USB drive, loads the network, connects to fog and then starts an imaging process?

    I had tried to use the Clonezilla Live USB option with kernel parameters to connect to the NFS Share of Fog and it kinda works. As it only mounts read-only it’s able to download an image specified in the parameters. So no automation there, the parameter has to be changed for every image in the boot file of the iso.

    EDIT
    FOG Version: 1.0.1
    OS Version: Debian 7

    and yes I have searched the forums, but using a usb key for those problems would be a different approach



  • we have other systems that have a functioning ipxe environement. I’ll try to image the systems seperatly.

    will report back


  • Senior Developer

    Do you have systems that will work with PXE/iPXE?

    If your lenovo’s have the image ready to go, you can kind of cheat the system.

    Basically, pull the drive out of the lenovo (as is) and place it in a working system. On that “working system” create the upload task based on the image name you want to use and enable the “shutdown” parameter of the image.

    Upload the image and wait for the system to shutdown.

    Take that hard-drive and put it back in your lenovo’s. Test deploying (via the usb/capone) methods and hopefully all will work for you.



  • [quote=“Tom Elliott, post: 30129, member: 7271”]Capone requires one registered host to upload the initial image. This is really the only way you can do it, easily. Otherwise you could try to do this manually if you really can’t “spend the time” to register the host, though I’m not going to build a walk through on exactly what you would need to do.[/quote]

    I was able to register the Hosts, using an USB menu but not upload an Image at any stage.
    Since I can’t use the iPXE for the reasons explained above several times, I have to use an usb key.
    When I try to upload an Image it says that the request Type is Null, even when I start an upload Task using the Web UI and then start to manually invoke the upload.


  • Senior Developer

    Capone requires one registered host to upload the initial image. This is really the only way you can do it, easily. Otherwise you could try to do this manually if you really can’t “spend the time” to register the host, though I’m not going to build a walk through on exactly what you would need to do.



  • [quote=“RipAU, post: 30119, member: 24459”]I found that fog boots fine from USB using syslinux. I guess the problems that will come up is how dynamic fog is now with iPXE generating the upload and download via kernel arguments in iPXE.
    Having kernel support for the USB-Ethernet adapter might be a problem as well.

    As was mentioned earlier capone plugin might work.

    I used syslinux 4.02 to create the bootable USB key and in the syslinux.cfg have:
    [CODE]default vesamenu.c32
    prompt 0
    timeout 100

    MENU TITLE Fog USB Stick
    MENU COLOR TITLE 1;36;44 #ffffffff #00000000 std
    MENU BACKGROUND images/background.png

    label Fogcheck
    menu label Fog Compatibility
    kernel /fog/bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web=10.0.0.253/fog/ consoleblank=0 pcie_aspm=off loglevel=4 mode=sysinfo
    initrd /fog/init.xz

    label Fogdebug
    menu label Fog Debug
    kernel /fog/bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web=10.0.0.253/fog/ consoleblank=0 pcie_aspm=off loglevel=4 mode=debug
    initrd /fog/init.xz

    label Fogcapone
    menu label Fog Capone
    kernel /fog/bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web=10.0.0.253/fog/ consoleblank=0 pcie_aspm=off loglevel=4 mode=capone shutdown=0 storage=10.0.0.253:/images
    initrd /fog/init.xz
    [/CODE]

    I don’t know how practical this will be though.[/quote]

    I managed to build a usb file which starts capone in download mode and this is exactly what I meant!
    Neither do I have to use PXE nor iPXE and it works using the usb to ethernet adapter…
    I’m trying to figure out how to set capone into upload mode though. I looked into the init.xz -> capone script and tried to change the type from down to up. But this results in an error message, saying that the Request Type is Null. The Parameters are given to the fog script itself which then in turn sets the respective fog.upload or fog.download in motion.
    It seems as it doesn’t even get that far.

    Any hints?



  • I found that fog boots fine from USB using syslinux. I guess the problems that will come up is how dynamic fog is now with iPXE generating the upload and download via kernel arguments in iPXE.
    Having kernel support for the USB-Ethernet adapter might be a problem as well.

    As was mentioned earlier capone plugin might work.

    I used syslinux 4.02 to create the bootable USB key and in the syslinux.cfg have:
    [CODE]default vesamenu.c32
    prompt 0
    timeout 100

    MENU TITLE Fog USB Stick
    MENU COLOR TITLE 1;36;44 #ffffffff #00000000 std
    MENU BACKGROUND images/background.png

    label Fogcheck
    menu label Fog Compatibility
    kernel /fog/bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web=10.0.0.253/fog/ consoleblank=0 pcie_aspm=off loglevel=4 mode=sysinfo
    initrd /fog/init.xz

    label Fogdebug
    menu label Fog Debug
    kernel /fog/bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web=10.0.0.253/fog/ consoleblank=0 pcie_aspm=off loglevel=4 mode=debug
    initrd /fog/init.xz

    label Fogcapone
    menu label Fog Capone
    kernel /fog/bzImage root=/dev/ram0 rw ramdisk_size=127000 ip=dhcp dns= keymap= web=10.0.0.253/fog/ consoleblank=0 pcie_aspm=off loglevel=4 mode=capone shutdown=0 storage=10.0.0.253:/images
    initrd /fog/init.xz
    [/CODE]

    I don’t know how practical this will be though.



  • The only thing I can think of us possibly finding a USB Ethernet adapter that supports PXE (not very common)
    Dell apparently sell these but who knows if they will work very well.
    The other question is if iPXE has drivers built in for it, they could possibly be chain booted.

    [url]http://accessories.ap.dell.com/sna/productdetail.aspx?c=sg&l=en&s=bsd&cs=sgbsd1&sku=470-13498[/url]

    Another option is installing the Windows 7 image directly on a USB key.
    [url]http://blogs.ethz.ch/jlaville/2012/04/12/how-to-deploy-windows-7-on-non-pxe-ultrabooks-with-mdt-litetouch/[/url]

    It could be possible to create fog as a live USB key you can directly boot without PXE and have all of the Menu options available.
    That way if the default Linux Kernel has the drivers built in it should work? Again I have no idea how easy the last option is ;) :EDIT: don’t forget fog likes to use the MAC address to know what device is what, if you use USB Ethernet adapters; fog won’t know the host name of the computer you are trying to re-image.



  • [quote=“jbsclm, post: 28238, member: 3158”]If you were interested in using the capone plug in, I think the following would probably work, assuming that the usb ethernet adaptor is supported by the fog kernel.
    Create a bootable cd or usb drive containing ipxe, and the fog kernel and bzimage.
    boot from this, it would then load kernel and bzimage from there, connect to the fog server, lookup the configured image for the particular dmi field, and then image the client. From what you say the I would suggest model for the capone dmi field.
    Let me know if this might work for you, and I will see if my idea works.[/quote]

    I’m still trying to figure out how the capone plugin actually works… Just found that the DMI Setting is in the FOG Configuration Menu and not in some kind of popup when clicking the capone plugin itself… :p
    If I manage to create an usb drive which would load the image from pxe, how would it check using the dmi field? are there any special adjustments i would need to make?
    EDIT also as I mentioned the ipxe doesn’t work because of the incompatibility with an usb to ethernet adapter. As far as I know there is currently no support for those kinds of devices with ipxe. There was someone who started to develop support in 2008 in gpxe but sadly he never finished his work. So i would need a small linux distro, which can load from usb, using syslinux, which would initialize the network first prior to connecting to fog.


  • Developer

    If you were interested in using the capone plug in, I think the following would probably work, assuming that the usb ethernet adaptor is supported by the fog kernel.
    Create a bootable cd or usb drive containing ipxe, and the fog kernel and bzimage.
    boot from this, it would then load kernel and bzimage from there, connect to the fog server, lookup the configured image for the particular dmi field, and then image the client. From what you say the I would suggest model for the capone dmi field.
    Let me know if this might work for you, and I will see if my idea works.



  • Same issue, the lenovo yoga’s are a nightmare. Can’t get it to iPXE boot via a USB to Ethernet device.


Log in to reply
 

399
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.