I've been using a couple of the /dev/loop devices in a few of my scripts that manipulate pupnnn files (for backups and so on).
I've recently found out about the usr_devx.sfs file and with unionfs, it makes for a very nice way to add development abilities... but it does take away one of the /dev/loop devices.
As I understand it, the 'losetup' program can cope with 8 /dev/loop devices, so can we have those made available in the next release of Puppy, please?
Perhaps we could also think about a standard way of using/allocating them as well. For example, /dev/loop8 might be used (reserved) by the usr_devx.sfs file; /dev/loop0 would always be used for the pup001 file, /dev/loop1-4 would be available as 'user block devices'... and /dev/loop5-8 would be 'system block devices' (for example as previously suggested, in use by usr_devx.sfs and its ilk).
More /dev/loop Devices
- BarryK
- Puppy Master
- Posts: 9392
- Joined: Mon 09 May 2005, 09:23
- Location: Perth, Western Australia
- Contact:
Okay, now is my opportunity to document this!
/sbin/losetup is Busybox losetup.
It seems buggy, only properly handles loop0 and loop1.
/bin/losetup-FULL is the full losetup program, works fine.
loop0
This is reserved for usr_cram.fs to mount on /.usr_cram
loop1
This is reserved for the pupxxx file to mount on /root
loop2
This is used by various scripts in Puppy.
So, it is normally available. A script should use it, then release it.
loop3
This is reserved for use by usr_devx.sfs to mount on /.usr_devx.
loop4
This is reserved for usr_more.sfs to mount on /.usr_more.
So, loop2 is normally available, and loops 5+ are available.
This should go somewhere like the wiki I suppose.
/sbin/losetup is Busybox losetup.
It seems buggy, only properly handles loop0 and loop1.
/bin/losetup-FULL is the full losetup program, works fine.
loop0
This is reserved for usr_cram.fs to mount on /.usr_cram
loop1
This is reserved for the pupxxx file to mount on /root
loop2
This is used by various scripts in Puppy.
So, it is normally available. A script should use it, then release it.
loop3
This is reserved for use by usr_devx.sfs to mount on /.usr_devx.
loop4
This is reserved for usr_more.sfs to mount on /.usr_more.
So, loop2 is normally available, and loops 5+ are available.
This should go somewhere like the wiki I suppose.
Started on the wiki at http://www.goosee.com/puppy/wikka/MounTingBarryK wrote:Okay, now is my opportunity to document this!
[...]
This should go somewhere like the wiki I suppose.
Well, I'm no super-expert on Linux myself(!)... So for now, I've added a link to the Linux Doc. Project HOWTO, the first few paragraphs of which explain about how the /dev/loop devices and RAMdisks work in a fairly understandable way.Flash wrote:Any chance you could add a brief explanation of why they are called "loop" devices, and why they are necessary?