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

    Cloning a Centos7 installation

    Scheduled Pinned Locked Moved
    Linux Problems
    3
    11
    8.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.
    • sudburrS
      sudburr
      last edited by sudburr

      I would like to clone my CentOS 7 and my CentOS 7+ Fog 4752 Hyper-V VMs onto a physical machines.

      It is a minimal installation on a single disk. I’m just installing the OS, then shutting down to capture then deploy, and for the FOG install, doing my usual thang.

      Each time, build 4752 captures the way it’s meant to, then deploys without issue, but when Centos tries to boot, it dumps to Dracut.

      I have tried installing it with LVM and the XFS File System, with Standard Partitions, and ext4 File System.

      This is the dump from a pure LVM attempt:

      Reached: Target Paths
      Reached: Target Basic System
      Warning: Could not boot
      Warning: /dev/centos_centos7/root does not exist
      Warning: /dev/centos_centos7/swap does not exist
      Warning: /dev/mapper/centos_centos7-root does not exist
      Starting Dracut Emergency Shell...
      ...
      Entering emergency mode.
      

      What have I done wrong this time?

      [ Standing in between extinction in the cold and explosive radiating growth ]

      1 Reply Last reply Reply Quote 0
      • sudburrS
        sudburr
        last edited by

        I’m going to try a different box and see if it may be a hardware compatibility issue.

        BTW, on the completed VM with FOG, SELinux is disabled.

        [ Standing in between extinction in the cold and explosive radiating growth ]

        1 Reply Last reply Reply Quote 0
        • sudburrS
          sudburr
          last edited by sudburr

          Okay, so that’s the deal. The controller.

          The changing disk controller tripped it up.

          I turned off AHCI mode on the physical box and it now works.

          The next step is, how can I fix this so I can retain the benefits of AHCI over compatibility mode?

          [ Standing in between extinction in the cold and explosive radiating growth ]

          1 Reply Last reply Reply Quote 0
          • sudburrS
            sudburr
            last edited by

            Could a moderator move this thread into Linux problems for me please?

            So I found this very specific page: How to install the AHCI mode drivers in an existing installation of CentOS that only has IDE support … but it didn’t work.

            1. Add the line: “alias scsi_hostadapter ahci” to /etc/modprobe.conf

            2. Rebuild your initrd with this command:
              mkinitrd -f -v /boot/initrd-$(uname -r).ahci.img $(uname -r)

            3. Rename the old init.rd to a backup and mv the new one where the old one was:
              mv /boot/initrd-$(uname -r).img /boot/initrd-$(uname -r).img.bak
              mv /boot/initrd-$(uname -r).ahci.img /boot/initrd-$(uname -r).img

            That first part of #3 can’t find the file on my LVM sample.

            [ Standing in between extinction in the cold and explosive radiating growth ]

            Wayne WorkmanW S 2 Replies Last reply Reply Quote 0
            • Wayne WorkmanW
              Wayne Workman @sudburr
              last edited by

              @sudburr said:

              Could a moderator move this thread into Linux problems for me please?

              done

              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!
              Daily Clean Installation Results:
              https://fogtesting.fogproject.us/
              FOG Reporting:
              https://fog-external-reporting-results.fogproject.us/

              1 Reply Last reply Reply Quote 0
              • Wayne WorkmanW
                Wayne Workman
                last edited by

                What are you using to clone? Fog? Clonezilla?

                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!
                Daily Clean Installation Results:
                https://fogtesting.fogproject.us/
                FOG Reporting:
                https://fog-external-reporting-results.fogproject.us/

                1 Reply Last reply Reply Quote 0
                • sudburrS
                  sudburr
                  last edited by

                  FOG of course. Build 4752 to be precise.

                  [ Standing in between extinction in the cold and explosive radiating growth ]

                  Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                  • Wayne WorkmanW
                    Wayne Workman @sudburr
                    last edited by

                    @sudburr Do you think that because you chose the “minimal” installation, that it only installed the drivers it needed to operate? Perhaps if you did a full installation, it might have the drivers already. Just a thought.

                    I don’t know much about drivers in Linux… it’s totally foreign to me to be completely honest. I wish someone could explain it to me in a way that didn’t involve rocket science or learning assembly language. 😛

                    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!
                    Daily Clean Installation Results:
                    https://fogtesting.fogproject.us/
                    FOG Reporting:
                    https://fog-external-reporting-results.fogproject.us/

                    1 Reply Last reply Reply Quote 0
                    • sudburrS
                      sudburr
                      last edited by

                      I thought of that too. I just installed an infrastructure server with a bunch of file storage drivers. I will know tomorrow how it is.

                      [ Standing in between extinction in the cold and explosive radiating growth ]

                      1 Reply Last reply Reply Quote 0
                      • S
                        Sebastian Roth Moderator @sudburr
                        last edited by

                        @sudburr

                        So I found this very specific page: How to install the AHCI mode drivers in an existing installation of CentOS that only has IDE support … but it didn’t work.

                        Add the line: “alias scsi_hostadapter ahci” to /etc/modprobe.conf

                        Rebuild your initrd with this command:
                        mkinitrd -f -v /boot/initrd-$(uname -r).ahci.img $(uname -r)

                        Rename the old init.rd to a backup and mv the new one where the old one was:
                        mv /boot/initrd-$(uname -r).img /boot/initrd-$(uname -r).img.bak
                        mv /boot/initrd-$(uname -r).ahci.img /boot/initrd-$(uname -r).img

                        That first part of #3 can’t find the file on my LVM sample.

                        Maybe the file was just named a little different on your system. There definitely should be something like /boot/init… on your system.

                        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
                        • sudburrS
                          sudburr
                          last edited by sudburr

                          So the problem isn’t the cloning but that I was transferring from an IDE/Compatible VM to an Physical system with AHCI enabled. Setting the physical to IDE/Compatible mode fixed that. However IDE mode is not a solution. I required building AHCI into the kernel prior to deployment.

                          Thanks to some help from centos.org forums I have a working solution.

                          I’ve moved the OS update and some other new code that forces the recompiled kernel to include AHCI drivers to the final mastering.

                          Server building occurs for me in several steps.

                          1. Install the Minimal Server to a VM, nothing else, no updates
                          2. Purpose the VM (in this case for FOG and all that entails, no updates)
                          3. Master the image (every update and generalizing code)
                          4. Capture the image
                          5. Distribute the image
                          6. Align the Deployed system

                          I’ve added the following code to the Mastering:

                          03> Master the Image
                          	## Login REMOTELY with Kitty ( http://kitty.9bis.net/ )
                          	## Elevate Access Level
                          	## --
                          	## Disable root access via SSH (CentOS only)
                          	## Direct next Kernel recompilation update to include AHCI drivers & be HW generic
                          	## Clean & Update the OS
                          	## Shutdown
                          
                          sudo su
                          
                          if [ -f /etc/centos-release ]; then
                          sed -i "s|#PermitRootLogin yes|PermitRootLogin no|g" /etc/ssh/sshd_config
                          systemctl restart sshd.service
                          sed -i 's|#add_drivers+="|add_drivers+="ahci|g' /etc/dracut.conf
                          sed -i 's|#hostonly="yes|hostonly="no|g' /etc/dracut.conf
                          yum clean all
                          yum makecache
                          yum update -y
                          shutdown now
                          fi
                          

                          [ Standing in between extinction in the cold and explosive radiating growth ]

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

                          198

                          Online

                          12.0k

                          Users

                          17.3k

                          Topics

                          155.2k

                          Posts
                          Copyright © 2012-2024 FOG Project