Manually Create a Raw Image



  • I have a few questions about the Process of creating a Raw Image.

    I’ve been looking through the fog.scripts and noticed that you first compress the Image and then partclone.ntfs it?
    Also i’ve been searching the part that does the RAW Image. I would like to be able to manually invoke a raw image, which would then be copied onto a Harddrive.
    I took a look at a raw image created by fog, which is only one file compressed with gzip.
    Could someone maybe explain the image creation process? (just the basics, i’m no linux noob ;))
    dd the drive and pigz it?


  • Senior Developer

    What line 287 and such are for, is to detect the filesystem format and create the partition image file. This means if it’s not one of the known supported types, it’s just going to create a raw image of that partition, but all other partitions will be able to use the partclone.{$fstype} file.



  • aah ok I see, this makes sense.
    this is exactly what I needed!

    So in Line 381 to 384 of fog.upload you define the imgtype as mps, which then gets executed on line 227?
    and following the code until on line 287 gets executed as partclone.imager -c -s $part -O /tmp/pigz1 -N -f for each partition?
    When I look at a already created raw image, it’s only one file.
    Is the Image creation on different partitions, which in the end get combined into one?

    Thank you very much for that quick answer


  • Senior Developer

    [quote=“darKpoiSon, post: 32080, member: 24148”]I have a few questions about the Process of creating a Raw Image.

    I’ve been looking through the fog.scripts and noticed that you first compress the Image and then partclone.ntfs it?[/quote]
    I guess I don’t understand this question enough. While the “commands” look like they’re compressing the image first, this is not the case. It loads a background tasking of the first-in first-out (fifo) file which is consistently running pigz/gzip compression on it. It won’t actually start compressing anything until the data is written to the fifo file itself (/tmp/pigz{1,2,3}). So what “really” happens is partclone starts writing the image data to the fifo file, and as that is being written pigz is compressing the data into the d1p{partiitionnumber}.img or rec.img.000 or sys.img.000 file.
    [quote=“darKpoiSon, post: 32080, member: 24148”]Also i’ve been searching the part that does the RAW Image. I would like to be able to manually invoke a raw image, which would then be copied onto a Harddrive.
    I took a look at a raw image created by fog, which is only one file compressed with gzip.
    Could someone maybe explain the image creation process? (just the basics, i’m no linux noob ;))
    dd the drive and pigz it?[/quote]

    Basically, this is what’s happening. Dd is being written, but so you have a “progress” window, we’re using the partclone tool, partclone.imager which takes a dd copy of the drive. Lines 381 to 384 of the fog.upload script is what performs this tasking for you.

    Hopefully this helps.


Log in to reply
 

452
Online

39209
Users

10856
Topics

103338
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.