0

Possible Duplicate:
How to convert Wubi install into regular install?

12.04 LTS wubi "F:\ image on partition" and "windows7 on C:\"

Wanted to test before using full install. However I kinda customized the looks and got lots of SW installed and now I don't like the idea of reinstalling the whole thing all over again :D...

Due to previous cloning my broken 320GB HDD to 500GB HDD I had ca. 180GB unallocated which I made as NTFS and it's drive F:. I would like to make that drive ext with full ubuntu 12.04 but I'd like, if possible, to make my current wubi installation a full one.

Now I read that it's possible to migrate wubi to full. But..

Is it safe with Grub and windows 7 installed?

Is there alternative how to keep all the installation/current state of ubuntu and get it to the new full install?

1
  • Please note the edits I made in the answer since first posting. Oct 17, 2012 at 21:13

2 Answers 2

1

You should be able to use tar to backup your /home, /etc, /usr, /bin, /sbin, /lib directories. After the new install you can then extract the "tarred" files to the proper directories.

Adapted from user Heliodode on Ubuntu Forums: Source

Hi, and welcome to the Heliode guide to successful backing-up and restoring of a Linux system!

Edited out: interesting but unneeded banter.

1: Backing-up

Edit: more banter

To do this, become root with

sudo su

and go to the root of your filesystem (we use this in our example, but you can go anywhere you want your backup to end up, including remote or removable drives.)

cd /

Now, below is the full command I would use to make a backup of my system:

tar cvpzf backup.tgz --exclude=/proc --exclude=/lost+found --exclude=/backup.tgz --exclude=/mnt --exclude=/sys /

Edit add: The file you create will be very large. You may wish to direct this backup to an external device. If you do then change the file name (backup.tgz) to /media/external-device/backup.tgz . Then, exclude the /media directory ` --exclude=/media

Now, lets explain this a little bit. The 'tar' part is, obviously, the program we're going to use.

'cvpfz' are the options we give to tar, like 'create archive' (obviously), 'preserve permissions'(to keep the same permissions on everything the same), and 'gzip' to keep the size down.

Next, the name the archive is going to get. backup.tgz in our example.

Next comes the root of the directory we want to backup. Since we want to backup everything; /

Now come the directories we want to exclude. We don't want to backup everything since some dirs aren't very useful to include. Also make sure you don't include the file itself, or else you'll get weird results. You might also not want to include the /mnt folder if you have other partitions mounted there or you'll end up backing those up too. Also make sure you don't have anything mounted in /media (i.e. don't have any cd's or removable media mounted). Either that or exclude /media.

Well, if the command agrees with you, hit enter (or return, whatever) and sit back&relax. This might take a while.

Afterwards you'll have a file called backup.tgz in the root of your filessytem, which is probably pretty large. Now you can burn it to DVD or move it to another machine, whatever you like!

EDIT2: At the end of the process you might get a message along the lines of 'tar: Error exit delayed from previous errors' or something, but in most cases you can just ignore that.

Alternatively, you can use Bzip2 to compress your backup. This means higher compression but lower speed. If compression is important to you, just substitute the 'z' in the command with 'j', and give the backup the right extension. That would make the command look like this:

tar cvpjf backup.tar.bz2 --exclude=/proc --exclude=/lost+found --exclude=/backup.tar.bz2 --exclude=/mnt --exclude=/sys /

2: Restoring (In this case, after you do a full install. Make sure to use the same version of install disk as the system you are backing up.)

Warning: Please, for goodness sake, be careful here. If you don't understand what you are doing here you might end up overwriting stuff that is important to you, so please take care!

Once again, make sure you are root and that you and the backup file are in the root of the filesystem.

sudo su
cd /

One of the beautiful things of Linux is that This'll work even on a running system; no need to screw around with boot-cd's or anything. Of course, if you've rendered your system unbootable you might have no choice but to use a live-cd, but the results are the same. You can even remove every single file of a Linux system while it is running with one command. I'm not giving you that command though!

Well, back on-topic. This is the command that I would use:

tar xvpfz backup.tgz -C /

Or if you used bz2;

tar xvpfj backup.tar.bz2 -C /

WARNING: this will overwrite every single file on your partition with the one in the archive!

Just hit enter/return/whatever and watch the fireworks. Again, this might take a while. When it is done, you have a fully restored Ubuntu system! Just make sure that, before you do anything else, you re-create the directories you excluded:

mkdir proc mkdir lost+found mkdir mnt mkdir sys etc...

And when you reboot, everything should be the way it was when you made the backup!

2.1: GRUB restore Now, if you want to move your system to a new harddisk or if you did something nasty to your GRUB (like, say, install Windows), You'll also need to reinstall GRUB. There are several very good howto's on how to do that here on this forum, so i'm not going to reinvent the wheel. Instead, take a look here.

There are a couple of methods proposed. I personally recommend the second one, posted by remmelt, since that has always worked for me.

4
  • Thanks.. But do I need to do some GRUB restoration? Wouldn't it screw my win7 installation?
    – Laci
    Oct 17, 2012 at 21:27
  • Yes. since this would write the grub info from wubi you might have to boot to a live CD and run update-grub . Oct 17, 2012 at 22:46
  • It wouln't screw your Windows7 install since grub recognizes it and will make an entry for it. Oct 17, 2012 at 22:50
  • I guess I should also ask, do you understand partitioning and seting up a standard dual boot? Oct 17, 2012 at 22:52
0

The only way I am aware of to attempt to do what you are doing is to sync all of your software to Ubuntu Software Center and backup your files. Then delete the Wubi and install Ubuntu in the partion

3
  • There is a way, but it is difficult. See the above answer.
    – nanofarad
    Oct 17, 2012 at 21:16
  • sounds good. But would it work also for the software not installed with software center? Manually installed .deb packages?
    – Laci
    Oct 17, 2012 at 21:18
  • I believe so, yes
    – chad
    Oct 17, 2012 at 22:59

Not the answer you're looking for? Browse other questions tagged .