Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of making, decompressing and loading iso File in Linux system

2025-04-03 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/01 Report--

This article introduces the "Linux system iso file production and decompression and loading methods" related knowledge, in the actual case of the operation process, many people will encounter such a dilemma, and then let the editor lead you to learn how to deal with these situations! I hope you can read it carefully and be able to achieve something!

Making and decompression of iso File under linux

1. Make ISO image file

Switch to root account and execute the command

The code is as follows:

Cp / dev/cdrom XXXXX.iso

XXXXX.iso is the name of the ISO file that needs to be named. After execution, all files on the CD are mapped to XXXXX.iso

two。 Load ISO Fil

Execute orders under the root account

The code is as follows:

Rm-rf / dev/cdrom

Ln-s / dev/loop7 / dev/cdrom

Losetup / dev/loop7 / PATH (iso file path)

Mount / mnt/cdrom

If you need to change the disk

The code is as follows:

Losetup-d / dev/loop7

Repeat again

The code is as follows:

Losetup / dev/loop7 / PATH (iso file path)

Mount / mnt/cdrom

If it is an ordinary CD containing iso

You can use the command directly

The code is as follows:

Mount-t iso9660-o loop /.. / * .iso / path

/. / * .iso is the path to the iso file

/ path is the mount point

Or

The code is as follows:

Mount-o loop

If the destination directory does not exist, create the folder with mkdir.

3. Unload a loaded ISO file

The code is as follows:

Umount-n

Two methods of opening ISO file under Linux

Method 1. Mount the command with mount under Linux

The software disk downloaded from the Internet is in iso format, and the files can be read without being engraved into a CD. There's no need to decompress.

Used at the terminal

The code is as follows:

Mount-o loop / mnt/*/1.iso / mnt/cdrom

Command, (where * is the path where your tool tray is placed).

After entering the command, open my computer-- > Open CD-ROM and you can see the files inside. Run install or autorun.

When prompted for charudi two CDs, type the command

The code is as follows:

Umount / mnt/cdrom

.

Then type

The code is as follows:

Mount-o loop / mnt/*/2.iso/mnt/cdrom

Change the file name of the first command from 1 to 2, which is the name of the second CD. Go back to the car like this. Just wait.

Unmount use

The code is as follows:

Umount / mnt/cdrom

Example:

Mount the first disk

The code is as follows:

# mount-o loop / mnt/*/1.iso / mnt/cdrom

Unmount

The code is as follows:

# umount / mnt/cdrom

Mount the second disk

The code is as follows:

# mount-o loop / mnt/*/2.iso/mnt/cdrom

Unmount

The code is as follows:

# umount / mnt/cdrom

Note: there is a space between umount and /

/ * is the path where the iso file is placed

If the first method has been successfully used, the second method will not be used, and it will not be put into practice.

Method 2. Use virtual optical drive under Linux

In fact, you don't need any virtual optical drive software at all, you can do it with the mount command.

1. Make the CD into an iso file

The code is as follows:

Cp / dev/cdrom XXXXX.iso

XXXXX.iso is the image file you named. After executing this command, the entire CD can be made into an iso file. You can add a path before XXXXX.iso.

two。 Load the iso file on your hard drive to the CD (or virtual optical drive).

The code is as follows:

Mount-t iso9660-o loop / * / XXXXX.iso / mnt/iso

3. If you install the files provided by the system disk, such as adding and deleting programs, you may be prompted to insert the CD, but we do not have a CD, only a mirror image, what should we do?

For RedHat, mount iso first and then execute

The code is as follows:

Redhat-install-packages-isodir=/mnt/iso

4. General situation virtual optical drive

The code is as follows:

Rm-rf / dev/cdrom # remove the optical drive

Ln / dev/loop7 / dev/cdrom

Losetup / dev/loop7 / * / XXXXX.iso

Mount / mnt/cdrom

Then you look at the iso file, has it become a virtual optical drive?

5. Cancel this CD-ROM drive:

The code is as follows:

Losetup-d / dev/loop7

If you change the disk:

Just transfer the iso association to / dev/loop

The code is as follows:

Losetup / dev/loop7 / * / XXXXX.iso

Note: / * is the path. You may want to create a folder called cdrom under / mnt/.

This is the end of the content of "the production, decompression and loading method of iso file under Linux system". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report