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

iPXE-menu for a second linux on the Hd

Scheduled Pinned Locked Moved
FOG Problems
2
3
270
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
    robert70569
    last edited by Nov 2, 2022, 5:06 PM

    Hello,
    I would like to boot a second linux distro from the harddisk. Till now I have an Windows and an Debian (boots from /dev/sdb3) on that disk. I installed an second Linux (Kali) on /dev/sdb6. But how has to be the iPXE-Menu for that constellation.
    For Windows I difined an “fog.local” with the parameter
    “chain -ar http://<fogserver>/fog/service/ipxe/grub.exe --config-file=rootnoverify (hd1);chainloader (hd1)+1 || MENU”
    For the first Linux there is an “fog.linux” with the parameter
    “chain tftp://<fogserver>/boot/grub/i386-pc/core.0 || goto MENU”
    This Linux boots witch help from /tftpboot/boot/grub/grub.cfg

    menuentry 'Linux' --class ubuntu --class gnu-linux --class gnu --class os {
            insmod biosdisk
            insmod part_msdos
            insmod ntfs
            set root=(hd1,3)
            if [ -f /ubuntu/disks/root.disk ]; then
                    loopback loop0 /ubuntu/disks/root.disk
                    set root=(loop0)
                    linux   /vmlinuz root=/dev/sdb3 loop=/ubuntu/disks/root.disk rw rootflags=sync splash nomdmonddf nomdmonisw  vt.handoff=7
                    initrd  /initrd.img
            else
                    set root=(hd1,3)
                    linux   /vmlinuz root=/dev/sdb3 rw splash vt.handoff=7
                    initrd  /initrd.img
            fi
    }
    

    If I change /dev/sdb3 with /dev/sdb6 in this grub.cfg the second Linux will boot, but howto integrate both Linux distros ?
    Thanks for help.

    1 Reply Last reply Reply Quote 0
    • S
      Sebastian Roth Moderator
      last edited by Nov 2, 2022, 9:41 PM

      @robert70569 There are several ways of getting another Linux distro booted.

      One way would be to add another menuentry to your existing /tftpboot/boot/grub/grub.cfg. Maybe you need to add a timeout value for grub to display a menu for you to select one of the two. That way you end up with two menu selections.

      Another way might be using grub.exe, e.g.:

      chain -ar http://<fogserver>/fog/service/ipxe/grub.exe --config-file=root=(hd2,6);kernel /vmlinuz root=/dev/sdb6 rw;initrd /initrd.img || goto MENU
      

      This is untested. Just trying to come up with some ideas for you to play with. Find a list of possible commands on the web - take a look at find as well.

      A third way you might look into is embedding a grub.cfg into your core.0 binary. That way you could create one binary for Debian and another one for Kali.

      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

      R 1 Reply Last reply Nov 9, 2022, 7:40 AM Reply Quote 0
      • R
        robert70569 @Sebastian Roth
        last edited by Nov 9, 2022, 7:40 AM

        @sebastian-roth
        ok, add another menuentry to /tftpboot/boot/grub/grub.cfg
        and add an timeout worked. But there will be a second menu to select one of the two menuentry. Not so nice, but it works.
        I could not find a working chain-syntax for the grub.exe.
        Embedding a grub.cfg into your core.0 binary I didnt test yet.

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

        206

        Online

        12.1k

        Users

        17.3k

        Topics

        155.4k

        Posts
        Copyright © 2012-2024 FOG Project