• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Boot from Ubuntu 16.04 live iso failed

    Scheduled Pinned Locked Moved
    FOG Problems
    5
    16
    5.0k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      amir3161
      last edited by

      Server
      • FOG Version: 1.4.4
      • OS: Ubuntu 16.04.2 X64
      Client
      • Service Version: not relevent
      • OS: not relevent
      Description

      I want to boot from a Ubuntu 16.04 live iso but I have failed so far.
      I have followed the instructions here: link text and here : link text but still I can not get Ubuntu to boot.

      When I choose Ubuntu in the advanced menu: I get ok for loading “vmlinuz” and “initrd” then I get a blank screen with cursor blinking and nothing happens afterwards.

      Here is the content of my advanced menu:

      :MENU
      menu
      item --gap -- ---------------- iPXE boot menu ----------------
      item ubuntu Ubuntu 16.04 x64
      item hiren Hiren Boot CD
      item shell ipxe shell
      item return return to previous menu
      choose --default return --timeout 5000 target && goto ${target}
      :ubuntu
      kernel http://${fog-ip}/tftpboot/ubuntu16/vmlinuz.efi
      initrd http://${fog-ip}/tftpboot/ubuntu16/initrd.lz
      imgargs root=/dev/nfs boot=casper netboot=nfs nfsroot=${fog-ip}:${fog-ip}:/images/mounts/ubuntu16 locale=en_US.UTF-8 keyboard-configuration/layoutcode=us mirror/country=USip}:/images/mounts/ubuntu16
      boot || goto failed
      goto start
      :hiren
      initrd http://${fog-ip}/fog/service/ipxe/hiren/hir.iso
      chain memdisk iso raw ||
      goto MENU
      :shell
      initrd http://${fog-ip}/${fog-webroot}/iso/ubnt.iso
      chain memdisk iso ||
      goto MENU
      :return
      chain http://${fog-ip}/${fog-webroot}/service/ipxe/boot.php?mac=${net0/mac} ||
      prompt
      goto MENU
      autoboot
      
      

      The menu item that I’m working on is “ubuntu” I have been trying other methods at the same time so there are other menu items as well.
      In the ubuntu Menu item I tried the instructions from Fitzzz (Booting Ubuntu 16.04 ISO from FOG) but as APPEND command was not recognized I had to do changes in commands a bit.

      So far I have only managed to boot Hiren and only in mini windows mode. the linux environment does not boot in Hiren.
      I’m new to this and most probably naive but I assume it should not be super hard to have couple of live images ready to boot from FOG using PXE.
      I have read the wiki and many posts in 24 hours but seems to be nothing is organized and different instructions say different things.
      Thanks for your input in advance 🙂

      1 Reply Last reply Reply Quote 0
      • george1421G
        george1421 Moderator
        last edited by

        Well I can give you a few suggestions here.

        1. For ubuntu menu, this line will not work: kernel http://${fog-ip}/tftpboot/ubuntu16/vmlinuz.efi The issue is /tftpboot is not accessible via the web server if you are using the http protocol. You need to make sure your protocol is in line with your location you place your files.
        2. http://${fog-ip}/fog/service/ipxe/hiren/hir.iso and anything else like http://${fog-ip}/${fog-webroot} if you place files in the FOG web gui path, plan on them getting clobbered the next update you install.

        What I would suggest is this.

        If you have an iso file make a new directory on the web server just for your iso files outside of the fog path. For example using the fog linux console the fog web gui path is /var/www/html/fog/… If it was me I would place my iso files in /var/www/html/iso Then you would reference those iso files on the http side with http://${fog-ip}/iso/hirens.iso and so on.

        For these lines

        kernel http://${fog-ip}/tftpboot/ubuntu16/vmlinuz.efi
        initrd http://${fog-ip}/tftpboot/ubuntu16/initrd.lz
        

        You have your protocol / file location mixed. You can either change the protocol to tftp or change your file locations
        tftp:

        kernel tftp://${fog-ip}/tftpboot/ubuntu16/vmlinuz.efi
        initrd tftp://${fog-ip}/tftpboot/ubuntu16/initrd.lz
        

        or http and move the files to /var/www/html/os/ubuntu16

        kernel http://${fog-ip}/os/ubuntu16/vmlinuz.efi
        initrd http://${fog-ip}/os/ubuntu16/initrd.lz
        

        Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

        1 Reply Last reply Reply Quote 0
        • A
          amir3161
          last edited by amir3161

          Thanks george for the quick response.
          So I have done what you mentioned:

          1. I did move the hiren iso file to /var/www/html/iso/ and changed entry in the MENU to this:
          :hiren
          initrd http://${fog-ip}/iso/hirens.iso
          chain memdisk iso raw ||
          goto MENU
          
          

          Now when I choose hiren I get this message:
          MEMDISK: bootstrap too large to load.

          It was booting before at least to windows not it does not. DO I need to change something ins the “chain memdisk iso raw ||” line?

          1. For the Ubutu entry:

          A. I changed the protocol to tftp:

          :ubuntu
          kernel tftp://${fog-ip}/tftpboot/ubuntu16/vmlinuz.efi
          initrd tftp://${fog-ip}/tftpboot/ubuntu16/initrd.lz
          imgargs root=/dev/nfs boot=casper netboot=nfs nfsroot=${fog-ip}:${fog-ip}:/images/mounts/ubuntu16  locale=en_US.UTF-8 keyboard-configuration/layoutcode=us mirror/country=US
          boot || goto failed
          goto start
          

          The result was that I get this error message:
          0_1500638173458_tftp_problem.jpg

          vmlinuz.efi is in /tftpboot/ubuntu16/
          0_1500638409692_path.JPG

          B. I tried to use the http instead so I created: /var/www/html/os/ubuntu16 and extracted the ubuntu iso here.(after reading many posts I’m still not sure that I must use the iso file or extract it into this folder!) so here is the folder content:
          0_1500639104254_ubuntu_ls.JPG
          Andhere is the MENU entry for it :

          :ubuntu
          kernel http://${fog-ip}/os/ubuntu16/vmlinuz.efi
          initrd http://${fog-ip}/os/ubuntu16/initrd.lz
          imgargs root=/dev/nfs boot=casper netboot=nfs nfsroot=${fog-ip}:${fog-ip}:/images/mounts/ubuntu16  locale=en_US.UTF-8 keyboard-configuration/layoutcode=us mirror/country=US
          boot || goto failed
          goto start
          

          I still get the blank page when I choose to boot from the ubuntu entry.

          What about the imgargs line? do I need to change the nfsroot path in this line? and what should it be in this case?

          Tom ElliottT 1 Reply Last reply Reply Quote 0
          • Tom ElliottT
            Tom Elliott @amir3161
            last edited by

            @amir3161 said in Boot from Ubuntu 16.04 live iso failed:

            :ubuntu
            kernel tftp://${fog-ip}/tftpboot/ubuntu16/vmlinuz.efi
            initrd tftp://${fog-ip}/tftpboot/ubuntu16/initrd.lz
            imgargs root=/dev/nfs boot=casper netboot=nfs nfsroot=${fog-ip}:${fog-ip}:/images/mounts/ubuntu16 locale=en_US.UTF-8 keyboard-configuration/layoutcode=us mirror/country=US
            boot || goto failed
            goto start

            Don’t forget you need to have the files web readable too. Right now they’re purely “read” but when iPXE goes to “start” them, it needs to execute too.

            You could try:

            chown -R www-data:www-data /var/www/html/os
            chmod -R +x /var/www/html/os
            

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

            Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

            Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

            A 1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator
              last edited by

              OK I did a quick search of the forums here is what I have.

              For hirens by @Avaryan https://forums.fogproject.org/topic/10335/pxe-boot-adding-hiren-15-0-to-menu/2

              item hiren Hiren's Boot CD 15.2
              item return Return to Previous Menu
              choose --default return --timeout 15000 target && goto ${target}
              :hiren
              initrd http://${fog-ip}/iso/Hiren15.2.iso
              chain memdisk iso raw ||
              

              For ubuntu/kubuntu by @kmstory https://forums.fogproject.org/topic/10403/boot-iso-from-ipxe-menu/5 Note that you will need to place the ubuntu extracted images in /images/ubuntu on the fog server to access them via nfs.

              kernel nfs://${next-server}/images/xubuntu/casper/vmlinuz.efi
              initrd nfs://${next-server}/images/xubuntu/casper/initrd.lz
              imgargs vmlinuz.efi acpi=off root=/dev/nfs boot=casper netboot=nfs nfsroot=${next-server}:/images/xubuntu locale=en_US.UTF-8 keyboard-configuration/layoutcode=us mirror/country=US
              boot
              

              Misc other iso images by @x23piracy https://forums.fogproject.org/topic/7674/problems-booting-a-winpe-based-rescuedisk-iso-over-pxe/7

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              A 1 Reply Last reply Reply Quote 0
              • A
                amir3161 @Tom Elliott
                last edited by

                @Tom-Elliott Thanks Tom. Did that but nothing changed! 😞

                1 Reply Last reply Reply Quote 0
                • Tom ElliottT
                  Tom Elliott
                  last edited by

                  How about example from iPXE themselves?

                  http://ipxe.org/appnote/ubuntu_live

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG! Get in contact with me (chat bubble in the top right corner) if you want to join in.

                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                  1 Reply Last reply Reply Quote 0
                  • A
                    amir3161 @george1421
                    last edited by

                    @george1421 Finally got it working for the Ubuntu! using the instruction you provided!

                    Regarding Hiren I still have problem. I have changed permissions as @Tom-Elliott suggested but for the /var/www/html/iso/hiren/ (hirens.iso is in this folder)
                    Now it gets stuck with this message:

                    Loading  boot sector... booting ...
                    

                    Btw for the reference and in case someone needs it later I will post what I did here in another post.

                    1 Reply Last reply Reply Quote 0
                    • S
                      Sebastian Roth Moderator
                      last edited by

                      @amir3161 said in Boot from Ubuntu 16.04 live iso failed:

                      http://${fog-ip}/iso/hirens.iso

                      Are you able to access this URL from your browser and download the ISO file (just for testing)?

                      Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                      Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                      A 1 Reply Last reply Reply Quote 0
                      • A
                        amir3161 @Sebastian Roth
                        last edited by

                        @Sebastian-Roth good point. I just tested it. I can access the iso file from the FOG server machine : 127.0.0.1/iso/hiren/hirens.iso
                        but from other machines if I do : 192.168.18.28/iso/hiren/hirens.iso I get to the FOG
                        server management page. Seems like no matter what I type after the ip address it forwards me to the FOG login page.
                        I have checked the permissions for the iso folder and changed it to “-R 777” (I’m not sure if this is a good practice!) but still the same.

                        1 Reply Last reply Reply Quote 0
                        • S
                          Sebastian Roth Moderator
                          last edited by Sebastian Roth

                          @amir3161 Yeah this is a bit tricky. Newer FOG versions are pretty much taking over apache as it does rewrite/forward requests to make the FOG API work.

                          That said there is still room for what you want to do if you put your files straight into /var/www subdirectories (but not /var/www/html sub dirs!). For example you can have /var/www/isos/hirens.iso and should be able to download via http://${fog-ip}/isos/hirens.iso from a remote PC.

                          Be aware that getting a directory listing (URL http://${fog-ip}/isos/) won’t work as the rewrite engine is kicking in again. This is because DirectoryIndex is set and apache forwards your directory request to /isos/index.html internally. As this file does not exist the rewrite rules forward to the FOG API and from there to the management interface again.

                          Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                          Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                          A 1 Reply Last reply Reply Quote 0
                          • A
                            amir3161 @Sebastian Roth
                            last edited by

                            @Sebastian-Roth One again spot on Sebastian 🙂
                            I can now boot from the iso but this is not the end of it yet! When it goes through the boot process I get this error :

                            0_1500816145758_Screen Shot 2017-07-23 at 15.19.10.jpg
                            This happens if I choose the Linux rescue environment . If I choose mini windows xp, everything works fine!
                            Any suggestion for this one ?
                            I also have a general question: How do I know how to treat a iso file to be able to boot from it on FOG? There is a wiki page for some (which I think is not updated in a while).
                            Is there any instructions to follow or it changes every now and then?

                            Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                            • Wayne WorkmanW
                              Wayne Workman @amir3161
                              last edited by

                              @amir3161 I’m going to say re-download the ISO and do the checksum afterwards too. “Can’t read superblock” is a typical message from mounting a corrupt file system.

                              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                              Daily Clean Installation Results:
                              https://fogtesting.fogproject.us/
                              FOG Reporting:
                              https://fog-external-reporting-results.fogproject.us/

                              A 1 Reply Last reply Reply Quote 0
                              • A
                                amir3161 @Wayne Workman
                                last edited by

                                @Wayne-Workman I have checked the md5 checksum of the iso file and it matches the one on the website. Do you still think I need to re download?

                                1 Reply Last reply Reply Quote 0
                                • S
                                  Sebastian Roth Moderator
                                  last edited by Sebastian Roth

                                  @amir3161 Unfortunately it’s not possible to provide a general tutorial on how to include boot ISOs as every ISO is a bit different. Some may boot as ISO using the memdisk helper and others need to be extracted and need fiddling with the parameter till it works. When you extract the Hirens ISO check out the file HBCD/menu-custom.lst. It’s a huge list of how different systems can be booted (using GRUB instead of iPXE though). See, they are all different.

                                  I can confirm the error you posted as picture and I partly figured out what’s going wrong. But I don’t know how to fix it yet. I am sure we’ll figure it out at some point but I need to do other things now so I just report my findings so far. The picture below explains pretty much everything:
                                  0_1501071915385_failed_mtdblock.png
                                  After some fiddling with this I thought I might just compare the md5 hashes of the squashfs images (one within the booted ISO and the other one I extracted from the ISO on my host system). They should match as they are the same files. Turns out md5sum can’t even read to the end of the file and fails in the booted live system. dmesg reveals that the memdisk/mtdblock device (ISO in RAM) seems to be too small.

                                  Note to myself: Try PXE booting with pxelinux or grub to see if those show the same issue…

                                  Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                  Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                  1 Reply Last reply Reply Quote 0
                                  • S
                                    Sebastian Roth Moderator
                                    last edited by

                                    @amir3161 Are you still interested in this? I’ve lost track of this issue. Or maybe you figured it out yourself?

                                    Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                                    Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                                    1 Reply Last reply Reply Quote 0
                                    • 1 / 1
                                    • First post
                                      Last post

                                    156

                                    Online

                                    12.0k

                                    Users

                                    17.3k

                                    Topics

                                    155.2k

                                    Posts
                                    Copyright © 2012-2024 FOG Project