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

Boot FOG on client PC using a special partition?

Scheduled Pinned Locked Moved
General
3
36
4.6k
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.
  • D
    DBCountMan
    last edited by May 27, 2020, 7:46 PM

    It is for convenience and also better workflow efficiency. Right now, I am the only one using Acronis pulling images from my NAS but the supervisors wanted me to build them a FOG server, so I did. Now we’ve all been using FOG here at our imaging lab but it would be nice to be able to image onsite at a clients office, instead of either pulling the drive/PC back to the lab to image. I can image a PC in about 7min across the network at a clients office with acronis. I want the rest of our team to be able to do that. I use an Acronis iso that is somewhat old now and that I paid for. Acronis doesn’t offer deployment unless we purchase Snap Deploy. FOG is free, so we are dedicated to that solution.

    G 1 Reply Last reply May 27, 2020, 7:59 PM Reply Quote 0
    • G
      george1421 Moderator @DBCountMan
      last edited by May 27, 2020, 7:59 PM

      @brakcounty said in Boot FOG on client PC using a special partition?:

      FOG here at our imaging lab but it would be nice to be able to image onsite at a clients office

      A mobile fog server would work here (laptop loaded with FOG and dnsmasq). But this issue is beyond the scope of trying to deploy to a system not on the imaging network. iPXE and FOG is only designed (programmed to support a single interface for imaging). There are hard coded IP addresses in the fog configuration as well as in config files that point to the IP address of the designated imaging interface.

      If you wanted to discard iPXE from the imaging process (and loose some functionality) you can boot FOS Linux (the OS/Engine that captures and deploys images) directly from usb. You see the FOS Linux engine being transferred to the target computer on the imaging network as bzImage and init.xz. With that said, in this hack you have to define the IP address of the FOG server since FOS Linux would normally get that from iPXE (which is not available in this solution). So its possible to define the management interface of the FOG server in the config file for this USB boot. The instructions are listed here: https://forums.fogproject.org/topic/7727/building-usb-booting-fos-image Read through the instructions completely and watch out for the caveats.

      Also look at the chat bubble for a few more hints.

      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
      • D
        DBCountMan
        last edited by DBCountMan May 28, 2020, 7:03 AM May 28, 2020, 1:02 PM

        @george1421 So I changed the IP in the grub.cfg file to my FOG server on the production side, and booted the USB, chose deploy/capture image (the first option on the boot menu), and got this error:
        IMG_20200528_084846.jpg

        G 1 Reply Last reply May 28, 2020, 1:07 PM Reply Quote 0
        • G
          george1421 Moderator @DBCountMan
          last edited by May 28, 2020, 1:07 PM

          @brakcounty Ah you DID NOT read the caveats with this process. You MUST schedule the task first before picking option 1

          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
          • D
            DBCountMan
            last edited by DBCountMan May 28, 2020, 1:35 PM May 28, 2020, 7:23 PM

            Ok created a task and tried it again, and now it looks like the task is trying to mount the nfs share via the imaging (isolated network) interface 10.0.0.10
            IMG_20200528_151807.jpg
            Is there a way to make FOG try to connect to two different nfs shares? Like if one fails try another?

            1 Reply Last reply Reply Quote 0
            • D
              DBCountMan
              last edited by DBCountMan May 29, 2020, 10:02 AM May 29, 2020, 3:33 PM

              UPDATE!!!
              I added a storage node and specified the interface and ip of my prod network and successfully deployed an image using the USB FOG. Now I added an entry to the GRUB menu called “Boot from HDD” but I don’t know the command line to boot from it. I have used “sanboot --no-describe --drive 0x08” in an ipxe menu file with a different setup but GRUB isn’t recognizing sanboot.

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by May 29, 2020, 4:50 PM

                @brakcounty As we usually don’t use GRUB in FOG for booting there are not that many resources on this topic in the forums. For that you need to search external sites. Here is a list of different GRUB configs used for chainloading to a Windows installation on disk: https://wiki.gentoo.org/wiki/GRUB2/Chainloading

                I have not see the ntldr used much yet. Most Linux installations that setup dual booting with windows use the chainloader command I think. Try different ones and you should be able to boot from disk through this.

                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
                • D
                  DBCountMan
                  last edited by DBCountMan May 29, 2020, 10:55 AM May 29, 2020, 4:53 PM

                  Great thanks! I already found and tried this:
                  insmod part_gpt
                  insmod chain
                  set root=(hd0,gpt1)
                  chainloader /EFI/Microsoft/Boot/bootmgfw.efi
                  boot

                  No luck. Says the file could not be found.

                  The ls command shows hd0 hd0,msdos hd1 hd1,msdos, hd2 hd2, msdos. I tried all three hd entries and pointed to /EFI/Microsoft/Boot/bootmgfw.efi no go, but much further than I was thanks to you and @george1421.

                  1 Reply Last reply Reply Quote 0
                  • S
                    Sebastian Roth Moderator
                    last edited by Sebastian Roth May 29, 2020, 11:21 AM May 29, 2020, 5:18 PM

                    @brakcounty said in Boot FOG on client PC using a special partition?:

                    The ls command shows hd0 hd0,msdos hd1 hd1,msdos, hd2 hd2, msdos.

                    Well then you have a legacy MSDOS partition layout and can’t use the GPT stuff! Have you tried the good old MBR chainloader style yet?

                         insmod part_msdos
                         insmod chain
                         rootnoverify (hd0,0)
                         chainloader +1
                    

                    Play with the numbers (at line rootnoverify) till you hit the right partition/disk.

                    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

                    D 1 Reply Last reply May 29, 2020, 5:20 PM Reply Quote 0
                    • D
                      DBCountMan @Sebastian Roth
                      last edited by May 29, 2020, 5:20 PM

                      @Sebastian-Roth The windows partition I’m trying to boot from is a GPT-EFI bootable system. Is that “+1” always supposed to follow the chainloader entry?

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator
                        last edited by May 29, 2020, 5:25 PM

                        @brakcounty Sorry, just updated my post again.

                        The windows partition I’m trying to boot from is a GPT-EFI bootable system.

                        On the GRUB command line run the following commands, take a picture of the screen and post that here:

                        set pager=1
                        insmod part_gpt
                        insmod part_msdos
                        ls
                        

                        Is that “+1” always supposed to follow the chainloader entry?

                        Yes, as far as I know.

                        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

                        G 1 Reply Last reply May 29, 2020, 5:49 PM Reply Quote 0
                        • D
                          DBCountMan
                          last edited by May 29, 2020, 5:30 PM

                          IMG_20200529_132731.jpg

                          1 Reply Last reply Reply Quote 0
                          • S
                            Sebastian Roth Moderator
                            last edited by May 29, 2020, 5:44 PM

                            @brakcounty Don’t think there is a GPT partition layout on any of those three disks. While hd2 doesn’t even seem to have partitions at all. Maybe this is the USB key? Can you boot to Windows and post a picture of the disk management view? Shall see if it’s MBR or GPT there.

                            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
                            • D
                              DBCountMan
                              last edited by May 29, 2020, 5:47 PM

                              It probably is the USB drive. I don’t think this particular environment is seeing the hard drive in the PC. I know for a fact that the Windows drive is GPT and EFI because I converted it to GPT before I imaged it, also made sure the image itself was created as GPT. I am able to boot from the Windows EFI partition normally.

                              1 Reply Last reply Reply Quote 0
                              • G
                                george1421 Moderator @Sebastian Roth
                                last edited by May 29, 2020, 5:49 PM

                                @Sebastian-Roth FWIW: the efi boot partition is almost always vfat (fat32) format unencrypted even if bitlocker is enabled on the disk. Windows needs some way to start off the booting process.

                                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
                                • D
                                  DBCountMan
                                  last edited by DBCountMan May 29, 2020, 12:16 PM May 29, 2020, 6:07 PM

                                  I found the Windows partition it is actually (hd1,msdos1). I ran "ls (hd1,msdos1) and it showed filesystem ntfs label “Windows” and the UUID. But when I try to run the command “chainloader (hd1,msdos1)/EFI/Microsoft/Boot/bootmgfw.efi” or “chainloader (hd1,msdos1)/EFI/Microsoft/Boot/bootx64.efi”, says file not found.

                                  Correction: This drive was MBR with only one partition. Sorry about that.

                                  G 1 Reply Last reply May 29, 2020, 6:19 PM Reply Quote 0
                                  • D
                                    DBCountMan
                                    last edited by May 29, 2020, 6:12 PM

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • G
                                      george1421 Moderator @DBCountMan
                                      last edited by george1421 May 29, 2020, 12:21 PM May 29, 2020, 6:19 PM

                                      @brakcounty ref from: https://wiki.gentoo.org/wiki/GRUB2/Chainloading

                                      menuentry 'Microsoft Windows 7 or Windows 8 (on sdb1)' --class windows {
                                              insmod part_msdos
                                              insmod ntfs
                                              insmod search_fs_uuid
                                              insmod ntldr
                                              search --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1 2ABF87DC395CFC02
                                              drivemap (hd1,msdos1) (hd0,msdos1)
                                              #Or, "drivemap (hd1,msdos2) (hd0,msdos1)" for those with Windows installed on sdb2)
                                              ntldr /bootmgr
                                      }
                                      

                                      I’m not sure what the apha characters are at the end of the search line, but this looks like a very good menu structure where it looks for windows instead of you telling it where to look.

                                      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
                                      • D
                                        DBCountMan
                                        last edited by DBCountMan May 29, 2020, 12:27 PM May 29, 2020, 6:27 PM

                                        that didnt work for me. said ntldr and drivemap not a command.

                                        1 Reply Last reply Reply Quote 0
                                        • D
                                          DBCountMan
                                          last edited by DBCountMan May 29, 2020, 12:54 PM May 29, 2020, 6:41 PM

                                          Got it working! This worked for me after making sure the drive was changed to GPT and I also labeled the efi parition as “EFI”:
                                          menuentry “Windows” {
                                          insmod chain
                                          insmod ntfs
                                          insmod part_gpt
                                          set root=(hd1,gpt2)
                                          chainloader (hd1,gpt2)/efi/microsoft/boot/bootmgfw.efi
                                          }

                                          Just realized that the set root part is redundant. I am partitoning the drive now to copy the files from the FOG USB key then tell the UEFI on the PC to boot from this new GRUB partition first. Looking good!

                                          1 Reply Last reply Reply Quote 1
                                          • 1
                                          • 2
                                          • 2 / 2
                                          2 / 2
                                          • First post
                                            23/36
                                            Last post

                                          166

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project