Mounting multiple loop-devices via BB
Alexander 'E-Razor' Krause
alexander.krause at erazor-zone.de
Tue May 9 19:44:30 UTC 2006
> My kernel isn't patched with unionfs, so I can't replicate that. I'm
> guessing your $DYNAMIC is a writeable block device?
Indeed, it's /dev/hda2 mounted rw.
> Well, first of all, does your new directory have /proc mounted, or
> an /etc/filesystems that mentions squashfs? If not it won't be able to do
> automatic filesystem type detection, and I don't think I have a specific
> error message for that.
Bot root's do have /proc mounted.
There is no /etc/filesystems but i don't think that'd be necessary cos of
proc.
> My first guess would be that you haven't got /proc after the chroot, or
> an /etc/filesystems, so when you don't specify a filesystem type it doesn't
> know what names to try, and it's not giving a very informative error
> message. But that's just a guess.
Geode /mnt/stage1 $ mount | grep proc
/proc on /mnt/stage1/proc type proc (rw)
none on /proc type proc (rw)
The /mnt/stage1 is my old root as you can see in the script.
> Did you build with legacy mtab support? (Random question, shouldn't affect
> this, just curious.)
I enabled CONFIG_FEATURE_MTAB_SUPPORT on both BB's (the one in stage1 and the
one in static).
> There's a couple of other possibilities:
>
> 1) It couldn't find or access /dev/loop* (permissions?)
I think the permissions are all right.
Geode /mnt/stage1 $ stat -c "%N %a (%A)
> " /dev/loop*
/dev/loop0 660 (brw-rw----)
/dev/loop1 660 (brw-rw----)
/dev/loop2 660 (brw-rw----)
/dev/loop3 660 (brw-rw----)
/dev/loop4 660 (brw-rw----)
/dev/loop5 660 (brw-rw----)
/dev/loop6 660 (brw-rw----)
/dev/loop7 660 (brw-rw----)
> 2) All the loop devices were busy (or somehow missed) and it iterated off
> the end.
I can't imagine that one cos only static is mounted as loop.
> Could you try something like:
>
> losetup /dev/loop3 stage3-python-2006.05.05.squash
> mount -o ro -t squashfs /dev/loop3 /mnt/stage3/python
Wow, now that works!
Geode /mnt/stage1 $ losetup /dev/loop3 /boot/stage3-python-2006.05.05.squash
Geode /mnt/stage1 $ mount -o ro -t squashfs /dev/loop3 /mnt/stage3-python
Geode /mnt/stage1 $ ls /mnt/stage3-python/
usr
> If that works, try removing the "-t squashfs"...
Geode /mnt/stage1 $
mount /boot/stage3-python-2006.05.05.squash /mnt/stage3-python -o ro
mount: Couldn't setup loop device
mount: Mounting (null) on /mnt/stage3-python failed: No such file or directory
Thats what i tried earlier.
As far as i know BB does not parse something like 'loop=/dev/loopX' - that
might work too.
I still think it's confused somehow and tries to use /dev/loop0 which is still
busy.
I forgot about strace and gave it a try:
stat("/dev/loop/0", 0xbfcb66e4) = -1 ENOENT (No such file or
directory)
Well, there seem to be 2 questions:
1. why does it use /dev/loop/0 and not /dev/loop0 ? maybe it should
try /dev/loop0 too...
2. why loop0 instead of loop1 (check on loop0 failed)
I linked /dev/loop0 to /dev/loop/0 and /dev/loop1 to /dev/loop/1 - now mount
works:
Geode /dev/loop
$ /bin/mount /boot/stage3-python-2006.05.05.squash /mnt/stage3-python -o ro
Geode /dev/loop $ ls /mnt/stage3-python/
usr
I'm going to add those links to my setup but if you ask me BB should be able
to work with the old naming too.
Thanks so far for your help.
cheers Alex
--
Alexander Krause
Amtmann-Kästner-Platz 11
99091 Erfurt
Mail alexander.krause at erazor-zone.de
Tel. +49 (179) 4725826
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/busybox/attachments/20060509/cf7d0a92/attachment-0002.pgp
More information about the busybox
mailing list