cramfs over ramdisk broken ?

From: Steffen Rumler (Steffen.Rumler@siemens.com)
Date: Fri Dec 20 2002 - 03:19:38 EST


Hi,

I have tried to use cramfs over a ramdisk.
It seems not working stable.
I have tested this for the 2.4.2 and 2.4.20 kernel,
with the same result:

# create a file tree
#
$ mkdir x
$ touch x/a
$ touch x/b
$ touch x/c

# make a cramfs image
#
$ mkcramfs x x.img
Super block: 76 bytes
   a
   b
   c
Directory data: 124 bytes
Everything: 4 kilobytes
warning: gids truncated to 8 bits. (This may be a security concern.)

# dump the cramfs image; seems OK
#
$ od -x x.img
0000000 3d45 28cd 0000 0001 0000 0000 0000 0000
0000020 6f43 706d 6572 7373 6465 5220 4d4f 5346
0000040 e779 c669 363f 24cf 0b02 65c2 aef3 7fdb
0000060 6f43 706d 6572 7373 6465 0000 0000 0000
0000100 41ed 0000 0030 4200 04c0 0000 81a4 0000
0000120 0000 4200 0001 0000 0061 0000 81a4 0000
0000140 0000 4200 0001 0000 0062 0000 81a4 0000
0000160 0000 4200 0001 0000 0063 0000 0000 0000
0000200 0000 0000 0000 0000 0000 0000 0000 0000
*
0010000

# write cramfs image to ramdisc
#
$ dd if=x.img of=/dev/ram15
8+0 records in
8+0 records out

# check the ramdisc; seems OK
#
$ od -x /dev/ram15 | head
0000000 3d45 28cd 0000 0001 0000 0000 0000 0000
0000020 6f43 706d 6572 7373 6465 5220 4d4f 5346
0000040 e779 c669 363f 24cf 0b02 65c2 aef3 7fdb
0000060 6f43 706d 6572 7373 6465 0000 0000 0000
0000100 41ed 0000 0030 4200 04c0 0000 81a4 0000
0000120 0000 4200 0001 0000 0061 0000 81a4 0000
0000140 0000 4200 0001 0000 0062 0000 81a4 0000
0000160 0000 4200 0001 0000 0063 0000 0000 0000
0000200 0000 0000 0000 0000 0000 0000 0000 0000
*

# mount it (first try)
#
$ mkdir mnt
$ mount -t cramfs /dev/ram15 mnt
mount: wrong fs type, bad option, bad superblock on /dev/ram15,
        or too many mounted file systems

# check the ramdisc again; it seems to be demaged :-(
#
$ od -x /dev/ram15 | head
0000000 01fd 0809 0000 0000 8d28 080a 0000 0000
0000020 01fd 0809 0000 0000 8dc8 080a 0000 0000
0000040 01fd 0809 0000 0000 0000 0000 0000 0000
0000060 01fd 0809 0000 0000 e028 0809 0000 0000
0000100 01fd 0809 0000 0000 0000 0000 0000 0000
0000120 01fd 0809 0000 0000 e048 0809 0000 0000
0000140 01fd 0809 0000 0000 8b48 080a 0000 0000
0000160 01fd 0809 0000 0000 0000 0000 0000 0000
0000200 01fd 0809 0000 0000 0063 0064 0000 0000
*

# write cramfs image to ram disc (second try)
#
$ dd if=x.img of=/dev/ram15
8+0 records in
8+0 records out

# mount it (second try); it seems now working now !!!
#
$ mount -t cramfs /dev/ram15 mnt
$ ls mnt/
a b c

Any idea ?

Steffen

-- 

--------------------------------------------------------------

Steffen Rumler ICN CP D NT SW 7 Siemens AG Hofmannstr. 51 Email: Steffen.Rumler@siemens.com D-81359 Munich Phone: +49 89 722-44061 Germany Fax : +49 89 722-36703

--------------------------------------------------------------

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Dec 23 2002 - 22:00:26 EST