Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE
User Name
SUSE / openSUSE This Forum is for the discussion of Suse Linux.


  Search this Thread
Old 03-17-2010, 04:19 PM   #1
LQ Newbie
Registered: Mar 2010
Posts: 3

Rep: Reputation: 0
SLE11 mount -o loop displays /dev/loop0 instead of iso file name

I'm having a behavior change problem with mount of a loop device that is really driving me nuts.

I have an iso image I'm mounting-

# mount -o loop /root/image.iso /media/cdrom

in SLES10 (and SLES9), "mount" displays the name of the iso file:
# mount
/root/image.iso on /media/cdrom type iso9660 (rw,loop=/dev/loop0)

However, in SLES11, "mount" now displays the loop device rather than the filename:
# mount
/dev/loop0 on /media/cdrom type iso9660 (rw)

This is somewhat less than useful. Is there any way to display the filename rather than the loop device?
Old 03-18-2010, 11:27 AM   #2
Simon Bridge
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Welcome to LQ.

You are talking about this behavior:
$ sudo mount ubuntu.iso /mnt -o loop
[sudo] password for simon: 
simon@indigo-prime:~/Projects$ ls /mnt
autorun.inf  dists    isolinux    pics  preseed             ubuntu
casper       install  md5sum.txt  pool  README.diskdefines  wubi.exe

$ mount
/dev/loop0 on /mnt type iso9660
So the iso is actually mounted - you have access to the files? How is this less than useful?

Anyway, this behaviour is run by udev.

It makes sense because mount only works on block devices - eg. not isos. The mount command is correctly displaying that /dev/loop0 is what it has mounted - which is what the -o option does.

It is usually considered good practise to name the mountpoint for the iso.

mkdir /mnt/karmic-iso
sudo mount -o loop ubuntu.iso /mnt/karmic-iso

What are you trying to do that needs you to keep track of the actual filename?
Why are you logged in as root?

Last edited by Simon Bridge; 03-18-2010 at 11:29 AM.
Old 03-19-2010, 09:23 PM   #3
LQ Newbie
Registered: Mar 2010
Posts: 3

Original Poster
Rep: Reputation: 0
I'm one of the developers for the install tool for Cray systems, so I'm doing a lot of things that are rather unusual for standard systems.

I'm logged in as root because I'm installing our OS, and this is one of the steps.

Yes, the iso is indeed mounted and we have access to the contents, but it's more valuable to know both the file mounted and the device (like SLES10 shows).

During my monitoring of others' install tests, a key thing to know is whether the install person actually mounted the correct iso image file. Hence, the desire to see what file is actually mounted and the appreciation of the SLES10 version of mount, which shows both the device and the file mounted.

We test many versions of our OS, so it's not practical to name a mount point for each individual iso file.
Old 03-19-2010, 09:34 PM   #4
LQ Veteran
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 16,571

Rep: Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423Reputation: 2423
Things change - maybe you could just parse the output from "losetup -a".
1 members found this post helpful.
Old 03-22-2010, 10:20 AM   #5
LQ Newbie
Registered: Mar 2010
Posts: 3

Original Poster
Rep: Reputation: 0
thanks - losetup -a works great for what i need.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
mount as a device: mount dvd-iso file in /dev/dvd sadarax Linux - General 21 02-02-2011 11:59 PM
Mount an ISO made with dd if=/dev/sda2 of=/backups/backup.iso pcsousa Linux - Newbie 8 02-26-2010 06:33 PM
Trying to install Mint 8 but cannot mount /dev/loop0 dflo404 Linux - Laptop and Netbook 2 02-14-2010 11:13 AM
How can I attach a compressed file to /dev/loop0 (for filesystem image recovery)? rjlee Linux - General 0 09-26-2004 04:11 PM
loop: can't open device /dev/loop0: No such device or address miaviator278 Linux - Security 3 06-09-2004 09:24 PM > Forums > Linux Forums > Linux - Distributions > SUSE / openSUSE

All times are GMT -5. The time now is 09:24 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration