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 ( http://askubuntu.com/questions/4694/...rom-repository
) to use AptOnCD
to make an iso.
I followed this answer:
$ mkdir /media/mountpoint
$ mount -t iso9660 -o loop /pathtoiso.iso /media/mountpoint
to /etc/sources.list with text editor and not with some GUI tool, then update from package manager.
deb file:///media/mountpoint distro main contrib
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/
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 aptoncd.info
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 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
So, I guess now I have to alter the iso internal structure so that it contains folders named distro
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