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

about use refind(not fog env)

Scheduled Pinned Locked Moved Unsolved
Linux Problems
2
9
2.2k
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.
  • X
    xutianhong
    last edited by May 25, 2017, 1:56 PM

    Server
    • FOG Version: none
    • OS: none
    Client
    • Service Version:none
    • OS:none
    Description

    hi, @Tom-Elliott, after that discussion, i was tring to refind. and i can’t find any way to use refind loading network file. i read the refind doc, it’s support ipxe, but it’s looks like loading refind -> jump to ipxe.efi, not any different between dhcp->ipxe.
    and when i try to use refind.conf setting to load manual conf, it’s not support loading network file, like “loader tftp://192.168.136.201/images/rhel64-x86_64/vmlinuz”, but grub support network and tftp, is refind have some setting?

    thank you.

    1 Reply Last reply Reply Quote 0
    • G
      george1421 Moderator
      last edited by May 25, 2017, 2:18 PM

      I wonder if you are using the wrong tool for booting??

      From what I understand you are trying to pxe boot into a custom menu right?

      If so you could take some ideas that FOG uses to create your own menu.

      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
      • G
        george1421 Moderator
        last edited by george1421 May 25, 2017, 8:26 AM May 25, 2017, 2:24 PM

        For pxe booting fog it uses iPXE. The FOG iPXE kernel (ipxe.efi) is custom built by the fog developers. It has a built in script that will contact the fog server and load an php file called boot.php which then builds the FOG iPXE menu. That menu looks similar to this:

        set fog-ip 192.168.1.53
        set fog-webroot fog
        set boot-url http://${fog-ip}/${fog-webroot}
        cpuid --ext 29 && set arch x86_64 || set arch i386
        goto get_console
        :console_set
        colour --rgb 0x00567a 1 ||
        colour --rgb 0x00567a 2 ||
        colour --rgb 0x00567a 4 ||
        cpair --foreground 7 --background 2 2 ||
        goto MENU
        :alt_console
        cpair --background 0 1 ||
        cpair --background 1 2 ||
        goto MENU
        :get_console
        console --picture http://192.168.1.53/fog/service/ipxe/bg.png --left 100 --right 80 && goto console_set || goto alt_console
        :MENU
        menu
        colour --rgb 0x00567a 0 ||
        cpair --foreground 1 1 ||
        cpair --foreground 0 3 ||
        cpair --foreground 4 4 ||
        item --gap Host is registered as 00505694aa40!
        item --gap -- -------------------------------------
        item fog.local Boot from hard disk
        item fog.memtest Run Memtest86+
        item fog.keyreg Update Product Key
        item fog.deployimage Deploy Image
        item fog.multijoin Join Multicast Session
        item fog.quickdel Quick Host Deletion
        item fog.sysinfo Client System Information (Compatibility)
        item mdtlti.x86 MDT LiteTouch x86 Boot
        choose --default fog.local --timeout 5000 target && goto ${target}
        :fog.local
        sanboot --no-describe --drive 0x80 || goto MENU
        :fog.memtest
        kernel http://192.168.1.53/fog/service/ipxe/memdisk initrd=http://192.168.1.53/fog/service/ipxe/memtest.bin iso raw
        initrd http://192.168.1.53/fog/service/ipxe/memtest.bin
        boot || goto MENU
        :fog.keyreg
        login
        params
        param mac0 ${net0/mac}
        param arch ${arch}
        param username ${username}
        param password ${password}
        param keyreg 1
        isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
        isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
        :fog.deployimage
        login
        params
        param mac0 ${net0/mac}
        param arch ${arch}
        param username ${username}
        param password ${password}
        param qihost 1
        isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
        isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
        :fog.multijoin
        login
        params
        param mac0 ${net0/mac}
        param arch ${arch}
        param username ${username}
        param password ${password}
        param sessionJoin 1
        isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
        isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
        :fog.quickdel
        login
        params
        param mac0 ${net0/mac}
        param arch ${arch}
        param username ${username}
        param password ${password}
        param delhost 1
        isset ${net1/mac} && param mac1 ${net1/mac} || goto bootme
        isset ${net2/mac} && param mac2 ${net2/mac} || goto bootme
        :fog.sysinfo
        kernel http://192.168.1.53/fog/service/ipxe/bzImage32 loglevel=4 initrd=init_32.xz root=/dev/ram0 rw ramdisk_size=127000 web=192.168.1.53/fog/ consoleblank=0 rootfstype=ext4 storage=192.168.1.53:/images/ storageip=192.168.1.53 loglevel=4 mode=sysinfo
        imgfetch http://192.168.1.53/fog/service/ipxe/init_32.xz
        boot || goto MENU
        :mdtlti.x86
        initrd http://192.168.1.53/bootimg/LiteTouchPE_x86.iso
        chain http://192.168.1.53/bootimg/memdisk iso raw
        :bootme
        chain -ar http://192.168.1.53/fog/service/ipxe/boot.php##params ||
        goto MENU
        autoboot
        

        You wouldn’t need to have an external ipxe program this script could be built directly into the kernel. But that would also require you to rebuild your kernel if you updated your menu.

        This page gives you an idea of the scripting options: http://ipxe.org/scripting

        You can build your own custom ipxe kernel using the source files or by using the rom-o-matic site: https://rom-o-matic.eu/

        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!

        X 3 Replies Last reply May 25, 2017, 2:39 PM Reply Quote 0
        • X
          xutianhong
          last edited by May 25, 2017, 2:36 PM

          hi @george1421 , see u again.
          in my env, i want to use cobbler install rhel67&rhel73 with different mac use diff ksfile.
          it’s will be like blow
          client get ip with dhcp server & get tftp info with dnsmasq server.
          client to tftp server get bootinfo & files.
          in legacy bios, it’s works all fine. but uefi.
          the first is rhel73.
          i solved it cuz rhel73 kernel have bug, change the kernel to centos7.1611 kernel 3.10.514.2.2.
          the second is rhel67.
          it’s not efi_stub.
          i try to use ipxe {kernel tftpserver/vmlinuz, initrd tftpserver/initrd.img, boot} it’s not work.
          then, i try ipxe{chain grubx64.efi} it’s give me grub shell, in grub shell { net_bootp, linux tftpserver/vmlinuz, initrd tftpserver/initrd.img, boot} it’s worked.
          or i use grub2-mkstandalone balabalbal burn grub.cfg to grubx64.efi, it’s worked too.
          but i can’t use these two ways cuz grub shell can’t like ipxe can use script & ${mac:hexraw}, and i can’t make standalone grub.efi with every one client.

          so i hear rEFInd like grub. i tried…

          is FOG can do this like cobbler?

          1 Reply Last reply Reply Quote 0
          • X
            xutianhong @george1421
            last edited by May 25, 2017, 2:39 PM

            @george1421 is i describe clearly what i need? sorry…

            1 Reply Last reply Reply Quote 0
            • X
              xutianhong @george1421
              last edited by May 25, 2017, 2:42 PM

              @george1421 in rhel73 @ ipxe, i setting like this.

              #!ipxe
              
              :retry_dhcp
              dhcp && echo DHCP Succeeded || goto retry_dhcp
              
              :retry_fetch
              imgfree
              
              imgfetch http://${next-server}/cblr/svc/op/gpxe/system/${mac:hexraw} && echo Get InstallScript Succeeded && goto start_install || goto fail_sleep
              
              :fail_sleep
              echo Fetch/Install failed, sleep 30s && sleep 30 && goto retry_dhcp
              
              :start_install
              echo Booting from ${mac:hexraw}
              chain ${mac:hexraw} || goto fail_sleep
              

              make bin-x86_64-efi/ipxe.efi EMBED=uefi.ipx

              1 Reply Last reply Reply Quote 0
              • X
                xutianhong @george1421
                last edited by May 25, 2017, 3:02 PM

                @george1421 http://${next-server}/cblr/svc/op/gpxe/system/${mac:hexraw} like blow
                http://192.168.136.201/cblr/svc/op/gpxe/system/000C2996FC90

                #!ipxe
                initrd --name initramfs http://192.168.136.201/cobbler/ks_mirror/rhel73/images/pxeboot/uefiinitrd.img
                kernel http://192.168.136.201/cobbler/ks_mirror/rhel73/images/pxeboot/uefivmlinuz initrd=initramfs  ksdevice=bootif lang=  text net.ifnames=0 biosdevname=0 kssendmac  ks=http://192.168.136.201/cblr/svc/op/ks/system/000C2996FC90
                boot
                

                it’s gen by cobbler.

                G 1 Reply Last reply May 25, 2017, 4:06 PM Reply Quote 0
                • G
                  george1421 Moderator @xutianhong
                  last edited by george1421 May 25, 2017, 11:01 AM May 25, 2017, 4:06 PM

                  @xutianhong I think we do have a language issue here. The issue is not with you, but me.

                  You keep using the word cobbler.

                  History lesson:
                  Cobbler is an old english word for a person who would repair walking shoes and boots. In difficult economic times people would keep their shoes and not buy new ones by taking them to a cobbler to patch them with scraps of leather and other materials.

                  The word cobbled is what a cobbler would do, build or repair something out of extra bits and left over parts from other things.

                  When you kept referring to cobbler, I understood that as something YOU built out of extra bits and left over parts from other projects.

                  Now I know that cobbler is an opensource project (akin to FOG). http://cobbler.github.io/manuals/quickstart/

                  I need to reread this thread with that new understanding.

                  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!

                  X 1 Reply Last reply May 25, 2017, 4:43 PM Reply Quote 0
                  • X
                    xutianhong @george1421
                    last edited by May 25, 2017, 4:43 PM

                    @george1421 im very sorry to make you confused with word “cobbler”, yes, it is an opensource project

                    if akin to FOG. later, i will try FOG to compare it.

                    but now, i think my problem is how use dhcp + dnsmasq.proxy mode + ipxe install rhel67(old kernel without efi_stub) with uefi client make it general.

                    or how gurb2 auto looking for grub.cfg @ ipxe environment.

                    i was confused that, why grub can’t use anyother args like — grubx64.efi --net_bootp --net_default_server=xxxx --configfile=xxxxx/grub.cfg, or like ipxe support ${mac(ip):hexraw} to make grub.cfg be general. that’s will be perfect to support network install.

                    how FOG do if someone need install rhel67 with general cfg @ dnsmasq.proxy mode & uefi client(for now all hp gen9 server use efi.)

                    thank you.

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

                    209

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project