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

Boot Linux From Menu

Scheduled Pinned Locked Moved
General Problems
2
9
947
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 Mar 15, 2022, 4:36 PM

    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
    • G
      george1421 Moderator
      last edited by Mar 15, 2022, 4:38 PM

      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 Mar 15, 2022, 4:41 PM Reply Quote 0
      • J
        jrhaner @george1421
        last edited by Mar 15, 2022, 4:41 PM

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

        G 1 Reply Last reply Mar 15, 2022, 4:46 PM Reply Quote 0
        • G
          george1421 Moderator @jrhaner
          last edited by george1421 Mar 15, 2022, 10:47 AM Mar 15, 2022, 4:46 PM

          @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 Mar 15, 2022, 4:52 PM Reply Quote 0
          • J
            jrhaner @george1421
            last edited by Mar 15, 2022, 4:52 PM

            @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.

            G 1 Reply Last reply Mar 15, 2022, 5:08 PM Reply Quote 0
            • G
              george1421 Moderator @jrhaner
              last edited by george1421 Mar 15, 2022, 11:22 AM Mar 15, 2022, 5:08 PM

              @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 Mar 15, 2022, 5:12 PM Reply Quote 0
              • J
                jrhaner @george1421
                last edited by jrhaner Mar 15, 2022, 11:13 AM Mar 15, 2022, 5:12 PM

                @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.

                G 1 Reply Last reply Mar 15, 2022, 5:26 PM Reply Quote 0
                • G
                  george1421 Moderator @jrhaner
                  last edited by george1421 Mar 15, 2022, 11:28 AM Mar 15, 2022, 5:26 PM

                  @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 Mar 15, 2022, 6:22 PM Reply Quote 0
                  • J
                    jrhaner @george1421
                    last edited by Mar 15, 2022, 6:22 PM

                    @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
                    1 / 1
                    • First post
                      2/9
                      Last post

                    182

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project