Cramfs and /dev

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

Reply to
Ram
Loading thread data ...

/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

Reply to
Michael Schnell

| 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 |
 Click to see the full signature
Reply to
phil-news-nospam

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.