LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Suse/Novell
User Name
Password
Suse/Novell This Forum is for the discussion of Suse Linux.

Notices

Reply
 
Search this Thread
Old 03-17-2010, 04:19 PM   #1
wendycray
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
Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 197Reputation: 197
Welcome to LQ.

You are talking about this behavior:
Code:
$ 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
[snip]
/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
wendycray
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
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 12,353

Rep: Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042Reputation: 1042
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
wendycray
LQ Newbie
 
Registered: Mar 2010
Posts: 3

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


Reply


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


All times are GMT -5. The time now is 10:47 PM.

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