So then the 13.04 release came along. Unfortunately I have only had trouble with earlier upgrades and always ended up in a FUBAR and consequently reinstalling entire system. Would like to avoid that this time.

I have a box with Ubuntu 12.10 32bit running Gnome 3 classic + various services like BIND9, MySQL, Postfix, Apache, ++.

After some back and forth I've decided to create a clone of current system. If system breaks I can do a revert.

Question is how to best do this. I can do a clone of the partition with dd, but guess the upgrade would also mean some changes to GRUB and MBR.

The current layout is approximately:

sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0   7.6G  0 part [SWAP]
├─sda2   8:2    0  93.5G  0 part /mnt/old_ubu_11.04
├─sda3   8:3    0  93.5G  0 part /
├─sda4   8:4    0     1K  0 part 
└─sda5   8:5    0   737G  0 part /mnt/storage
sdb      8:16   0   1.8T  0 disk 
└─sdb1   8:17   0   1.8T  0 part /mnt/develop
sdc      8:32   0   1.8T  0 disk 

System and home reside at sda3.

First thought would be something like:

dd if=/dev/sda3 of=/mnt/storage/ubuntu_12.10.img
dd if=/dev/sda bs=512 count=1 of=/mnt/storage/MBR.img
dd if=/dev/sda bs=512 skip=1 count=3 of=/mnt/storage/POST_MBR.img

Problem with this approach, (I guess), is pseudo file systems like /sys and /proc (so I should probably do it from a live CD/USB). Would it be an issue writing such images back?

Would clonezilla or something similar be better? (Never used it).

Also; what I would really like to do is use a virtual system. Guess it would be an 80% or so likeness (due to HW layers etc.). And then run do-release-upgrade in that by e.g. VirtualBox. Could this be a viable option?

Notes on changes

I add this as it was what my question in part started out as – and could probably be helpful to others. I also wonder if it gives an accurate picture of what is going to be updated. Any confirmation on this would be great as well.


apt-get --simulate dist-upgrade, does not simulate upgrade from one release to another. E.g. as explained here:

apt-get dist-upgrade

The same as the above (apt-get upgrade sic.), except add the "smart upgrade" checkbox. It tells APT to use "smart" conflict resolution system, and it will attempt to upgrade the most important packages at the expense of less important ones if necessary.

"apt-get dist-upgrade" does not perform distribution upgrade.

(See a lot of notes and "answers" around the web that states this as an option.)

After some fooling around I tied the following:

cd /etc/apt/
sudo cp sources.list sources.list_bak
sudo vi sources.list

# in vim:
# Yes, I can do sed -i 's/...' but like to have bit more control.

# make log
sudo apt-get update
cd /tmp
apt-get --simulate dist-upgrade > quantal-2-raring.log 2>&1

# and better to be safe then sorry so at once:
su -c 'cp sources.list sources.raring && mv sources.list_bak sources.list && apt-get update'

Giving me this list of changes.

As a side note:

The /etc/apt/sources.list states:

# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.

That document is outdated and should probably (also) link to this.


/sys /dev etc. temp and memdisk fs will not be on your backup as dd will make the dump from the disk only as of the raw read. What will change is the temporary files made to /var/run etc that will remain on your dump. Yes a disk or usb boot could help to override this.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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