Howto: Accelerate Ubuntu upgrades with an ISO

This is a fairly useful (and simple, but not very innovative) trick for older machines using Ubuntu, when your network connection might be weak, or when you have a lot of software to install and don’t want to wait on an old CDROM.

You can mount an ISO — such as the alternate or desktop Ubuntu ISOs — to the /media/cdrom0 mountpoint, and use that as a kind of on-disk stash for system files and dependencies. Here’s what I mean.

Get yourself an old computer with a flaky or slow CDROM, and install a command-line Ubuntu system on it. Now use a USB drive or a rewritable CD to copy the alternate ISO onto the drive — not the files, the ISO itself.

Now add that ISO to your sources.list file like this: First, tell apt you’re going to give it more packages to manage.

sudo apt-cdrom add

apt will probably prompt you for the CD now. Rather than inserting the system CD, jump to another terminal and do this, from the directory where you have the ISO.

sudo mount hardy-alternate-i386.iso -o loop -t iso9660 /media/cdrom0/

Now go back to your other terminal where apt is waiting, and press return. apt will think a CD has been inserted, and will add that to your sources.list file. When it’s done, it unmounts it.

Now when you install xorg or whatever, it should prompt you for the CD, so you mount the ISO to /media/cdrom0 again (if you do this a lot, you could set up a script or an alias to take care of it for you, or modify your fstab so you can do it without a lot of typing). This time when you press return, you only have to download a fraction of the packages, thereby saving bandwidth and download time! :shock: :mrgreen:

Best of all it usually takes only a few seconds to get those packages off the ISO (depending on the speed of your machine, of course ;) ), so installing should go a lot faster. Remember this trick in April, when you have to make the massive leap from Dapper to Hardy. ;)

(Also remember to manage your cache wisely, so you don’t end up redownloading files after an installation, if you can help it. This ISO thing might also help with that if the versions are the same.)

About these ads

1 Response to “Howto: Accelerate Ubuntu upgrades with an ISO”



  1. 1 Beat the rush « Motho ke motho ka botho Trackback on 2008/04/22 at 9:48 AM

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




Welcome!



Visit the Wiki!

Some recent desktops


May 6, 2011
Musca 0.9.24 on Crux Linux
150Mhz Pentium 96Mb 8Gb CF
 


May 14, 2011
IceWM 1.2.37 and Arch Linux
L2300 core duo 3Gb 320Gb

Some recent games


Apr. 21, 2011
Oolite on Xubuntu 11.04
L2300 core duo 3Gb 320Gb

Enter your email address to subscribe to this blog and receive notifications of new posts.

Join 405 other followers

License

This work is licensed under the GNU Free Documentation License. Please see the About page for details.

Blog Stats

  • 3,960,554 hits

Archives


Follow

Get every new post delivered to your Inbox.

Join 405 other followers

%d bloggers like this: