Saturday, October 20, 2007

Upgrade Ubuntu from an ISO image

Here is a tip I ended using on a machine that didn't have a CD drive and no connection to the internet. It already had Ubuntu installed and needed to upgrade to the next release. First you need to download the Ubuntu Alternate CD image (text base install) ubuntu-7.10-alternate-i386.iso
  1. Mount the downloaded ISO image in the CD drive mounting point by typing the following:
    sudo mount -t iso9660 ubuntu-7.10-alternate-i386.iso /cdrom -o loop
  2. Run the upgrading application found on the CD.
    gksu "sh /cdrom/cdromupgrade"
  3. The machine will now upgrade and eventually reboot. You may now remove the CD entry to the image found in the file: /etc/apt/sources.list
You might want to keep the image for software sources and mount it anytime you wish to install new software.

7 comments:

nltnjnns said...

I am running with Heron (beta), on an AMD 64. It is a great upgrade.

Regards,
Nalton

Zuhaib said...

I am in a same kind of situation. Can I upgrade using a normal ISO .. and there is no upgrade utility with Ubuntu 9.10. Also I am using AMD64 dist.

Anonymous said...

Your Best luna gold Choice! last chaos money wow gold last chaos money withage of conan gold and aoc goldor link wow power level The World archlord gold Leading andKnight Online Noah come here wow leveling tks archlord gold hear wow power level or Aion kina or wedding dress designers

Eric said...

This does not work for me going from 11.04 to 11.10. Now I wonder how to undo what was done.

Ezra said...

Going from 11.04 to 11.10, this gives an error:

W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)/dists/oneiric/main/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
, W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111011)/dists/oneiric/restricted/binary-i386/Packages Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs
, E:Some index files failed to download. They have been ignored, or old ones used instead.

And apt-cdrom goes looking in the physical cdrom drive, rather than the mountpoint, even when I try to tell it otherwise with -m and -d.

It's sad, because this looked like such a useful tip.

Barry said...
This comment has been removed by the author.
Barry said...

To go upgrade from 11.04 to 11.10:

1. Open a terminal, i.e. xterm or xfce4-terminal.

2. Become root.

sudo -i

3. Mount the image you downloaded:

mount -o loop xubuntu-11.10-alternate-i386.iso /media/cdrom0

4. Start the upgrade script:

/media/cdrom0/cdromupgrade