1

I use Kubuntu and recently upgraded to Raring directly from Precise.

Until Precise, I always installed the OS using the alternate CD and not the desktop CD, because I could later on mount the image and use it as an offline package repo. For instance if I remove a package installed by the default installer and later I want to install it again, I can just install it from the ISO without needing to download it again.

However, since Quantal the alternate CD no longer exists, so I am not sure how to set up the installed image as a local repo. I mean, doing find . -name "*.deb" inside the ISO tree after loopmounting it only shows a few packages like libc6 gcc and such and not the full set of packages that are actually installed -- I presume they are included in pre-installed form inside casper/filesystem.squashfs.

Given this situation, is it or is it not possible to use the Raring install images as offline repos? If yes, how?

Thank you!

Edit: Quite a few people marked this as a dup of: How to use a .iso image as a CD-ROM Repository? but the steps outlined there (that thread is from 2010) do not work with the Raring image. IIUC they would work only with the alternate images and they are not available any more. So anyway I tried those instructions and did:

$ mount | grep loop

/mnt/sda8/samjnaa/ai/ubuntu/raring/kubuntu-13.04-desktop-amd64.iso on /mnt/loop0 type iso9660 (ro)

$ sudo apt-cdrom -d /mnt/loop0/ add

Using CD-ROM mount point /mnt/loop0/

Unmounting CD-ROM

Waiting for disc...

Please insert a Disc in the drive and press enter

Mounting CD-ROM...

E: Failed to mount the cdrom.

3
  • I'm not entirely sure, but if you disconnect from the internet, and have the CD in your tray, it might just work. Basing this off the the option seen in the following screenshot. i.sajanp.com/20130625214425.png Jun 26, 2013 at 2:45
  • Hi thanks for your reply -- but LOL who uses actual physical CDs these days -- I have hardly ever used them for installing Ubuntu. See answers.launchpad.net/ubuntu/+question/211987. I mean, my question was using the ISO image as a local repo.
    – jamadagni
    Jun 26, 2013 at 2:49
  • 2
    @jamadagni Who uses physical CDs/DVDs these days? Most people born before 1995 or so.
    – belacqua
    Jun 27, 2013 at 17:52

1 Answer 1

0

I just answered a similar question, You can check the answer over HERE

To summarize the steps I described there,

You need to make a folder in /media and mount the iso to that folder. You can do so by running the following command as root

mount /path/to/iso /media/mountFOlder -o loop 

Next you should add the following lines to your /etc/fstab file (Always make a backup before making any changes to this file)

/path/to/iso /media/mountFolder      iso9660 loop,ro,user,noauto 0 0

Then you need to make an entry in /etc/apt/sources.list pointing to the repos in the iso. I don't know what that should be for ubuntu, but for debian it should be

deb file:/media/mountFolder/ wheezy main contrib 

where wheezy is the name of the current release of debian and main and contrib are the two repositorys. You should comment out everything else.

Next you should run apt-get update as root and then any installation using apt-get install packageName should run without internet now.

That's all. If you want to auto mount the iso everytime you boot, you should remove user,noauto from the entry you made in /etc/fstab

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