Fedora Linux Support Community & Resources Center
  #1  
Old 28th January 2012, 11:12 AM
withfedora Offline
Registered User
 
Join Date: Dec 2011
Location: USE
Posts: 42
windows_xp_2003firefox
what is /dev/loop0 for?

and /dev/loop1 /dev/loop2 ...../dev/loop7, what's the meaning ?
Reply With Quote
  #2  
Old 28th January 2012, 02:24 PM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 1,050
windows_xp_2003chrome
Re: what is /dev/loop0 for?

They are the device files for the loopback driver, commonly used for mounting iso images.
Reply With Quote
  #3  
Old 29th January 2012, 01:07 AM
withfedora Offline
Registered User
 
Join Date: Dec 2011
Location: USE
Posts: 42
windows_xp_2003ie
Re: what is /dev/loop0 for?

Thanks, so when I have not mounted anything, /dev/loop0..../dev/lop7 are just idle or blank driver, right?

And when I want to mount ISO images, may I choose anyone from /dev/loop0..../dev/loop7 ? Is there any distinction?

Thanks a lot.

Quote:
Originally Posted by vallimar View Post
They are the device files for the loopback driver, commonly used for mounting iso images.
Reply With Quote
  #4  
Old 29th January 2012, 06:15 AM
vallimar Offline
Registered User
 
Join Date: Jul 2008
Posts: 1,050
linuxchrome
Re: what is /dev/loop0 for?

When you have nothing using it, the loop devices are unused.
You can choose which loop device if you want, or you can let it do so automatically.
There is no difference between them, they are just all empty slots to start with.
There is plenty of information available, just google for "linux loopback".
Reply With Quote
  #5  
Old 29th January 2012, 06:17 PM
Gareth Jones Offline
Official Gnome 3 Sales Rep. (and Adminstrator)
 
Join Date: Jul 2011
Location: Birmingham, UK
Age: 31
Posts: 2,771
linuxfirefox
Re: what is /dev/loop0 for?

"mount /file/system/image/file.img -o loop,ro /mount/point/directory" will automatically associate the image file with the first unused loop device, and a later "umount" will automatically free the device. The loop driver is more flexible than that though; see the "losetup" manual page and on-line guides for more advanced usage, such as listing used loop devices, using a manually specified loop device, or associating regions within a file (e.g. partitions of a whole-disk image) with loop devices.

Gareth
Reply With Quote
  #6  
Old 6th February 2012, 07:34 PM
japafi Offline
Registered User
 
Join Date: Mar 2010
Posts: 87
linuxfirefox
Re: what is /dev/loop0 for?

Some actions can only be performed with devices. loop devices allow linking file as device.

ie. if you have an image file of encrypted partition, you cannot perform "cryptsetup luksOpen imagefile.img cleartext_device", because cryptsetup requires a device as parameter.
but if one first links/mounts the image file to loop device, you can use luksOpen.

ie.
losetup /dev/loop0 /tmp/imagefile.img
cryptsetup luksOpen /dev/loop0 cleartext_device
will work.
Reply With Quote
Reply

Tags
or dev or loop0

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
FC4 installation crash - tmp/loop0 full abelard EOL (End Of Life) Versions 2 17th June 2005 07:18 PM


Current GMT-time: 23:59 (Tuesday, 30-09-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat