Cramfs and /dev

Jan 16, 2007 2 Replies

Hi, Im trying to build a cramfs file system - How is this handled for /dev files.



I understand that /dev is read-write. so i cannot include it in cramfs.



Is having a script which creates all the nodes at the beginning in tmpfs is the only solution.


Please advice, Sriram



/dev is it's own file system, so it does not suffer from restrictions of the location it is mounted in.

In some other file system you just create a mount point (a directory, usually called "dev") and have it hooked there.

-Michael

| Im trying to build a cramfs file system - How is this handled for | /dev files. | | I understand that /dev is read-write. so i cannot include it in | cramfs. | | Is having a script which creates all the nodes at the beginning in | tmpfs is the only solution.

That's what I do. My "script" (actually a binary compiled from source code in C) mounts a tmpfs, inserts devices shown by sysfs, then includes everything from a designated collection (another hard drive partition on my desktop computer). For an embedded system, populating /dev from sysfs might be all you need. If you go the route of using initramfs, then you already have rootfs at / (rootfs is just like ramfs) and /dev will use that if no other is mounted there.

IMHO, initramfs is, or should be, the way of the future, even for hosted (desktop and server) machines, in addition to embedded.

|---------------------------------------/----------------------------------| | Phil Howard KA9WGN (ka9wgn.ham.org) / Do not send to the address below | | first name lower case at ipal.net / spamtrap-2007-01-16-1235@ipal.net | |------------------------------------/-------------------------------------|

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required