2.4 odd behaviour of ramdisk + cramfs

From: Remco van Mook
Date: Thu Nov 13 2003 - 11:36:43 EST



I am experiencing a problem when I try to run the following script:

#! /bin/sh
cat /flash/modules-2.4.21 > /dev/ram1
mount -t cramfs -o ro /dev/ram1 /lib/modules

Running it once causes the mount to fail with 'cramfs: wrong magic' - running it twice will make mount succeed on the second try.

Oddly enough, repeating the 2 lines within the script doesn't work either.

The behaviour has been reproduced by several people with different 2.4 kernels.

As I need this to go into some boot scripts, I'd like this to work without human intervention.

Any suggestions ?

Remco van Mook

Typical kernel config:
2.4.21 unpatched kernel tree
CONFIG_BLK_DEV_RAM=y
CONFIG_BLK_DEV_RAM_SIZE=4096
CONFIG_BLK_DEV_INITRD=y
CONFIG_CRAMFS=y
CONFIG_TMPFS=y
CONFIG_RAMFS=y

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