Capturing a Linux Image?



  • FOG 1.5.2
    CentOS 7.5

    I have so far used FOG to capture and deploy Windows 7 images for a specific model of machine. The general process is I install/update Windows 7 on a physical machine and the software I need, then sysprep the machine and power down, then capture the image. This way when I deploy it, the host name is random, SID isnt the same, etc.

    I have never done this process on a Linux host, in this case Fedora 28 Workstation. Is there something like sysprep for fedora that generalizes the installation?

    This will be done on a Dell XPS laptop, NOT within a VM. So far all the directions I have found online are in regards to virtual machines and prepping them for imaging.

    Also, is prep/image a better approach then using pxe boot to install media and a kickstart file?

    Thanks



  • @george1421 Yep they are all exactly the same hardware.

    What are your thoughts on the Fedora issue I am having?

    Thanks again for all your help!


  • Moderator

    @zer0cool Are these physical machines pretty much the same kind of hardware? If they are pretty much the same hardware then you shouldn’t have to do anything special. Understand that bios images can only be deployed to bios hardware and the same is true for uefi. But linux should detect the new hardware and just load the right drivers. I have never done anything like sysprep with linux image cloning.



  • @george1421 said in Capturing a Linux Image?:

    Same rules apply virtual or hardware.

    I guess to elaborate I meant they were using tools specifically for virtual machines to prepare them for images.

    @george1421 said in Capturing a Linux Image?:

    In the VM world, I have a Centos 7 reference image setup as a template

    Yea if these were in ESXi/vSphere id just do a template, but they are physical machines :/

    @george1421 said in Capturing a Linux Image?:

    In your case you want to clone fedora27 then probably have a post install script that sets the host name and any other unique qualities of the target system.

    Do you mean like a generic kickstart file or something via FOG? I havent really looked much at FOG’s snapins/scripting abilities.

    In any case odd thing is @george1421, I cant get Fedora 28 to boot installer. It boots but goes to a live system, seemingly no install option. If I reboot I lose it all. I get a dialog to create user but never see a dialog to format/part the hdd.

    heres my config for it:

    kernel http://${fog-ip}/fog/os/fedora/ws/images/pxeboot/vmlinuz
    initrd http://${fog-ip}/fog/os/fedora/ws/images/pxeboot/initrd.img
    imgargs vmlinuz initrd=initrd.img root=live:http://${fog-ip}/fog/os/fedora/ws/LiveOS/squashfs.img repo=http://${fog-ip}/fog/os/fedora/ws
    boot || goto MENU
    

    as mentioned, it loads, boots to desktop and asks me for a user name/pw (creation) and then boots into gnome, but must be running like a live cd. I looked at drives and it see’s my HDD, but appears to be using a roughly 8GB partition to run off.

    I am at a bit of a loss since the CentOS entry I have is roughly the same and works as expected, booting the installer.

    Any help would be awesome


  • Moderator

    @zer0cool said in Capturing a Linux Image?:

    I have never done this process on a Linux host, in this case Fedora 28 Workstation. Is there something like sysprep for fedora that generalizes the installation?

    No sysprep is a windows “thing” there is nothing like that in the linux realm. You can just clone and go. You can say that linux is “generalized” upon each boot (as long as you don’t go and change like from a sata to a raid controllers, then you might have a little more work). The only thing you need to change is what is unique between the reference image and the target system.

    This will be done on a Dell XPS laptop, NOT within a VM. So far all the directions I have found online are in regards to virtual machines and prepping them for imaging.

    Same rules apply virtual or hardware.

    Also, is prep/image a better approach then using pxe boot to install media and a kickstart file?

    Better and faster. In the VM world, I have a Centos 7 reference image setup as a template, all new VMs are spun up by clone from template command in vSphere. All the clone does is copy the template and then power on the system.

    In your case you want to clone fedora27 then probably have a post install script that sets the host name and any other unique qualities of the target system.


Log in to reply
 

496
Online

6.2k
Users

13.6k
Topics

128.3k
Posts