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

centos 7 kickstart - were to put ks file

Scheduled Pinned Locked Moved
FOG Problems
3
18
2.4k
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.
  • R
    robertkwild
    last edited by Aug 16, 2021, 1:33 PM

    oh no sorry @george1421, im not using ftp im using what you said in the how to, im just wondering where i should put the KS line in -

    kernel tftp://${fog-ip}/os/centos/7/vmlinuz
    initrd tftp://${fog-ip}/os/centos/7/initrd.img
    imgargs vmlinuz initrd=initrd.img root=live:nfs://${fog-ip}:/images/os/centos/7/LiveOS/squashfs.img ip=dhcp inst.repo=nfs:${fog-ip}:/images/os/centos/7 splash quiet
    KS=
    boot || goto MENU

    G 1 Reply Last reply Aug 16, 2021, 1:47 PM Reply Quote 0
    • G
      george1421 Moderator @robertkwild
      last edited by george1421 Aug 16, 2021, 7:48 AM Aug 16, 2021, 1:47 PM

      @robertkwild said in centos 7 kickstart - were to put ks file:

      Well the ks value should be a kernel parameter so I would append it onto the end of the imgargs. The kernel parameters are a way of passing variables into the linux startup code. The linux kernel or the init code might use these values to alter the startup or running process.

      Passing it might look something like this:

      kernel tftp://${fog-ip}/os/centos/7/vmlinuz
      initrd tftp://${fog-ip}/os/centos/7/initrd.img
      imgargs vmlinuz initrd=initrd.img root=live:nfs://${fog-ip}:/images/os/centos/7/LiveOS/squashfs.img ip=dhcp inst.repo=nfs:${fog-ip}:/images/os/centos/7 splash quiet ks=http://${fog-ip}/centos7-ks.cfg
      boot || goto MENU
      

      Then the actual file since we are using http would be in the root of the apache server data directory /var/www/html for rhel variants and /var/www for debian variants.

      Just to be clear I don’t know if ks is the proper variable or if the centos kernel will accept that value (case is important). I only translated what you posted to the proper location on the fog server.

      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
      • R
        robertkwild
        last edited by Aug 16, 2021, 1:56 PM

        ok @george1421 so i put it under the http dir

        /var/www/html/fog/centos7.ks.cfg

        but ${fog-ip} means the above doesnt it?

        G 1 Reply Last reply Aug 16, 2021, 1:59 PM Reply Quote 0
        • G
          george1421 Moderator @robertkwild
          last edited by Aug 16, 2021, 1:59 PM

          @robertkwild said in centos 7 kickstart - were to put ks file:

          but ${fog-ip} means the above doesnt it?

          that is only the IP address that represents the fog server. This is filled in automatically by the FOG boot.php code.

          I would not place your file in the fog directory directly, but up one level in the docroot of the web server.

          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
          • R
            robertkwild
            last edited by Aug 16, 2021, 2:01 PM

            should i chown it apache:apache?

            G 1 Reply Last reply Aug 16, 2021, 3:27 PM Reply Quote 0
            • G
              george1421 Moderator @robertkwild
              last edited by Aug 16, 2021, 3:27 PM

              @robertkwild You can change it if you want. It should work as long as world has read access. You can test by a second computer, just open a browser and connect to the FOG ip address and then the name of the file to see if you can download it with a browser.

              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
              • R
                robertkwild
                last edited by Aug 16, 2021, 4:16 PM

                thanks @george1421 i can access the kickstart script via the web gui so all is good

                i can view it but i cant download it

                if i go here

                https://fog-ip/ks.cfg

                i can view it on the web

                but if i go here

                https://fog-ip/

                it re directs me to the fog dashboard, ie

                https://fog-ip//fog/management/index.php?node=home

                i was hoping it would list the dir listing of apache and when i click the file i could download it

                maybe i need to make a dir and put the file in the dir and then i can download it

                many thanks,
                rob

                G 1 Reply Last reply Aug 16, 2021, 4:28 PM Reply Quote 0
                • G
                  george1421 Moderator @robertkwild
                  last edited by Aug 16, 2021, 4:28 PM

                  @robertkwild If you can access the file via a web browser then you should be pretty confident that the centos linux kernel can get it when its time. As for directory browsing of the apache docroot that is turned off. The redirect asking for no specific file and then being redirected to the fog web ui is by design. You would need to do some changing in the web configuration if you wanted to do that. I would advise against changing the web configuration in apache because it may stop fog from operating.

                  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
                  • R
                    robertkwild
                    last edited by Aug 17, 2021, 8:23 AM

                    @george1421 im getting closer, ive tried all different variants but this is the best one, this one actually tries to load the “kickstart” file

                    kernel tftp://${fog-ip}/os/centos/7/vmlinuz ks=http://${fog-ip}/listing/ks.cfg
                    initrd tftp://${fog-ip}/os/centos/7/initrd.img
                    boot || goto MENU

                    but this is the error i get when trying it out

                    ks.JPG

                    G 1 Reply Last reply Aug 17, 2021, 11:25 AM Reply Quote 0
                    • R
                      robertkwild
                      last edited by Aug 17, 2021, 11:22 AM

                      changed it like so and so far so good, will let you know the outcome, big shout out to @george1421

                      kernel tftp://${fog-ip}/os/centos/7/vmlinuz ks=nfs:${fog-ip}:/images/os/centos/7/ks.cfg
                      initrd tftp://${fog-ip}/os/centos/7/initrd.img
                      boot || goto MENU

                      1 Reply Last reply Reply Quote 0
                      • G
                        george1421 Moderator @robertkwild
                        last edited by george1421 Aug 17, 2021, 5:27 AM Aug 17, 2021, 11:25 AM

                        @robertkwild Again I would confirm if you can download the config file via a browser first. If you can and you are on the same subnet as the pxe booting computer then the problem is elsewhere. I see you’ve taken the minimalist approach to the kernel args. If that’s kind of working for you, I think I might just tack a few on for good measure since some kernels get cranky without the initrd line.

                        Using your ipxe menu config.

                        kernel tftp://${fog-ip}/os/centos/7/vmlinuz initrd=initrd.img ip=dhcp ks=http://${fog-ip}/listing/ks.cfg
                        initrd tftp://${fog-ip}/os/centos/7/initrd.img
                        boot || goto MENU
                        

                        And since we don’t know if it can’t pull the config file because of the http server or the client lets add in ip=dhcp for good measure.

                        FWIW imgargs command should do the same thing as appending the values after the kernel call, but I’ve seen some kernels not accept the imgargs line but take the kernel parameters the way you have presented them.

                        EDIT: I just noticed the certificate error. Your fog server is running configured under https:// but your curl call is using http:// This might also cause the error. Its not clear if all you need to do is change the kernel call to the ks file to https or have to do something different because fog is using a privately created certificate for https.

                        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!

                        R 1 Reply Last reply Aug 17, 2021, 2:33 PM Reply Quote 1
                        • M
                          makswojciech
                          last edited by Aug 17, 2021, 11:54 AM

                          Hey,
                          Recently I have been doing exactly same think as you are doing now and in my case worked:
                          kernel tftp://${fog-ip}/os/centos/7/vmlinuz
                          initrd tftp://${fog-ip}/os/centos/7/initrd.img
                          imgargs vmlinuz initrd=initrd.img root=live:nfs://${fog-ip}:/images/os/centos/7/LiveOS/squashfs.img ip=dhcp inst.repo=nfs:${fog-ip}:/images/os/centos/7 inst.ks=nfs:${fog-ip}:/images/dev/ks.cfg splash quiet
                          boot || goto MENU

                          Note, that in my case I had to have kickstart file located in /images/dev.

                          1 Reply Last reply Reply Quote 1
                          • R
                            robertkwild
                            last edited by Aug 17, 2021, 12:02 PM

                            ive tested it and all works perfect!!!

                            heres my kickstart script

                            #platform=x86, AMD64, or Intel EM64T
                            #version=DEVEL
                            # Install OS instead of upgrade
                            install
                            # Keyboard layouts
                            keyboard 'uk'
                            # Root password
                            rootpw --iscrypted
                            # System language
                            lang en_GB
                            # System authorization information
                            auth  --useshadow  --passalgo=sha512
                            # Use text mode install
                            text
                            # SELinux configuration
                            selinux --disabled
                            # Do not configure the X Window System
                            skipx
                            
                            # Use NFS installation media
                            nfs --server=10.110.10.60 --dir=/images/os/centos/7
                            
                            # Firewall configuration
                            firewall --disabled
                            # Network information
                            network  --bootproto=dhcp --device=eth0
                            # Reboot after installation
                            reboot
                            # System timezone
                            timezone Europe/London
                            # System bootloader configuration
                            bootloader --location=mbr
                            # Clear the Master Boot Record
                            zerombr
                            # Partition clearing information
                            clearpart --drives=sda --all --initlabel
                            #Create Partitions automatically
                            autopart --type=lvm
                            
                            1 Reply Last reply Reply Quote 0
                            • R
                              robertkwild @george1421
                              last edited by Aug 17, 2021, 2:33 PM

                              @george1421 thanks george about this, i will edit my syntax and get back to you about this

                              1 Reply Last reply Reply Quote 0
                              • R
                                robertkwild
                                last edited by Aug 19, 2021, 1:32 PM

                                my dir listing works but when i click the kickstart file, it doesnt ask me to download it, where as it should instead of just viewing me the contents of it

                                is it ok to add this line in my httpd.conf as i know @george1421 advised against it

                                <Directory /var/www/html/listing>
                                Options +Indexes
                                </Directory>

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

                                195

                                Online

                                12.1k

                                Users

                                17.3k

                                Topics

                                155.3k

                                Posts
                                Copyright © 2012-2024 FOG Project