Re: Re: [FSO] losetup trouble

rhn rhn at o2.pl
Sat Oct 4 10:33:29 CEST 2008


---- Wiadomość Oryginalna ----
Od: Alex Osborne <ato at meshy.org>
Do: List for Openmoko community discussion <community at 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:
> 
> > root at om-gta02:/media/card# touch /dev/loop0
> > root at om-gta02:/media/card# losetup /dev/loop0 bigfile
> > losetup: /dev/loop0
> > root at om-gta02:/media/card# ls -l /dev/loop0
> > -rw-r--r--    1 root     root            0 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 at 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




More information about the community mailing list