More /dev/loop Devices

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
User avatar
ozboomer
Posts: 135
Joined: Wed 04 May 2005, 21:22
Location: Melbourne, Australia

More /dev/loop Devices

#1 Post by ozboomer »

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).

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

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.

User avatar
ozboomer
Posts: 135
Joined: Wed 04 May 2005, 21:22
Location: Melbourne, Australia

#3 Post by ozboomer »

BarryK wrote:Okay, now is my opportunity to document this!

[...]

This should go somewhere like the wiki I suppose.
Started on the wiki at http://www.goosee.com/puppy/wikka/MounTing

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#4 Post by Flash »

Thanks, Oz. I wondered where loop devices fit into the scheme of Puppy. Any chance you could add a brief explanation of why they are called "loop" devices, and why they are necessary? Just an overview, light on the technical details, so they make sense to a Linux beginner.

User avatar
ozboomer
Posts: 135
Joined: Wed 04 May 2005, 21:22
Location: Melbourne, Australia

#5 Post by ozboomer »

Flash wrote:Any chance you could add a brief explanation of why they are called "loop" devices, and why they are necessary?
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.

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#6 Post by Flash »

Thanks. :)

Post Reply