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? |
Welcome to LQ.
You are talking about this behavior: Code:
$ sudo mount ubuntu.iso /mnt -o loop 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? |
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. |
Things change - maybe you could just parse the output from "losetup -a".
|
thanks - losetup -a works great for what i need.
|
All times are GMT -5. The time now is 03:10 AM. |