tech-embed archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Help with memory disk



Is the makefs command useful?

I had a similiar issue when creating a ramdisk image to be embedded into a 
kernel. I tried making an image with newfs and had similiar difficulties with 
the disklabel. Someone tipped me off about makefs and that solved my problem.

If you want some more details, I have it on my website (sorry for the long URL).
http://www.brianrose.net/family/fetch.php?dir=/Brian/NetBSD/Embedded&filename=single.html


roberto%redix.it@localhost wrote:
All I want do to is to install netbsd on flash memory and mount root and
other fs as read only; only fs like /var, /dev or /tmp should be writable
and I need to create ramdisk in memory for those devices (it is a bad
things to write on flash for tmp files or logs).

And I do not have any swap partition on disk to use the command mount_mfs.
So I need pure ramdisk.

I'm using netbsd 1.6 GENERIC.

As suggested in netbsd-help mailing list, I'm using md and mdconfig:

1) I've 2 device in /dev:
md0a b 17, 0
md0d b 17, 3

(a first question: what is the means of these device?)

2) to create a 8 MB of ramdisk I run: "mdconfig /dev/md0a 9192 & "

3) but before I can mount it I should create a file system with newfs; is
it correct?
Any attempt failed: "newfs md0" says "rmd0d no such file or dir.". So I
uncommented "rmd*" in MAKEDEV and ran "MAKEDEV md0" and it created rmd0a c
24,0 and rmd0d c 24,3; rerun the command "newfs md0" says "ioctl (GDINFO)
invalid argument md0d: can't read disk label; disk type must be
specified";
it is sound to me as I must create a disklabel or define a disk in
/etc/disktab.
Can anyone help me?

Thanks Roberto








--

Brian Rose
brian%brianrose.net@localhost
http://brianrose.net





Home | Main Index | Thread Index | Old Index