Method 1: mount a file in Linux
The software disks downloaded from the Internet are in ISO format and can be read without being engraved into a CD. You do not need to decompress the package.
Run the Mount-o loop/mnt/*/1.iso/mnt/CDROM command on the terminal, where * is the path of your tool disk ).
After entering the command, open my computer --> open the CD-ROM to see the file inside. Run install or autorun.
When two charudi discs are displayed, type the command umount/mnt/CDROM.
Then type Mount-o loop/mnt/*/2.iso/ MNT/CDROM (Change 1 of the file name of the First Command to 2, that is, the name of the second disc ). Then press Enter. Wait.
Unmount umount/mnt/CDROM
Example:
Attach the first disk
# Mount-o loop/mnt/*/1.iso/mnt/CDROM
Unmount
# Umount/mnt/CDROM
Attach the second disk
# Mount-o loop/mnt/*/2.iso/ MNT/CDROM
Unmount
# Umount/mnt/CDROM
Note: there is a space between umount and /.
/* Is the path of the ISO file.
Once the method has been used successfully, method 2 won't be used, so it will not be used in person.
Method 2: Use a virtual optical drive in Linux
In fact, no virtual optical drive software is required. You can use the mount command to complete the process.
1. Make the CD into an ISO file
CP/dev/cdrom xxxxx. ISO
XXXXX. ISO: The image file you named. After executing this command, you can make the entire CD into an ISO file. You can add a path before XXXXX. ISO.
2. Load the ISO file on the hard disk to the CD (or virtual optical drive ).
Mount-T iso9660-o loop/*/XXXXX. ISO/mnt/ISO
3. If it is to install the files provided by the system disk, such as adding or deleting a program, the system may prompt you to insert a CD, but we do not have a CD, only the image, what should we do?
For RedHat, first Mount ISO and then execute
RedHat-install-packages -- isodir =/mnt/ISO
4. Generally, the virtual Optical Drive
Rm-RF/dev/CDROM # Delete the optical drive
Ln/dev/loop7/dev/CDROM
Losetup/dev/loop7/*/XXXXX. ISO
Mount/mnt/CDROM
Then you can see if the ISO file has become a virtual Optical Drive?
5. Cancel the optical drive:
Losetup-D/dev/loop7
For disk replacement:
Only need to transfer ISO to/dev/Loop
Losetup/dev/loop7/*/XXXXX. ISO
Note:/* is the path. You may need to create a folder named CDROM under/mnt /.