cramfs + devfs

Does anyone here use cramfs or devfs together ?

At the moment I have a simple compressed ext2 ramdisk image included in the kernel, but obviously this gets decompressed whenever the kernel gets booted. I'd like to get rid of this and just mount either cramfs or squashfs and decompress on the fly.

The trouble seems to be that with a cramfs root filesystem, if I use devfs I cannot create new device nodes under /dev because the underlying FS is read-only. The alternative is to throw out devfs and create these nodes when generating the filesystem image, but because you need to be root on the Linux box to use mknod that is not an option.

Is there some way of using, eg, tmpfs mounted on /dev and then mounting devfs over that ?

Reply to
Geronimo W. Christ Esq
Loading thread data ...

I am using both cramfs and devfs together on a system. /dev is an empty directory, and the devfs gets mounted where you would expect. I can create devices (if needed) after the devfs is mounted.

Chuck

Reply to
Chuck Gales

Thanks, Chuck.

So in the cramfs image I just need to create an empty /dev directory with the correct permissions, then I can do mknod etc after booting ?

I will give that a try. It's a while since I tried that but at the time I had trouble making it work.

Cheers...

Reply to
Geronimo W. Christ Esq

Yes. I also have CONFIG_DEVFS_MOUNT=y in my kernel .config to automount the devfs when the kernel starts.

Reply to
Chuck Gales

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.