Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 11-10-2012, 04:35 AM   #1
Registered: May 2008
Distribution: ubuntu debian knoppix centos puppy
Posts: 31
Blog Entries: 2

Rep: Reputation: 1
AptOnCD not making proper iso? Or How to add iso as cdrom source?


I often need to work with the Kubuntu 12.04 live CD on computers where there's no chance to install to the harddisk.
So I want to keep a collection of packages I frequently download as a handy .iso file on my pendrive.

So I used the methods mentioned here ( ) to use AptOnCD to make an iso.

I followed this answer:
Try this
$ mkdir /media/mountpoint  
$ mount -t iso9660 -o loop /pathtoiso.iso /media/mountpoint
Then add
deb file:///media/mountpoint distro main contrib
to /etc/sources.list with text editor and not with some GUI tool, then update from package manager.
I did the following:
$ sudo mkdir /mnt/iso  
$ sudo mount -t iso9660 -o loop /aptoncd.iso /mnt/iso
and then added to /etc/apt/sources.list :
deb file:///mnt/iso/ distro main contrib
When I mounted the iso, it gave me a warning saying that the mount was read-only. That makes sense as you dont want anything written to an installer CD.

But when I did a sudo apt-get update, it says something like:
W: Failed to fetch file:/mnt/iso/dists/distro/main/binary-i386/Packages  File not found

W: Failed to fetch file:/mnt/iso/dists/distro/contrib/binary-i386/Packages  File not found

E: Some index files failed to download. They have been ignored, or old ones used instead.
I went to /mnt/iso/ and indeed there are no folders named distro, main or contrib in the generated iso.
kubuntu@kubuntu:~/Documents$ ls -hal /mnt/iso/
total 751K
dr-xr-xr-x 4 root root 2.0K Nov 10 09:16 .
drwxr-xr-x 1 root root   60 Nov 10 07:27 ..
-r--r--r-- 1 root root  111 Nov 10 09:16
dr-xr-xr-x 2 root root 2.0K Nov 10 09:16 .disk
dr-xr-xr-x 2 root root  64K Nov 10 09:16 packages
-r--r--r-- 1 root root 440K Nov 10 09:16 Packages
-r--r--r-- 1 root root 105K Nov 10 09:16 Packages.bz2
-r--r--r-- 1 root root 136K Nov 10 09:16 Packages.gz
-r--r--r-- 1 root root  250 Nov 10 09:16 README.diskdefines
-r--r--r-- 1 root root 1.6K Nov 10 09:16 Release
So I tried the following one-by-one in /etc/apt/sources.list
deb file:///mnt/iso
deb file:///mnt/iso/
deb file:///mnt/iso/ /
deb file:///mnt/iso Packages
deb file:///mnt/iso packages
In all these cases I got the error:
E: Malformed line 7 in source list /etc/apt/sources.list (dist)
E: The list of sources could not be read.
while trying sudo apt-get update each time.

So, I guess now I have to alter the iso internal structure so that it contains folders named distro, main and contrib.

Does this mean that everything that is created using aptoncd has this problem?

Any other way to create an iso for this purpose?

I also tried this:
sudo apt-cdrom -d=/aptoncd-mountpoint add
but got this error:
W: Skipping nonexistent file /cdrom/dists/precise/main/binary-i386/Packages
W: Skipping nonexistent file /cdrom/dists/precise/restricted/binary-i386/Packages
Finally tried the last alternative on that page:
sudo ln -s /aptoncd-mountpoint /media/apt

sudo mkdir /media/apt

sudo apt-cdrom add
But this gives the same error ; W: Skipping nonexistent file

Last edited by deskt0plinux; 11-10-2012 at 04:48 AM.
Old 11-10-2012, 10:22 PM   #2
LQ Newbie
Registered: Sep 2012
Posts: 25

Rep: Reputation: 3
Dear deskt0plinux,
if you just want to backup the packages there another method also you can use
1 members found this post helpful.
Old 11-13-2012, 01:41 AM   #3
Registered: May 2008
Distribution: ubuntu debian knoppix centos puppy
Posts: 31

Original Poster
Blog Entries: 2

Rep: Reputation: 1
Smile Thanks, works perfectly

Originally Posted by Xlr_Prahlad View Post
Dear deskt0plinux,
if you just want to backup the packages there another method also you can use
That link has the all-important command "dpkg -i *.deb"

Worked smoothly.

Just for the record, it gave an error for the following packages:
calibre, meld, imagemagick, and some libs of imagemagick

The error was about a missing libgomp1 patch.

apt-get suggested that I do
$ sudo apt-get -f install
without any packages names.

Doing that downloaded and installed libgomp1 patch and that was the end of the error.

Thanks again for the quick reply!


apt, aptoncd, cdrom, iso, sources.list

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Proper way to create an ISO image dwhitney67 Linux - Software 3 09-30-2007 01:37 PM
making cd iso into dvd iso dachinster Slackware 8 10-20-2006 12:40 PM
Need source code for making ISO files neo_in_matrix Programming 1 05-11-2005 11:01 PM
Does anyone Know how to open either .iso.rz or these .iso.xdelta,.iso.bz2,.iso.lzma?? maximalred Debian 5 06-09-2004 07:15 AM
Source iso vs. Binary iso Pcghost Linux - Newbie 2 04-03-2003 12:29 PM > Forums > Linux Forums > Linux - Distributions > Ubuntu

All times are GMT -5. The time now is 06:15 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration