Mount the DVD on the mount point that you just created. If you are using a physical disc, you need to know the device name of your DVD drive. You can find the names of any CD or DVD drives on your system with the command cat /proc/sys/dev/cdrom/info
. The first CD or DVD drive on the system is typically named sr0
. When you know the device name, mount the DVD:
mount -r -t iso9660 /dev/device_name
/path/to/repo
For example: mount -r -t iso9660 /dev/sr0 /mnt/repo
If you are using an ISO image file of a disc, mount the image file like this:
mount -r -t iso9660 -o loop /path/to/image/file
.iso /path/to/repo
For example: mount -r -o loop /home/root/Downloads/RHEL6-Server-i386-DVD.iso /mnt/repo
Note that you can only mount an image file if the storage device that holds the image file is itself mounted. For example, if the image file is stored on a hard drive that it not mounted automatically when the system boots, you must mount the hard drive before you mount an image file stored on that hard drive. Consider a hard drive named /dev/sdb
that is not automatically mounted at boot time and which has an image file stored in a directory named Downloads
on its first partition:
mkdir /mnt/temp
mount /dev/sdb1 /mnt/temp
mkdir /mnt/repo
mount -r -t iso9660 -o loop mount -r -o loop /mnt/temp/Downloads/RHEL6-Server-i386-DVD.iso /mnt/repo
If you are not sure whether a storage device is mounted, run the mount
command to obtain a list of current mounts. If you are not sure of the device name or partition number of a storage device, run fdisk -l
and try to identify it in the output.