Subject: Re: Wrestling with Ram Disks
To: Frederick Bruckman <fb@enteract.com>
From: Larry Colen <lrc@recourse.com>
List: port-i386
Date: 03/08/2001 15:22:12
On Thu, Mar 08, 2001 at 02:56:40PM -0600, Frederick Bruckman wrote:
> On Thu, 8 Mar 2001, Larry Colen wrote:
> 
> > I've been trying to get ramdisks working on a netbsd 1.5 system and
> > have been having an absolute abysmal time of it.  Before I tried
> > buring a CDROM and booting to the ramdisk, I wanted to try to just
> > make and mount one.
> 
> To build the installation ramdisk, you basically need to build a whole
> release. The kernel alone would have no binaries on the disk (no
> init!), and so would be unable to boot. For example: "cd /usr/src;
> make release DESTDIR=/var/tmp/dest RELEASEDIR=/usr/release"

I've found documentation on making a bootable cdrom. It said to make
your file system under the directory /cdimage and then use mksiofs or
mkhybrid to create the iso9660 image for a cdrom.  It did not make any
clear obvious references as to what this would do about a ramdisk.

I tried doing as you said about going to /usr/src and typing make
release. That failed miserably.  I also tried 
grep release `locate Makefile` to grep every Makefile on my system for
a release target and didn't get any good leads from that either.  I
did install netbsd 1.5 off the cdrom that I got from daemon news.

> 
> > I haven't found the documentation for disklabel and newfs / mount_mfs
> > to be very helpful.  With a bit of research I found out about adding
> > the lines:
> 
> "mfs" is an entirely different thing. To put a memory disk in the
> kernel, you build an entire file-system in a file, using "vnconfig",
> and insert that file into the kernel, using "mdset". Whereas an "mfs"
> filesystem is created in ram, a "ramdisk" in the kernel isn't in ram
> until you boot from it.
> 
> > boot netbsd.WHATICALLTHISKERNEL
> >
> > I get numbers and the spinny thingy (memory test?) and it immediately
> > reboots.
> >
> > I've tried mdconfig with both /dev/md0a and /dev/md0d, but it fails,
> > which doesn't surprise me since the kernel isn't compiled for memory
> > disks.
> 
> The INSTALL kernels are ready to go, with root on md0, but they will
> of course require that you have a ramdisk built and inserted into the
> kernel with "mdset". The easiest way to do this, by far, is to do the
> "make release" at the top-level.

I wasn't able to find where to do make release. Trying it at 
/sys/arch/i386/conf was quite unsuccessful. As was
/sys/arch/i386/compile/TARGETNAME.  Do the ramdisks from the kernel
have the ability to grow as memory is free?

   Larry

> 
> 
> Frederick

-- 
Larry Colen - Recourse Technologies - lrc@recourse.com - 650-381-8090