battletux
May 20th, 2005, 04:19 PM
First of all thanks to CarlK in #Ubuntu for helping with this.
Basicly this will show you how to create an iso image of your ubuntu cd for use as an apt source so that like me you dont have to spend hours looking for the damn cd to install the odd package here and there.
NOTE: if you already have a downloaded iso of hoary then just skip the cd riping bit. Also remeber to change <user> with your username.
First up insert your hoary cd into your cd drive and wait for it to be mounted.
Now unmount the CD:
umount /media/cdrom0
to rip the cd:
dd if=/dev/hdc of=hoary.iso
This will create an iso of your hoary cd called 'hoary.iso' and place it in your /home/<user> folder.
Now we need to find a new home for this image. Just so it was out of my way and harder for me to delete it, i placed it in a hidden folder in the root (/) directory.
sudo mkdir /.iso
Now move the iso:
sudo mv /home/<user>/hoary.iso /.iso
Now we need to edit /etc/fstab so that the image is mounted each time the system is booted so:
sudo gedit /etc/fstab
and enter the following line:
/.iso/hoary.iso /mnt/iso iso9660 ro,loop,auto 0 0
EDIT: you now need to create the mount point folder:
sudo mkdir /mnt/iso
Here you have two choices you can either reboot the system, which is what i did, or you can run
sudo mount -a to reset /etc/fstab without rebooting, the choice is yours, but i rebooted here so i dont know what the sudo mount -a will do.
EDIT:
Ok after looking at this again on my home PC i spotted an error with it to get it to work do the following:
Now you need to remove the old reference to the cdrom from /etc/apt/sources.list, by:
sudo gedit /etc/apt/sources.list
By default the line you need to remove is the top one.
You will also ned to add the line into your sources.list so that the iso is used:
deb file::///mnt/iso hoary main restricted
next up all you need to do is:
sudo apt-get update
and you finished!
Any questions let me know, but i doubt i'll be able answer them :-? .
Basicly this will show you how to create an iso image of your ubuntu cd for use as an apt source so that like me you dont have to spend hours looking for the damn cd to install the odd package here and there.
NOTE: if you already have a downloaded iso of hoary then just skip the cd riping bit. Also remeber to change <user> with your username.
First up insert your hoary cd into your cd drive and wait for it to be mounted.
Now unmount the CD:
umount /media/cdrom0
to rip the cd:
dd if=/dev/hdc of=hoary.iso
This will create an iso of your hoary cd called 'hoary.iso' and place it in your /home/<user> folder.
Now we need to find a new home for this image. Just so it was out of my way and harder for me to delete it, i placed it in a hidden folder in the root (/) directory.
sudo mkdir /.iso
Now move the iso:
sudo mv /home/<user>/hoary.iso /.iso
Now we need to edit /etc/fstab so that the image is mounted each time the system is booted so:
sudo gedit /etc/fstab
and enter the following line:
/.iso/hoary.iso /mnt/iso iso9660 ro,loop,auto 0 0
EDIT: you now need to create the mount point folder:
sudo mkdir /mnt/iso
Here you have two choices you can either reboot the system, which is what i did, or you can run
sudo mount -a to reset /etc/fstab without rebooting, the choice is yours, but i rebooted here so i dont know what the sudo mount -a will do.
EDIT:
Ok after looking at this again on my home PC i spotted an error with it to get it to work do the following:
Now you need to remove the old reference to the cdrom from /etc/apt/sources.list, by:
sudo gedit /etc/apt/sources.list
By default the line you need to remove is the top one.
You will also ned to add the line into your sources.list so that the iso is used:
deb file::///mnt/iso hoary main restricted
next up all you need to do is:
sudo apt-get update
and you finished!
Any questions let me know, but i doubt i'll be able answer them :-? .