Ubuntu reformat

Silver-0-surfer

Well-Known Member
Joined
Jan 5, 2008
Messages
317
Reaction score
7
Location
CPT
Helooo

I think they I have the coolest Ubuntu on my PC at the moment (I'm still a n00b) I have cool apps ad themes and driver, updates etc etc. I know have to reformat my PC, is there anyway to back to OS up on a DVD and them do all my installs from that DVD or something?without re-downloading everything?? I'm doubtfull but hopefull.

thnx
 
Note that I haven't tried this, but as far as know it should work without problems.
First of all, all the packages you downloaded are in /var/cache/apt/archives. When you've reinstalled Ubuntu, just move those packages back there.

Now get you the list of packages and save them to myselections.txt

dpkg --get-selections > myselections.txt

Also, make sure to backup your /etc/apt/sources.list and to copy to the new install, then update (sudo aptitude update).

Now you can restore these selections using the following
dpkg --clear-selections
dpkg --set-selections <myselections.txt
sudo apt-get dselect-upgrade

Keep in mind that any configurations you had won't be saved so you'll need to back up those manually (most programs store their config file in your home dir so you can just copy those and restore them later).

Edit: You can also go the GUI route.
In the File of Synaptic there's a 'Save Markings As...' entry. In the resulting dialog, be sure to select 'Save full state, not only changes.'

Save this, which you can later restore using 'File -> Read Markings' in Synaptic.
 
Last edited:
You are looking for APTonCD, this backup's all your applications, then when you reinstall just install aptonCD then use it to restore the DVD or ISO image of your cached applications.

Then you can reinstall without downloading everything again.
 
hey. thanks for the help. Gonna do some reading up. I think APTonCD is the best bet. Will be doing the format 2mo so holding thumbs, btw sorry about the opening post (was in a hurry) I basically wanted to back all my apps and updates onto dvd so I don't have to download them from the net again.
 
you can even do a crude backup of a system using something like tar. But this is not really advisable as everything has to be the same when you restore.
 
Another method is to get Hirens Boot CD. It comes with a few disc imaging applications, though none of them make a bootable disc to restore from. I have been searching the net for such a solution, though my quest for this holy grail has been fruitless, as was all of the quests for the holy grail *lol*.

Though yes, you boot from Hiren, use one of the imaging apps, point it to a vacant hard drive and make your backup. Then you can restore your PC, OS et al from that image.
 
Linux is not Windows, you do not need any special apps and whatnot to do a complete system backup. You can do it yourself if you choose.

Do you have a spare harddrive? Can you borrow one for a day or so? Just big enough to take your entire installation as is.

How do I find out how much disk space has been used up?
In a terminal:
df -h

Now you know how much space you need to do a COMPLETE backup.

Install the new backup harddrive, boot the Ubuntu liveCD but do not use the install option, use the "I'm trying this stuff out" option that takes you to a fully functional desktop.

Now in a terminal:
mkdir /mnt/hd1
mkdir /mnt/hd2

mount /dev/[original Ubuntu partition I want to backup] /mnt/hd1
mount /dev/[backup harddrive] /mnt/hd2

cp -r --preserve /mnt/hd1/* /mnt/hd2/*

This will take a while depending on how large your installation was.

Now you have a FULL system backup! I know you do not need to copy /dev /proc /var, but on most modern distros they get flushed with your next boot anyway so no harm done. Just make sure when you do this that those dirs are not in use by the OS otherwise... wait, just try it and after one hour on cp /proc tell me what you learned.
:p

To get your original installation back after the format, just do everything over and copy all the files back.

Reinstall grub:
sudo grub
find /boot/grub/stage1
root (hd0,0) <--If you only use Linux and no Windows
setup (hd0)
quit

And I think you should be done.

I do not know the setup of your system or what you are trying to do, but if you only want to get more space for your Linux install Gparted and grow and shrink the partions as you need.
 
great response.Thanks.
Yes I do have other Hard-drives and I didn't read through your whole post, might take me a while on a monday so sorry If this was mentioned but if I do back it up on a hard-drive can I change the size of the partition?
like previously it was installed on a 250gb but was only using like 10-20gb could I make the partition that ubuntu uses about 50gb and then do a dual boot with windows with the remainder?
 
Install Gparted in Ubunut and have a look at what it can do, it might just safe you a lot of trouble!
:)
 
man dd

pretty much creates an img file.

dd if=/dev/hda3 of=/home/avert/backup_set_2.img

or something like that (if=input file,of=output file)

google it to find more options maybe
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X