Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've finally gotten my laptop to a point where I'm happy with it, I'm somewhat new to linux, so it took me a while to get here.

Is there a way to take an image of the software that is currently installed, so if I reformat I can get back to the same spot more quickly?

If not an image, can I get a list of all the packages that are installed and the configuration settings? How do you guys reformat your machines to get them back to the way you like?

share|improve this question

2 Answers 2

up vote 1 down vote accepted

Simplest way I know how to do this is remastersys, though there's certain things to be aware of when doing so. The nice thing with debian and remastersys is you can backup and restore on a command line install (the ubuntu build needs some flavour of GUI since it uses ubiquity).The bad thing is you need some extra packages - squashfs-modules and either aufs-modules or unionfs-modules, and trying to run remastersys without them results in VERY bad things happening. You're also 'restricted' to a 4gb image.

This will however let you create a 'respin' with just your packages installed, or work as a bootable backup that will boot into your install and restore it to a fresh install. Its awesome and worth a try.

share|improve this answer

You can do both things you are suggesting.

  1. Make an image: Use clonezilla to make an image of your hard drive. You can restore that image after formatting.

  2. Get a list of installed software:

    sudo dpkg --get-selections > list.txt
    

    You can then reinstall them using this command:

    sudo apt-get install `awk '{print $1}' list.txt
    

    Package settings are usually in the /etc directory or in your $HOME. In general, it is a good idea to have $HOME in a separate partition. You do not need to reformat this partition if you reinstall so your personal settings will always be saved. For system-wide settings you can make a backup of /etc and copy them back to your newly formatted drive.

Bear in mind that there should be absolutely no reason to format your disk unless you want to install a new system.

share|improve this answer
    
...I do not like your last statement. There is no need to bring *nix vs Windows vs blah elitism in here. There is nothing about Windows that forces a reinstall, just as there is nothing in Linux that says you can't mess up a system badly enough to need a reinstall. Any OS with enough freedom can be screwed up badly enough to need reinstallation - and not many of us are happy with OSes as locked down as is typical for phones/tablets. –  Bob Feb 23 '13 at 11:19
1  
@Bob There is indeed nothing in Windows that forces a reinstall. However, most Windows users regularly reformat their drive. See, for example, here, here and here. This is simply not true in the *nix world. –  terdon Feb 23 '13 at 11:28
1  
I can think of one... serious user error. Its sometimes faster to reinstall than to fix. There's also hardware failure, which would suck. –  Journeyman Geek Feb 23 '13 at 11:28
    
@JourneymanGeek sure, all I am saying is that there is no need to format unless you need to reinstall for some reason. –  terdon Feb 23 '13 at 11:31
1  
@Bob I remember the days before NTFS quite clearly thank you as do many users and habits learned early on are often hard to change.In any case, the OP specifically asked about _re_formatting, something that users in the windows world (as evidenced by the posts I linked to) are used to doing quite often. I am not saying this is a good idea, it is just true that a lot of windows users believe (for reasons that may or not be correct) that reformatting every few months or years is essential. All I am saying is that this is not the case for Linux. –  terdon Feb 23 '13 at 11:45

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.