Is it possible using fog to restore only part sda2 ?



  • Hi guys,

    I got an image of of Single Disk - Resizable using Partclone Compressed.
    The disk as 3 part. boot, os, data.
    Is it possible using fog to restore only part sda2 (the corrupted os) without restoring data part ?

       Device Boot      Start         End      Blocks   Id  System
    /dev/sda1   *        2048     2099199     1048576   83  Linux
    /dev/sda2         2099200    99753983    48827392   83  Linux
    /dev/sda3        99753984  1953524735   926885376   83  Linux
    

  • Developer

    @lepage said in Is it possible using fog to restore only part sda2 ?:

    I am not sure if you can see it … but from the filesystem when I do ls d1p* I see
    d1p1.img d1p2.img d1p3.img

    Absolutely. I know exactly where you are coming from. Yes it would be possible to implement. But can you see it from my perspective as well? Why implement it to enumerate the image files if it holds the truth only in case the image is still captured? Don’t get me wrong. I am not saying it wouldn’t be nice but as of now we have so many other things to fix in FOG and not many people helping that I can’t see us doing this. Sorry!

    If you have time and knowledge you are most welcome to add the feature and send a pull request on github. :-)



  • @Sebastian-Roth I am not sure I expressed correctly what I ment…
    We already have an existing image stored into fog… from that image I asked to deploy only partition 2. in which you showed me it can be done by modifying the image and by changing the menu Partition from Everything to “Partition 2 only”.

    My comment was about why do we see 12 options (10 partition) while may be it could be set dynamically to N the number of partition that image has.

    My suggestion was when you generate the edit image page, could an option be coded to dynamically list only the existing partition.

    I am not sure if you can see it … but from the filesystem when I do ls d1p* I see
    d1p1.img d1p2.img d1p3.img

    I know comment is beyond my original post I just wanted to make it clearer.
    thank you very much.


  • Developer

    @lepage said in Is it possible using fog to restore only part sda2 ?:

    Do you consider to list only the existing partition for that Partition menu?

    Think about it from the perspective when there is no image uploaded yet. You want to define an image that only ever uploads one of your partitions (for whatever reason). Then you need to be able to specify the partition number without FOG having seen the partition layout before.



  • Yes I am at Latest stable version is 1.5.5

    and yes it seam to be exactly what I needed. thank you !

    I have seen the option to choose a partition… but was to afraid to somehow corrupt my image and not been able to revert back to Everything.

    There is also that I see 10 partitions or 12 options in the list while I had only 3… which made me worry about the outcome of trying it with the wrong partition. Do you consider to list only the existing partition for that Partition menu?


  • Developer

    @lepage Depends on the FOG version you have. An option to select single partitions was added (I guess at least two years ago). Guess you don’t still run FOG 1.2.0 or 1.3.x but more like 1.5.x and you should have the option. Edit the image settings for this particular image. Just below the Image Type filed you should have another selection box named Partition. Here you’d select “Partition 2 only” instead of “Everything”. Just be aware that you need to have the correct partition layout already deployed to the machine because it won’t touch that but simply push out the second partition to the client. As well I need to mention that there was a bug in FOG 1.5.4 which would write the wrong image file to the partition if deployed as multicast to several machines. This is fixed in FOG 1.5.5 though.

    And keep in mind that if you upload that image from your master again you probably want to switch back to “Everything” first to actually capture the whole thing again.



  • Currently my only option to fix this - is to boot from a usb key with Parted Magic, and using partclone and copying sda2 from another disk/part. clone disk image to disk image…

    I really love not having to open another machine and doing this via fog.

    I tried to search before asking but did not find is this can be done using fog.
    if not then it is a suggestion ;)


 

569
Online

5.4k
Users

12.6k
Topics

118.8k
Posts