Cramfs and /dev

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

Translate This Thread From English to

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


Re: Cramfs and /dev
/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

Re: Cramfs and /dev

|  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 |
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline