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

How to pxe boot cent os 7

Scheduled Pinned Locked Moved Solved
General
5
63
29.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.
  • D
    dureal99d
    last edited by dureal99d Sep 1, 2016, 2:30 AM Sep 1, 2016, 8:27 AM

    Ive been trying for 2 days to make a working boot code for centos 7 and I cannot get it to work.

    I run fog rc3 on Ubuntu 16.04.1

    ive received this code from Here and needless to say no go.

    :Centos
    kernel http://${fog-ip}/fog/service/ipxe/Centos/images/pxeboot/vmlinuz
    initrd http://${fog-ip}/fog/service/ipxe/Centos/images/pxeboot/initrd.img
    imgargs vmlinuz root=/dev/nfs boot=isolinux netboot=nfs nfsroot=${fog-ip}:/var/www/fog/service/ipxe/Centos/ locale=en_US.UTF-8 keyboard-configuration/layoutcode=la mirror/country=US
    boot || goto failed
    goto start

    :Centos
    set path /fog/service/ipxe/Centos
    set nfs_path /images/service/ipxe/Centos
    kernel http://${fog-ip}/fog/service/ipxe/Centos/images/pxeboot/vmlinuz ks=http://${fog-ip}/fog/kickstarts/centos6.cfg ramdisk_size=100000 ksdevice=eth0 root=/dev/rd/0 ip=dhcp splash quiet – || read void
    initrd http://${fog-ip}/fog/service/ipxe/Centos/images/pxeboot/initrd.img || read void
    goto start

    the first one loads but then errors out. it states the dev/nfs is not right, the 2nd code just stops in the begin without going anywhere.
    any ideas??

    1 Reply Last reply Reply Quote 0
    • G
      george1421 Moderator
      last edited by Sep 1, 2016, 12:06 PM

      well the first one is stopping probably because you are telling it the nfsroot is an http path not an nfs mountable path. The protocols are different.

      In your second section does /fog/kickstarts/centos6.cfg exist? But you are booting centos 7??

      Here is a guide for pxe booting centos 7 that may get you closer. http://www.tecmint.com/install-pxe-network-boot-server-in-centos-7/

      Your imgargs approach is right for additional kernel parameters. Also I would avoid the || read void tags at the end remember you are dealing with an iPXE boot loader and not syslinux. I would also move your files out of the /fog path. You have an apache web server create a new parent directory called /bootimg or what ever and put your boot OS files under that like /bootimg/centos (also watch your case, its easier to use all lower case).

      If you want to see how the FOG developers download the FOS kernels you can key in http://<fog_server_ip>/fog/service/ipxe/bootp.php?mac=<registered_device_mac_address> You will see the kernel args and structure that iPXE needs.

      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 1
      • D
        dureal99d
        last edited by dureal99d Sep 1, 2016, 3:38 PM Sep 1, 2016, 9:38 PM

        I don’t fully understand the apache talk, nor how its relevant in this case. so now I must read up on it. I am new to programming and such, so I only understand little basics. I was looking for help in solving the riddle. So when you say http path instead of nfs path how would I fix this? I looked at the referenced link but I am not comprehending what they are talking about.

        I will tell you I have every other version of Linux that I like and use booting just fine. utilizing the code.

        :Ubuntu_64
        kernel http://${fog-ip}/fog/service/ipxe/ubuntu6_64/images/pxeboot/vmlinuz
        initrd http://${fog-ip}/fog/service/ipxe/ubuntu6_64/images/pxeboot/initrd.img
        imgargs vmlinuz root=/dev/nfs boot=casper 6=nfs nfsroot=${fog-ip}:/var/www/fog/service/ipxe/ubbuntu6_64/ locale=en_US.UTF-8 keyboard-configuration/layoutcode=la mirror/country=US
        boot || goto failed
        goto start

        now I admit I used this from another post in this forum and worked but I don’t fully understand the code and perhaps I needed to to be able to customize for other distros

        D 1 Reply Last reply Sep 1, 2016, 9:41 PM Reply Quote 0
        • D
          dureal99d @dureal99d
          last edited by Sep 1, 2016, 9:41 PM

          HOw would I make the nfs mountable?

          G 1 Reply Last reply Sep 1, 2016, 10:16 PM Reply Quote 0
          • G
            george1421 Moderator @dureal99d
            last edited by Wayne Workman Sep 1, 2016, 4:21 PM Sep 1, 2016, 10:16 PM

            @dureal99d said in How to pxe boot cent os 7:

            HOw would I make the nfs mountable?

            Understand this is beyond the scope of what the FOG server supports. That doesn’t mean that you can’t do this with FOG, its just not supported by the FOG project.

            You might want to explain exactly what you want to do here? Do you want to pxe boot a linux live environment with iPXE or do you wan to pxe boot a linux installer via iPXE? The answer may provide a better direction.

            IMO it would be easier to use an already exported NFS filesystem like /images Just create a subdirectory below /images (like /images/centos) then update your iPXE configuration to use that share instead of an http nfs root.

            Edit - Typo fixed.

            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!

            D 2 Replies Last reply Sep 1, 2016, 11:27 PM Reply Quote 0
            • D
              dureal99d @george1421
              last edited by dureal99d Sep 1, 2016, 5:30 PM Sep 1, 2016, 11:27 PM

              @george1421 said in How to pxe boot cent os 7:

              that share instead of an http nfs root.

              I would like to boot the live system and then from there be able to install the os on a physical drive as I can with Ubuntu, Linux mint and kubuntu.

              thought as you have already stated. I would not mind being able to use the already exported nfs. either way works.

              the purpose of this is to be able to create the ultimate complex advance boot benu and have all these Linux distros working right out the gate.

              this will help me complete this project.

              1 Reply Last reply Reply Quote 0
              • D
                dureal99d @george1421
                last edited by Sep 6, 2016, 12:03 PM

                @george1421 said in How to pxe boot cent os 7:

                @dureal99d said in How to pxe boot cent os 7:

                HOw would I make the nfs mountable?

                Understand this is beyond the scope of what the FOG server supports. That doesn’t mean that you can’t do this with FOG, its just not supported by the FOG project.

                You might want to explain exactly what you want to do here? Do you want to pxe boot a linux live environment with iPXE or do you wan to pxe boot a linux installer via iPXE? The answer may provide a better direction.

                IMO it would be easier to use an already exported NFS filesystem like /images Just create a subdirectory below /images (like /images/centos) then update your iPXE configuration to use that share instead of an http nfs root.

                Edit - Typo fixed.

                I know you said this is not supported by you guys but I have received support at this forum before for this type of issue and this is how I was able to boot Ubuntu based Linux distros and as such I post this pic in hopes you will reconsider.

                0_1473163391418_VirtualBox_pxe test 2_06_09_2016_06_59_05.png

                1 Reply Last reply Reply Quote 0
                • S
                  Sebastian Roth Moderator
                  last edited by Sep 6, 2016, 2:06 PM

                  @dureal99d As George already mentioned you need to have your files exported via NFS to make them accessible for the booting kernel. Please post your /etc/exports file here. Configure /var/www/fog/service/ipxe/ubbuntu6_64/ to be exported if it’s not yet.

                  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

                  D 1 Reply Last reply Sep 6, 2016, 11:14 PM Reply Quote 0
                  • D
                    dureal99d @Sebastian Roth
                    last edited by dureal99d Sep 6, 2016, 5:34 PM Sep 6, 2016, 11:14 PM

                    @Sebastian-Roth said in How to pxe boot cent os 7:

                    @dureal99d As George already mentioned you need to have your files exported via NFS to make them accessible for the booting kernel. Please post your /etc/exports file here. Configure /var/www/fog/service/ipxe/ubbuntu6_64/ to be exported if it’s not yet.

                    Here is my exports file, I have since tried to boot fedora with the same result and being as it is a cent os derivative, I figured id get the same result as that’s exactly what I got.

                    here is my exports config.
                    /images *(ro,sync,no_wdelay,no_subtree_check,insecure_locks,no_root_squash,insecure,fsid=0)
                    /images/dev *(rw,async,no_wdelay,no_subtree_check,no_root_squash,insecure,fsid=1)
                    /var/www/fog/service/ipxe/16.04.1_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/16.04.1_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/15.10_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/15.10_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/kubuntu6_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/kubuntu6_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/kubuntu5_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/kubuntu5_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/lm18_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/lm18_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/lm_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/lm_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/lmc_32 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/lmc_64 *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/Centos *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/bootcd *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/ubcd *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)
                    /var/www/fog/service/ipxe/fedora *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)

                    this is the code ive used.

                    kernel http://${fog-ip}/fog/service/ipxe/fedora/images/pxeboot/vmlinuz
                    initrd http://${fog-ip}/fog/service/ipxe/fedora/images/pxeboot/initrd.img
                    imgargs vmlinuz root=/dev/nfs boot=nfs netboot=nfs nfsroot=${fog-ip}:/var/www/fog/service/ipxe/fedora/
                    boot || goto failed
                    goto start

                    G 1 Reply Last reply Sep 7, 2016, 12:26 AM Reply Quote 0
                    • G
                      george1421 Moderator @dureal99d
                      last edited by george1421 Sep 6, 2016, 6:26 PM Sep 7, 2016, 12:26 AM

                      @dureal99d I guess I’ll start with a simple statement wow, that’s quite an nfs export.

                      I would (personally) collapse them down to this
                      /var/www/fog/service/ipxe *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)

                      Actually if it was me I would move my files out of the fog directory all together to avoid them from being clobbered during an upgrade.

                      I might put them into some place like /opt/bootimgs and then export that location. You should be able to map a directory below your mount (share) point. So if you share /opt/bootimgs you should be able to mount /opt/bootimgs/Centos I would test this from another linux server by using the following command mount -t nfs <fog_server_ip>:/opt/bootimgs/Centos /mnt just to make sure it mounts over correctly with only sharing the /opt/bootimgs

                      Your advanced menu code for fedora looks spot on. You have to be sure that the vmlinuz file you use is capable of network booting via nfs. Not all of them are. I personally would start with live media for all platforms you want to pxe boot. The distributions should give you guidance on what you have to configure for kernel parameters to pxe boot the target computer.

                      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!

                      D W 3 Replies Last reply Sep 7, 2016, 12:45 AM Reply Quote 2
                      • D
                        dureal99d @george1421
                        last edited by Sep 7, 2016, 12:45 AM

                        @george1421 said in How to pxe boot cent os 7:

                        that’s quite an nfs export

                        Ill try your suggestion and let you know how it goes

                        1 Reply Last reply Reply Quote 0
                        • W
                          Wayne Workman @george1421
                          last edited by Sep 7, 2016, 1:08 AM

                          @george1421 said in How to pxe boot cent os 7:

                          I guess I’ll start with a simple statement wow, that’s quite an nfs export.

                          +1, that is an insane exports file. I concur with George. You should simplify… a lot.

                          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/

                          D 1 Reply Last reply Sep 7, 2016, 1:46 AM Reply Quote 0
                          • D
                            dureal99d @george1421
                            last edited by Sep 7, 2016, 1:20 AM

                            @george1421 said in How to pxe boot cent os 7:

                            /var/www/fog/service/ipxe *(ro,sync,no_wdelay,insecure_locks,no_root_squash,insecure)

                            that one liner is pretty nice

                            1 Reply Last reply Reply Quote 0
                            • D
                              dureal99d @Wayne Workman
                              last edited by dureal99d Sep 6, 2016, 7:47 PM Sep 7, 2016, 1:46 AM

                              @Wayne-Workman @george1421
                              I am getting no such file or directory exist , how do i fix this?

                              “bash: 192.168.1.109: No such file or directory”

                              W 1 Reply Last reply Sep 7, 2016, 1:50 AM Reply Quote 0
                              • W
                                Wayne Workman @dureal99d
                                last edited by Wayne Workman Sep 6, 2016, 7:51 PM Sep 7, 2016, 1:50 AM

                                @dureal99d I’m not sure how much you know, but it doesn’t hurt you or future readers to just re-iterate what I know.

                                The /etc/exports file is for Network File System exports. This is how Linux natively shares files across a network.

                                http file distribution is done via Apache or nginx or some other http service, and is NOT nfs. these paths you have in your original post, they are web paths. Such as: http://${fog-ip}/fog/service/ipxe/Centos/images/pxeboot/initrd.img This is a web path. This would be accessible if you plugged the fully expanded URL into a web browser. This is not via NFS, but via HTTP using apache to serve it.

                                Please post a picture of the error you’re getting, it’ll help us figure out what’s going on.

                                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/

                                D 2 Replies Last reply Sep 7, 2016, 1:54 AM Reply Quote 0
                                • D
                                  dureal99d @Wayne Workman
                                  last edited by Sep 7, 2016, 1:54 AM

                                  @Wayne-Workman 0_1473213279986_Screenshot from 2016-09-06 20-52-35.png

                                  1 Reply Last reply Reply Quote 0
                                  • D
                                    dureal99d @Wayne Workman
                                    last edited by Sep 7, 2016, 1:57 AM

                                    @Wayne-Workman I see, well clearly i have a lot to learn about nfs. and i am at another station trying to “linux” of course trying to mount the share.

                                    W 1 Reply Last reply Sep 7, 2016, 2:00 AM Reply Quote 0
                                    • W
                                      Wayne Workman @dureal99d
                                      last edited by Wayne Workman Sep 6, 2016, 8:00 PM Sep 7, 2016, 2:00 AM

                                      @dureal99d I’d suggest you move all that stuff to somewhere else besides a web directory. This is a rather very nasty setup IMO - and as it is this is absolutely going to fill some partition somewhere eventually as FOG makes a complete copy of the web directory each time you re-run the installer (to update or to troubleshoot). You need to put this stuff elsewhere.

                                      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/

                                      D 1 Reply Last reply Sep 7, 2016, 2:03 AM Reply Quote 0
                                      • T
                                        Tom Elliott
                                        last edited by Sep 7, 2016, 2:03 AM

                                        Where are you seeing no such? Is it in ipxe or just in cli? It appears, to me, your cli is wrong as you have <> in the cli around the IP. This is incorrect, or so I thought. It should be ip:/path/to/mount

                                        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

                                        D 2 Replies Last reply Sep 7, 2016, 2:04 AM Reply Quote 0
                                        • D
                                          dureal99d @Wayne Workman
                                          last edited by Sep 7, 2016, 2:03 AM

                                          @Wayne-Workman said in How to pxe boot cent os 7:

                                          directory. This is a rather very nasty setup IMO - and

                                          Ok I’m in the middle of moving it all to the suggested location as we speak.

                                          1 Reply Last reply Reply Quote 0
                                          • 1
                                          • 2
                                          • 3
                                          • 4
                                          • 1 / 4
                                          1 / 4
                                          • First post
                                            8/63
                                            Last post

                                          202

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project