linux unmount iso,mount an unmount iso file in linux

1. How to mount iso files without writing it to CD/DVD ?

If you have downloaded a *.iso file from a website (for example,

any Linux OS distribution), you can view the content of the iso

file without writing as an iso to a CD or DVD as explained below

using mount -o loop.. Please note

that a loop device is a pseudo-device which will make an iso file

accessible to the user a block device.

Syntax: # mount ISOFILE MOUNT-POINT -o loop

$ su -

# mkdir /tmp/mnt

# mount -o loop /downloads/ubuntu-9.04-desktop-i386.iso /tmp/mnt

# cd /tmp/mnt

# ls -l

For mounting you need to be logged in as root or you should have

sudo permission. Read below to find out how to mount iso file as

regular non-root user.

2. How to mount or view an iso file as a non root user ?

A non root user can also mount a file, even without sudo

permission. Using midnight commander you can mount the iso file.

Actually, it is really not mounting the file. But you can view the

iso file content just like viewing some other files. Refer to our

previous article that explains about

Steps to view iso file in midnight commander:

Open midnight command

(mc).

Navigate to the path where

ISO file exist.

Click on the iso file, it

will enter in to the iso file as like a normal directory and now

you will be seeing the content of the file.

To view the normal file or

the file of the iso, Press when your cursor is on the file.

3. How to solve the issue “iso is not a block device error” ?

While mounting an iso file you may get the following error:

mount: file.iso is not a block device (maybe try `-o loop'?)

Problem:

# mount /downloads/Fedora-11-i386-DVD.iso /tmp/mnt

mount: /downloads/Fedora-11-i386-DVD.iso is not a block device (maybe try `-o loop'?)

Solution: As

it is suggested by the mount command, use the -o loop as the

option.

# mount /downloads/Fedora-11-i386-DVD.iso /tmp/mnt -o loop

4. How to update the content of an iso file ?

ISO file content

cannot be updated once the ISO file is created. Only way to do as

of now is,

Steps to update the iso file.

Extract all the files from

the iso.

Update the content. i.e Add

or remove any individual files inside the iso file.

Create another iso with the

updated files.

5. Extracting files from the iso file as root user ?

Mount the iso

file as root user, and navigate to the directory to copy the

required files from iso.

Steps to mount and extract the iso file as root user.

Mount the iso file as root

user.

# mount /downloads/debian-501-i386-DVD-1.iso /tmp/mnt -o loop

Navigate to the mounted

directory.

# cd /tmp/mnt

Copy the required files.

# cp some-file-inside-iso /home/test

6. Extracting files from the iso file as normal user ?

View the content

of the file as non root user in midnight

commander, and then copy it using midnight commander commands

or using shell commands.

Steps to extract the content from iso file as non root user.

open mc.

Navigate to the directory

where the iso file is located.

Select the iso file and

press enter to view the content of the iso file.

When you are inside the iso

file, you will be able to view the contents of it. To copy a

particular file from the iso file you can use the shell commands in

shell prompt as.

$ cp some-file-inside-iso /tmp/mnt

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值