Re: Re: [FSO] losetup trouble

2008-10-04 Thread rhn
 Wiadomość Oryginalna 
Od: Alex Osborne [EMAIL PROTECTED]
Do: List for Openmoko community discussion community@lists.openmoko.org
Data: 4 października 2008 4:24
Temat: Re: [FSO] losetup trouble

 Hello,
 
 On 04/10/2008, at 2:51 AM, rhn wrote:
 
  [EMAIL PROTECTED]:/media/card# touch /dev/loop0
  [EMAIL PROTECTED]:/media/card# losetup /dev/loop0 bigfile
  losetup: /dev/loop0
  [EMAIL PROTECTED]:/media/card# ls -l /dev/loop0
  -rw-r--r--1 root root0 Oct  3 16:31 /dev/loop0
 
 I'm surprised losetup didn't complain. There's not much point in  
 making loop0 a regular file.  I have not tried usb storage but:
 
 pico:~# ls -la /dev/loop0
 brw--- 1 root root 7, 0 Oct  4 12:08 /dev/loop0
 pico:~# dd if=/dev/zero of=foo bs=1k count=1k
 1024+0 records in
 1024+0 records out
 1048576 bytes (1.0 MB) copied, 0.208113 s, 5.0 MB/s
 pico:~# mke2fs foo
 mke2fs 1.41.1 (01-Sep-2008)
 [...]
 pico:~# mkdir /mnt/tmp
 pico:~# mount -o loop foo /mnt/tmp/
 pico:~# ls -la /mnt/tmp/
 total 17
 drwxr-xr-x 3 root root  1024 Oct  4 12:12 .
 drwxr-xr-x 5 root root  4096 Oct  4 12:12 ..
 drwx-- 2 root root 12288 Oct  4 12:12 lost+found
 pico:~# mount | grep foo
 /root/foo on /mnt/tmp type ext2 (rw,loop=/dev/loop0)
 
 I imagine normally /dev/loop* should be created by udev.  The fact  
 that it doesn't exist might indicate that you don't have loopback  
 device support in your kernel.  Check this:
 
 pico:~# grep loop /proc/devices
7 loop
 
 If it's not there try modprobe loop.
 
 If it is there, delete your bogus /dev/loop0 and recreate it like this:
 
 mknod /dev/loop0 b 7 0
 
 Cheers,
 
 Alex
 
 ___
 Openmoko community mailing list
 community@lists.openmoko.org
 http://lists.openmoko.org/mailman/listinfo/community

Thanks!

It seems I didn't have the loop module in the kernel. I was sure the device 
files are created by losetup and the loop support was compiled in the kernel 
(it was not shown in lsmod).

As soon as the repo is back online, I'm going to retry and post the results 
here.

Cheers,
rhn

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


[FSO] losetup trouble

2008-10-03 Thread rhn
Hi
I've encountered trouble trying to create a loopback device to use with 
usb_storage module instead of the card.
Here are my problems:


[EMAIL PROTECTED]:/media/card# losetup /dev/loop0 bigfile 
losetup: /dev/loop0: No such file or directory
[EMAIL PROTECTED]:/media/card# touch /dev/loop0
[EMAIL PROTECTED]:/media/card# losetup /dev/loop0 bigfile 
losetup: /dev/loop0
[EMAIL PROTECTED]:/media/card# ls -l /dev/loop0
-rw-r--r--1 root root0 Oct  3 16:31 /dev/loop0


bigfile is the file I wanted to mount.
I also tried to mknod /dev/loop0 with the major and minor guessed from the 
desktop's ones:


[EMAIL PROTECTED]:/media/card# mknod /dev/loop2 b 7 1
[EMAIL PROTECTED]:/media/card# losetup /dev/loop2 bigfile 
losetup: /dev/loop2: No such device or address


What can be done about it? Or maybe some usb storage module supports exposing 
directories instead of devices?

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community


Re: [FSO] losetup trouble

2008-10-03 Thread Alex Osborne
Hello,

On 04/10/2008, at 2:51 AM, rhn wrote:

 [EMAIL PROTECTED]:/media/card# touch /dev/loop0
 [EMAIL PROTECTED]:/media/card# losetup /dev/loop0 bigfile
 losetup: /dev/loop0
 [EMAIL PROTECTED]:/media/card# ls -l /dev/loop0
 -rw-r--r--1 root root0 Oct  3 16:31 /dev/loop0

I'm surprised losetup didn't complain. There's not much point in  
making loop0 a regular file.  I have not tried usb storage but:

pico:~# ls -la /dev/loop0
brw--- 1 root root 7, 0 Oct  4 12:08 /dev/loop0
pico:~# dd if=/dev/zero of=foo bs=1k count=1k
1024+0 records in
1024+0 records out
1048576 bytes (1.0 MB) copied, 0.208113 s, 5.0 MB/s
pico:~# mke2fs foo
mke2fs 1.41.1 (01-Sep-2008)
[...]
pico:~# mkdir /mnt/tmp
pico:~# mount -o loop foo /mnt/tmp/
pico:~# ls -la /mnt/tmp/
total 17
drwxr-xr-x 3 root root  1024 Oct  4 12:12 .
drwxr-xr-x 5 root root  4096 Oct  4 12:12 ..
drwx-- 2 root root 12288 Oct  4 12:12 lost+found
pico:~# mount | grep foo
/root/foo on /mnt/tmp type ext2 (rw,loop=/dev/loop0)

I imagine normally /dev/loop* should be created by udev.  The fact  
that it doesn't exist might indicate that you don't have loopback  
device support in your kernel.  Check this:

pico:~# grep loop /proc/devices
   7 loop

If it's not there try modprobe loop.

If it is there, delete your bogus /dev/loop0 and recreate it like this:

mknod /dev/loop0 b 7 0

Cheers,

Alex

___
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community