Can I reduce a imegeforlinux image after making it

Discussion in 'all things UNIX' started by sdmod, Jul 7, 2025 at 11:14 PM.

  1. sdmod

    sdmod Shadow Defender Expert

    Joined:
    Oct 28, 2010
    Posts:
    1,225
    I'm always asking stupid questions and I have asked a similar question previously. Please forgive me, I'm not that technical and a slow taker upper.
    I made an iimageforlinux mage of my full disk which contains Linux Mint and my data on a 1TB drive as a backup.. That Mint and data does not take up much space in it's host drive (although it is also 1TB) and I'd like to maybe reduce the imageforlinux image disk size before restoring to a smaller drive
    I only had a 1TB drive at the ttime available to house the imageforlinux backup
    Can I reduce the size of that backup image using bootit bare metal to reduce it's size after I've created it or should I have done that before saving the image to the 1TB drive? Using partitions etc.




    I had a bad Windows hardrive failure recently and PSU smoked and 'bang'! (fan got blocked) and I'm a bit timid. I did have a backup and managed to restore most of my data etc but lost most of 2025 including emails because I hadn't backed up for a while and it took me by surprise as the 3.5 drive failed suddenly. Actualy it smoked too.
    I know that the old saying was 'backup , backup, backup' and I always mean to bear tat in mind but I got a bit behind. I have the backup but the pc is dead and windows doesn't like to go to another pc.
    I have all my data to the end of 2024 which I can read using a usb adapter but no booting into windows on different hardware etc.
     
  2. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,724
    Location:
    NSW, Australia
    sdmod,

    You can't resize an IFL image but maybe it doesn't matter.

    Let's say you have 500 GiB of data on a 1 TiB drive. You create an image of the drive. If you use the Compact Data option in an IFL Restore you will be able to restore the image to a 500 GiB drive. Or any size drive from 500 to 1000 GiB.

    Typically, the 500 GiB of data could be spread over the entire 1 TiB drive and you would need a 1 TiB drive to do the restore. But not with the Compact Data option.

    Does this help?
     
    Last edited: Jul 8, 2025 at 12:06 AM
  3. sdmod

    sdmod Shadow Defender Expert

    Joined:
    Oct 28, 2010
    Posts:
    1,225
    Thanks for the information Brian K. I think that helps. The data on the IFL backup image is not even 500gb. It's very little as I have just basic Linux Mint a few extra installed apps and a little bit of data of my own configured to my liking.
    I've never played around with any of the options or extras in ImageforLinux or Bootit Bare metal previously...somehow I've become fearful of messing up by 'delving'. A certain anxiety crept in somwhere. as the years have gone by.
    I used to find it quite exciting but these days I find it more stressful. I often think about the large amount of personal data that people must lose when things crash these days. I've had a couple of major crashes and losses over the years but I'm new to Linux so I don't have as much 'invested' as on my previous Windows system.
    In Linux it has taken me quite a while to configure and organise to my liking and I just didn't want to lose that by my own stupidity.
    I think with some of these drive manipulation programs that it is essential to keep checking that you are on the right drive when operating when dipping into one thing and then another. I've been using the NTFS formatting option for preparing my drives to restore to.
     
  4. Brian K

    Brian K Imaging Specialist

    Joined:
    Jan 28, 2005
    Posts:
    12,724
    Location:
    NSW, Australia
    Let us know if you need more information concerning restoring the image.

    Do you just have a single Linux Mint partition in the image? No Windows partitions?
     
  5. Mrkvonic

    Mrkvonic Linux Systems Expert

    Joined:
    May 9, 2005
    Posts:
    10,396
    One thing you can do, regardless of the imaging, is to mount the image. Then, you can copy all of the data from the Linux home partition to a different location/disk, and reuse it if you ever have to reinstall Mint. The copy of your home will include all your configurations so you won't lose anything. Worst case, you may need to reinstall a few programs, but their configurations will be in place.

    There are a few other clever tricks you could try, but as you said, you're not technical, so I'm not going there.

    Therefore:

    Mount the partition. Copy all of the Linux /home data (including all the dot files and folders, like .config) to a third location.
    If restore doesn't work, create a partition table.
    Reinstall Mint and any programs you need. Don't run any of them just yet.
    Copy all of the /home data over.
    Restart and enjoy your old session + app configs.

    Makes sense?

    Mrk
     
  6. sdmod

    sdmod Shadow Defender Expert

    Joined:
    Oct 28, 2010
    Posts:
    1,225
    Yes Brian K, I have just a Linux partition in the imageforlinux image.
     
  7. sdmod

    sdmod Shadow Defender Expert

    Joined:
    Oct 28, 2010
    Posts:
    1,225

    Thanks Mrk Yes, makes sense.

    PS love your articles.
     
  8. sdmod

    sdmod Shadow Defender Expert

    Joined:
    Oct 28, 2010
    Posts:
    1,225
    Thanks Brian K

    Booting from the Imageforlinux dvd I managed to restore from the 1TB IFL image (using external usb to sata adapter to hold the backup image drive) to 5 laptops using your 'compact data' tip. The drives in the laptops were a mixture of 500gb and 700 and something gb (I think) and all completed successfully. As I mentioned I didn't have a great deal of stuff on my backup so it was failrly fast.
    I feel a bit more comfortable now with something backed up and saved.
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.