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

    reboot a running linux in pxe with kexec

    Scheduled Pinned Locked Moved Solved
    Linux Problems
    4
    16
    7.8k
    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.
    • Wayne WorkmanW
      Wayne Workman @pga
      last edited by Wayne Workman

      @Tom-Elliott Basically, I think he wants to configure/change a running machine so that next time it boots, it boots to the network (I assume to access a Linux install ISO)… because he can’t get to it to press the F-whatever key to make it boot from network.

      @pga I am assuming you have SSH access?

      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/

      P 1 Reply Last reply Reply Quote 0
      • P
        pga @Wayne Workman
        last edited by

        @Wayne-Workman yes I have root ssh access. And you have expressed my request much better than me, thanks a lot.

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

          @pga I don’t think you could reinstall from scratch using an ISO… if you SSH’d into a fog host that has network booted, you’d simply get a bash prompt, and not the advanced iPXE menus that you want.

          If possible, you’d need to just build an image for the box before hand and then image it with that.

          To get it to network boot, you’d have to set up chain loading to the network on the HDD… and that’s going to be interesting to see… and I have no idea how to do it.

          Why can’t you go to the machine?

          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/

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

            You have to remember, when linux loads it boots to an OS layer through a portion, essentially, that tells it how to use the root filesystem, or the initrd=init.xz argument as you described.

            The problem is, you’re not loading the system when you’re using kexec. All you’re loading is a new kernel, not a new OS layer. I’m pretty sure you would not be able to do this as you’re thinking.

            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
            • P
              pga @Wayne Workman
              last edited by

              @Wayne-Workman I can go to a single machine, but not 200 of them in a reasonable time 🙂

              1 Reply Last reply Reply Quote 0
              • JunkhackerJ
                Junkhacker Developer
                last edited by

                can you not set these machines to boot to the network by default?

                signature:
                Junkhacker
                We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                P 1 Reply Last reply Reply Quote 0
                • P
                  pga @Junkhacker
                  last edited by

                  @Junkhacker not every bios supports pxe unfortunately.

                  I am currently trying with grub and booting to ipxe, I’ll see what result it gives me.

                  1 Reply Last reply Reply Quote 0
                  • JunkhackerJ
                    Junkhacker Developer
                    last edited by

                    you can also use the ipxe boot cd iso (downloadable from the ipxe website) to boot to pxe from a cd

                    signature:
                    Junkhacker
                    We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                    P 1 Reply Last reply Reply Quote 0
                    • P
                      pga @Junkhacker
                      last edited by

                      @Junkhacker that is equivalent to the grub + ipxe solution I think, and I don’t have to insert a CD in all my machines at least 🙂
                      My absolute restriction is that I don’t have a physical access to each machine, only a root ssh access.

                      Or maybe you know a way to directly reboot to an iso located on a hard drive ?

                      JunkhackerJ 1 Reply Last reply Reply Quote 0
                      • JunkhackerJ
                        Junkhacker Developer @pga
                        last edited by

                        @pga i do, but it would be more efficient to use grub to boot directly to the ipxe network boot file you want to use 😉

                        signature:
                        Junkhacker
                        We are here to help you. If you are unresponsive to our questions, don't expect us to be responsive to yours.

                        1 Reply Last reply Reply Quote 0
                        • P
                          pga
                          last edited by

                          Ok, it is quite simple with grub.

                          For instance, with a debian jessie:

                          1. install ipxe with grub
                          apt-get install ipxe
                          
                          1. Set the next grub boot to use the ipxe menu
                          grub-reboot 2
                          
                          1. Reboot !
                          reboot
                          

                          The number to use is the number of the grub entry (counting the submenu) of the pxe entry, starting from 0.

                          Thank you for your help, I hope the result could help someone in the future.

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

                          239

                          Online

                          12.1k

                          Users

                          17.3k

                          Topics

                          155.3k

                          Posts
                          Copyright © 2012-2024 FOG Project