Subject: Re: Wrestling with Ram Disks
To: Larry Colen <lrc@recourse.com>
From: Frederick Bruckman <fb@enteract.com>
List: port-i386
Date: 03/08/2001 14:56:40
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 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.
Frederick