How about a few more /dev/loop devices?

What features/apps/bugfixes needed in a future Puppy
Post Reply
Message
Author
Kei G

How about a few more /dev/loop devices?

#1 Post by Kei G »

With all the files being looped by puppy, pupxxx, usr_cram, usr_more, etc., it is easy to run out of /dev/loop devices. I think you allow for loop0 to loop4. I know that these are easy to add on my own, but it would be nice if you included a few more in puppy.

Great job with puppy

Kei G.

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

#2 Post by Flash »

See here

Kei G

#3 Post by Kei G »

Maybe I am missing something.

I understand how to use loops, that is what creates my problem. When I start to loop additional files, I run out of /dev/loop devices. Maybe I am missing something, but puppy seems to only have loop0-loop4 in the /dev directory. Most other distributions have more, loop5, loop6 ...

In my own puppy, I add the devices that I need by just gunziping the image.gz, looping to it, copying the /dev/loops from another distribution to the looped file, then regzipping the image. That way the devices are there when I need them. Without this, I am left with only loop2 for general use and I need more than that. I guess because I keep doing things like gunzipping the image.gz and looping to it.

For the minimal cost in size of adding /dev/loop5 through /dev/loop8 to the distribution image.gz, puppy becomes more useful by adding these devices. It just seems like a good idea in an environment that makes such powerful use of looped filesystems.

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#4 Post by GuestToo »

to create a loop device just type something like:

mknod /dev/loop5 b 7 5
mknod /dev/loop6 b 7 6
mknod /dev/loop7 b 7 7
mknod /dev/loop8 b 7 8

you can create the loop devices automatically when Puppy boots by putting the mknod instructions in an init file like rc.local

to mount a file using a particular loop device, for example /dev/loop7, you can type:

losetup-FULL /dev/loop7 puppy.iso
mount -o loop /dev/loop7 /mnt/data

there's a limit to how many loop devices there can be that was set when the kernel was compiled (each loop device uses space in ram) ... there's also a software limit to how many devices you can use

User avatar
rarsa
Posts: 3053
Joined: Sun 29 May 2005, 20:30
Location: Kitchener, Ontario, Canada
Contact:

#5 Post by rarsa »

Thank you,

I normally have multiple pup001 files for testing. Before your post I never cared to much to investigate how to add more loops, so I just dismounted and mounted as needed.

Kei G

#6 Post by Kei G »

Thank all you nice folks for the information about how to add a few more loop devices, but I never meant my post to be an inquiry. Rather, I meant it to be a suggestion as the title to this forum indicates:

What features/apps/bugfixes needed in a future Puppy?

I understand that there are a lot of ways to add loop devices on my own. Please don't tell me any more. I just think that it would be a good idea to add a few more to the standard puppy package so that they are available to everyone. Minimal increase in size of the distribution with more functionality.

Thanks again for everyone's help.

Post Reply