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

    Boot Linux From Menu

    Scheduled Pinned Locked Moved
    General Problems
    2
    9
    919
    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.
    • J
      jrhaner
      last edited by

      I have a dual boot system, grub2 loading ipxe from the linux ext3 partition, windows on the first partition.

      Is there any way to force boot of Linux using fog’s grubfordos in boot.php? What I want is to be able to boot ipxe as first choice, and fog has no tasks, boot ubuntu.

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

        Well grubfordos booting is only for bios computers.

        Is your target computer a bios or uefi 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!

        J 1 Reply Last reply Reply Quote 0
        • J
          jrhaner @george1421
          last edited by

          @george1421 both are supported, but it is currently set up for legacy bios.

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

            @jrhaner So tell me how you have the disk structure setup. You’ve got one partition that has ipxe on it, a second partition with windows on it and a third partition with ubuntu on it?

            FOG’s normal operation is to pxe boot into the FOG iPXE menu over the network. From these depending on the firmware type it will either exit with SANBOOT for bios to boot from the first hard drive or refind.efi for uefi and refind searching for the EFI boot partition then chains to that.

            For reference FOG issues this iPXE command to boot to the hard drive: sanboot --no-describe --drive 0x80

            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!

            J 1 Reply Last reply Reply Quote 0
            • J
              jrhaner @george1421
              last edited by

              @george1421
              Grub2 defaults to ipxe which is a linux kernel in (hd0,msdos5)/ipxe/ipxe.lkrn on the root ubuntu partition. Grub2 also has menu items for Windows 10 and Ubuntu, however, since IPXE is the default, it will boot loop unless fog exit condition is the first windows partition. I didn’t see an option for first linux partition.

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

                @jrhaner said in Boot Linux From Menu:

                (hd0,msdos5)/ipxe/ipxe.lkrn

                OK this is telling me you are working with a bios based system. In that case grub4dos can be used.

                FOG Creates this chain command for first found windows option

                chain -ar ${boot-url}/service/ipxe/grub.exe --config-file="find --set-root /BOOTMGR;chainloader /BOOTMGR""
                

                and this command for first hard drive

                chain -ar ${boot-url}/service/ipxe/grub.exe --config-file="rootnoverify (hd0);chainloader +1"
                

                Why I’m telling you this is because you can create your own custom iPXE menu with the proper grub commands you want then set that as the default iPXE menu item in fog. That way it will/can exit exactly the way you want it to and not the way the developers intended.

                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!

                J 1 Reply Last reply Reply Quote 0
                • J
                  jrhaner @george1421
                  last edited by jrhaner

                  @george1421 I was working in that line of thinking. I just need to figure out how to translate Ubuntu’s grub2 parameters to grub4dos. I was looking at the definitions in the /fog/lib and found that snippet. I am just not as familiar with grub4dos vs grub2 commands.

                  great community, by the way.

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

                    @jrhaner From this page: https://www.gnu.org/software/grub/manual/grub/html_node/Chain_002dloading.html

                    	set root=(hd0,1)
                    	chainloader +1
                    

                    That should be root= first hard drive first partition.
                    ref: https://www.linux.com/training-tutorials/how-rescue-non-booting-grub-2-linux/

                    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!

                    J 1 Reply Last reply Reply Quote 0
                    • J
                      jrhaner @george1421
                      last edited by

                      @george1421 Honestly, a better solution might be to use grub-reboot on startup in ubuntu. A bit hacky, but it’ll do

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

                      277

                      Online

                      12.0k

                      Users

                      17.3k

                      Topics

                      155.2k

                      Posts
                      Copyright © 2012-2024 FOG Project