Subject: Help with memory disk
To: None <tech-embed@netbsd.org>
From: None <roberto@redix.it>
List: tech-embed
Date: 05/21/2003 15:14:26
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