Discussion:
[BusyBox] mount -o loop
Assaf Stoler
2003-07-19 13:33:42 UTC
Permalink
hi,

I'm trying to use the 6.0.3, and the latest CVS (7-11-02), to mount a
loop device

# busybox mount /myfile.loop /mnt -o loop

I do have a Lot of free loop devices, and doing the same with the
'normal' mount command works, but with the built-in mount, i always get

# mount: Could not find a spare loop device

any Ideas,

thanks,

Assaf

***@masirv.com
Disclaimer: The information contained in this transmission, including any
attachments, may contain confidential information of Matsushita Avionics
Systems Corporation. This transmission is intended only for the use of the
addressee(s) listed above. Unauthorized review, dissemination or other use
of the information contained in this transmission is strictly prohibited.
If you have received this transmission in error or have reason to believe
you are not authorized to receive it, please notify the sender by return
email and promptly delete the transmission.
tito
2003-07-19 13:33:42 UTC
Permalink
On Thursday 11 July 2002 21:26, you wrote:
> hi,
>
> I'm trying to use the 6.0.3, and the latest CVS (7-11-02), to mount a
> loop device
>
> # busybox mount /myfile.loop /mnt -o loop
>
> I do have a Lot of free loop devices, and doing the same with the
> 'normal' mount command works, but with the built-in mount, i always get
>
> # mount: Could not find a spare loop device
>
> any Ideas,
>
> thanks,
>
> Assaf
>
> ***@masirv.com
Hi,
have you defined this in Config.h?
//
// Enable support for loop devices in mount
#define BB_FEATURE_MOUNT_LOOP
//
Hope it helps.
Tito
Assaf Stoler
2003-07-19 13:33:42 UTC
Permalink
Yes, I have defined it in the Config.h
also, I can do
#losetup /dev/loop0 /myfile.looo
#mount /dev/loop0 /mnt
using the busybox builtins.

the problem only shows when using mount the 'traditional' way, without
using losetup to bind the loop device.

Assaf

tito wrote:
>
> On Thursday 11 July 2002 21:26, you wrote:
> > hi,
> >
> > I'm trying to use the 6.0.3, and the latest CVS (7-11-02), to mount a
> > loop device
> >
> > # busybox mount /myfile.loop /mnt -o loop
> >
> > I do have a Lot of free loop devices, and doing the same with the
> > 'normal' mount command works, but with the built-in mount, i always get
> >
> > # mount: Could not find a spare loop device
> >
> > any Ideas,
> >
> > thanks,
> >
> > Assaf
> >
> > ***@masirv.com
> Hi,
> have you defined this in Config.h?
> //
> // Enable support for loop devices in mount
> #define BB_FEATURE_MOUNT_LOOP
> //
> Hope it helps.
> Tito
tito
2003-07-19 13:33:42 UTC
Permalink
On Thursday 11 July 2002 21:52, you wrote:
> Yes, I have defined it in the Config.h
> also, I can do
> #losetup /dev/loop0 /myfile.looo
> #mount /dev/loop0 /mnt
> using the busybox builtins.
>
> the problem only shows when using mount the 'traditional' way, without
> using losetup to bind the loop device.
>
> Assaf

Can't explain why.
I don't use bb mount, but i compiled it in now
for testing with
#define BB_FEATURE_MOUNT_LOOP enabled
and if I do

busybox-0.60.3# gunzip initrd.gz
busybox-0.60.3# ln -s busybox mount
busybox-0.60.3# ./mount initrd -o loop mnt
busybox-0.60.3# ls mnt
bin/ dev/ etc/ floppy/ foozero home/ lib/ mnt/ proc/ root/ sbin@
tmp/ usr/ var/

it seems to work at least on my Mandrake8.2

Tito

PS: the support for loop devices have to be compiled also in kernel.
Check for
# Additional Block Devices
#
CONFIG_BLK_DEV_LOOP=m (or Y)

