[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: unable to mount loop device
From:       Harald Becker <ralda () gmx ! de>
Date:       2011-09-14 20:33:26
Message-ID: 4E710F96.1090907 () gmx ! de
[Download RAW message or body]

 Hi!

One issue with mounting loop devices I had in the past resulted in this
"invalid argument" problem. The mount point (directory) I wan'ted to use
resided on a file system that had been mounted in a way that forbid
mounting further file systems. Try to check this and/or give content of
/proc/mounts.

Beside this, have you tried to split the loop mounting operation into
the usage of losetup and seperate mount of the /dev/loopN ? In most
cases "mount -o loop" fails the separate usage works correct or give
more precise error information (see dmesg output).

I'm heavily using loop device mounts with Busybox on my systems. None of
them ever failed due to problems residing within Busybox. Whenever I had
trouble the problem resided in fundamental environmental issues (or
usage failures).

--
Harald

On 14.09.2011 21:31, mehdi karamnejad wrote:
> well I tried that and still I get the "invalid argument" message
>
>> On Mon, Sep 12, 2011 at 7:58 PM, walter harms <wharms@bfs.de> wrote:
>>> This should generate a 1mb loop device.
>>>
>>> dd if=/dev/zero of=disk count=1024 bs=1024
>>> mkdir tst
>>> mkfs -t minix disk      # feel free to change to ext2 or so
>>> mount disk tst -o loop
>>>
>>> re,
>>>  wh
>>>
>>> Am 12.09.2011 17:09, schrieb mehdi karamnejad:
>>>> Hi,
>>>> I'm having trouble mounting a initrd image using loop device.  the
>>>> CONFIG_FEATURE_MOUNT_LOOP option in .config file of busybox is set and
>>>> mounting loop devices is enabled in my kernel (I'm using 2.6.32). then
>>>> I issue the following command :
>>>>  mount /boot/initrdimg.img /mnt/img1/ -t  ext2-o loop=/dev/loop0
>>>> and I get the following error:
>>>> mount: mounting /dev/loop0 on /mnt/img1/ failed: Invalid argument
>>>>
>>>> ** I'm also positive that loop0 and the mount point /mnt/img1 both exist
>>>>
>>>> and here is the output of the strace command(the tail which contains
>>>> error and exists mount process , if I have to provide the whole output
>>>> please let me know):
>>>> ....
>>>> fstat64(3, {st_mode=S_IFREG|0644, st_size=256324, ...}) = 0
>>>> mmap2(NULL, 256324, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb75c7000
>>>> close(3)                                = 0
>>>> geteuid32()                             = 1000
>>>> write(2, "sudo", 4sudo)                     = 4
>>>> write(2, ": ", 2: )                       = 2
>>>> write(2, "must be setuid root", 19must be setuid root)     = 19
>>>> write(2, "\n", 1
>>>> )                       = 1
>>>> exit_group(1)
>>>>
>>>> I've also tried several version of busybox but no luck so far, there
>>>> are also some similar posts on the mailing list which address problems
>>>> like mine but no definite solutions so far. any idea how I can mount a
>>>> loop device?
>>>>
>>>>
>>
>>
>> --
>> :-----:
>>> Mehdi Karamnejad
>
>
_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic