cramfs + devfs

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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 ?

Re: cramfs + devfs

Quoted text here. Click to load it

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.


Re: cramfs + devfs

Quoted text here. Click to load it

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.


Re: cramfs + devfs

Quoted text here. Click to load it

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

Site Timeline