Bye
tito
2002-07-11 19:34:03 UTC
Permalink
On Thursday 11 July 2002 21:52, you wrote:
> Yes, I have defined it in the Config.h
> also, I can do
> #losetup /dev/loop0 /myfile.looo
> #mount /dev/loop0 /mnt
> using the busybox builtins.
>
> the problem only shows when using mount the 'traditional' way, without
> using losetup to bind the loop device.
>
> Assaf

Can't explain why.
I don't use bb mount, but i compiled it in now
for testing with
#define BB_FEATURE_MOUNT_LOOP enabled
and if I do

busybox-0.60.3# gunzip initrd.gz
busybox-0.60.3# ln -s busybox mount
busybox-0.60.3# ./mount initrd -o loop mnt
busybox-0.60.3# ls mnt
bin/ dev/ etc/ floppy/ foozero home/ lib/ mnt/ proc/ root/ sbin@
tmp/ usr/ var/

it seems to work at least on my Mandrake8.2

Tito

PS: the support for loop devices have to be compiled also in kernel.
Check for
# Additional Block Devices
#
CONFIG_BLK_DEV_LOOP=m (or Y)

Bye
Assaf Stoler
2002-07-11 18:54:03 UTC
Permalink
Yes, I have defined it in the Config.h
also, I can do
#losetup /dev/loop0 /myfile.looo
#mount /dev/loop0 /mnt
using the busybox builtins.

the problem only shows when using mount the 'traditional' way, without
using losetup to bind the loop device.

Assaf

tito wrote:
>
> On Thursday 11 July 2002 21:26, you wrote:
> > hi,
> >
> > I'm trying to use the 6.0.3, and the latest CVS (7-11-02), to mount a
> > loop device
> >
> > # busybox mount /myfile.loop /mnt -o loop
> >
> > I do have a Lot of free loop devices, and doing the same with the
> > 'normal' mount command works, but with the built-in mount, i always get
> >
> > # mount: Could not find a spare loop device
> >
> > any Ideas,
> >
> > thanks,
> >
> > Assaf
> >
> > stolera at masirv.com
> Hi,
> have you defined this in Config.h?
> //
> // Enable support for loop devices in mount
> #define BB_FEATURE_MOUNT_LOOP
> //
> Hope it helps.
> Tito
Assaf Stoler
2002-07-11 18:29:04 UTC
Permalink
hi,

I'm trying to use the 6.0.3, and the latest CVS (7-11-02), to mount a
loop device

# busybox mount /myfile.loop /mnt -o loop

I do have a Lot of free loop devices, and doing the same with the
'normal' mount command works, but with the built-in mount, i always get

# mount: Could not find a spare loop device

any Ideas,

thanks,

Assaf

stolera at masirv.com
Disclaimer: The information contained in this transmission, including any
attachments, may contain confidential information of Matsushita Avionics
Systems Corporation. This transmission is intended only for the use of the
addressee(s) listed above. Unauthorized review, dissemination or other use
of the information contained in this transmission is strictly prohibited.
If you have received this transmission in error or have reason to believe
you are not authorized to receive it, please notify the sender by return
email and promptly delete the transmission.
tito
2002-07-11 18:43:03 UTC
Permalink
On Thursday 11 July 2002 21:26, you wrote:
> hi,
>
> I'm trying to use the 6.0.3, and the latest CVS (7-11-02), to mount a
> loop device
>
> # busybox mount /myfile.loop /mnt -o loop
>
> I do have a Lot of free loop devices, and doing the same with the
> 'normal' mount command works, but with the built-in mount, i always get
>
> # mount: Could not find a spare loop device
>
> any Ideas,
>
> thanks,
>
> Assaf
>
> stolera at masirv.com
Hi,
have you defined this in Config.h?
//
// Enable support for loop devices in mount
#define BB_FEATURE_MOUNT_LOOP
//
Hope it helps.
Tito
Continue reading on narkive:
Loading...