Subject: Re: File system image
To: Perry E. Metzger <perry@piermont.com>
From: Brian Rose <saider@gate.net>
List: tech-embed
Date: 02/09/2003 00:17:37
Perry E. Metzger wrote:

>Well, maybe, maybe not. Why don't you post a transcript of the actual
>behavior here so we can understand what is going on. When I say
>transcript, I mean, a real full transcript, nothing left out.
>
>Also...
>
>How are you putting the file system onto the Disk on Chip? How are you
>putting /boot and the kernel onto the Disk on Chip? How does the Disk
>on Chip look to the hardware? Does the hardware think of it as an IDE
>or similar drive?
>  
>
Actually, I'm not booting from the Disk on Chip (yet). Right now it is 
simply booting off of an IDE hard drive. I'm still taking baby steps.

After I received Luke's message, I started experimenting with his 
method. Here's what I am doing now...

1) Copy INSTALL into TEST in /usr/src/sys/arch/i386/conf
2) config TEST
3) cd ../compile/TEST
4) make depend ; make
5) cp netbsd /home/ftp/netbsd.test
6) cd ~ ; makefs -t ffs fs_1.44M.img filesystem
note: filesystem is populqated with the /dev files (MAKEDEV ramdisk), 
/sbin/init, /bin/sh, /bin/ls, and a simple /etc/rc
7)  mdsetimage /home/ftp/netbsd.test fs_1.44M.img
8) boot up target machine to a normal NetBSD installation running off of 
the hard drive.
9) ftp netbsd.test  into /
10) reboot the target machine
11) at the boot prompt - 'boot netbsd.test'


This works fine as long as my MEMORY_DISK_ROOT_SIZE is set to 2880 for a 
1.44M ramdrive. If I change it to 32768 for a 16M ramdrive, then the 
machine reboots after the numbers are displayed on the screen, before 
the NetBSD banner.

I'm trying to figure out why it works in one case, but not the other.

(some time elapses)

I think I figured it out. Sometimes the obvious will get you.

The machine has 32M or RAM. I guess this is not enough for the kernel + 
16M ramdisk. I changed the MEMORY_DISK_ROOT_SIZE to 8192 for a 4M 
ramdrive, it works fine.

I did a quick check and did not find any info. Any ideas as to how I 
could compute my RAM footprint?

Thanks for the advice,

Brian