Subject: Re: RAMDISK now running! but some questions left.
To: None <bgjung@etri.re.kr>
From: Erik Anggard <erik.anggard@packetfront.com>
List: port-sandpoint
Date: 05/17/2002 10:08:20
See my answers below.
/Erik
bgjung@etri.re.kr wrote:
>Finally, I successed RAMDISK version running now.
>The following messages are shown on my sandpoint.
>Some application programs like zebra protocol daemon, are executed well.
>And telnet at remote system is working.
>But I have a few unsolved prolems.
>(I worked with 20020224 version, 20020424 version had different install
>tools.)
>1) I made 28M ramdisk.fs and I used almost 20M for / partition.
> I used 4M for swap partition.
> "swap" is necessary for RAMDISK version?
> If so, 4M is not sufficient, I think.
>
As far as i know swapping to a ramdisk is does not serve any purpose.
Simply remove the swap line from your /etc/fstab.
>
>2) I don't know how to get rid of the following error message during
>initial procedure.
> /dev/md0a: file system not clean (fs_clean=4); please fsck(8)
> /dev/md0a: lost blocks 0 files 0
>
This should not happen if you created ramdisk.fs correctly, did you use
makefs(8) or did you make it "manually" using vnconfig, newfs, etc? To
get rid of the warning you can use vnconfig(8) to connect a vnd-device
to ramdisk.fs and then run fsck on that vnd-device. After that you run
vnconfig -u vnd-device and then mdsetimage(8) to install the fixed
ramdisk.fs into the kernel again.
>
>3) And it need /netbsd at initial step. So I placed GENERIC netbsd at /
>directory.
> I think it's not rigth way. But I don't know how to run without /netbsd.
>
Some applications, like ps, fstat etc., needs to lookup symbols (to get
their values) in the kernel. Normally the symbols are looked up in the
kernel in the root of the filesystem (i.e. /netbsd). In a setup like
yours that is however not very practical (since it means that the kernel
would be on the ramdisk which resides in the kernel image). There is
however an other way to do this using kvm_mkdb(8). This command will
extract the symbol table from your kernel and create a db file that
should reside in /var/db/kvm.db on your ramdisk. So after you have
compiled your kernel you run "kvm_mkdb -o kvm.db netbsd" (where netbsd
is the kernel you just compiled) and then you copy kvm.db to /var/db in
the directory tree you will use to make your ramdisk.fs. Install
ramdisk.fs in your kernel (using mdsetimage) and you're all set.
>
>4) useradd, and vipw couldn't chage master.passwd file.
>
Do they output any error messages?
>
>==================================
>....
>md0: internal 28672 KB image area
>boot device: <unknown>
>root on md0a dumps on md0b
>root file system type: ffs
>Enter pathname of shell or RETURN for sh:
>tset: terminal type pc3 is unknown
>Terminal type? vt100
>Terminal type is vt100.
>We recommend creating a non-root account and using su(1) for root access.
># exit
>Thu May 16 23:27:34 GMT 2002
>Starting file system checks:
>/dev/md0a: file system not clean (fs_clean=4); please fsck(8)
>/dev/md0a: lost blocks 0 files 0
>Setting tty flags.
>Setting sysctl variables:
>Starting network.
>Hostname: sandpoint3.etri.re.kr
>NIS domainname: etri.re.kr
>add net 127.0.0.0: gateway 127.0.0.1
>Configuring network interfaces: fxp0.
>add net default: gateway 129.254.168.1
>Adding interface aliases:
>Building databases...
>Checking for core dump...
>savecore: /dev/wd0a: Device not configured
>Mounting all filesystems...
>/dev/md0a: file system not clean (fs_clean=4); please fsck(8)
>/dev/md0a: lost blocks 0 files 0
>Clearing /tmp.
>Segmentation fault - core dumped
>Starting virecover.
>Checking quotas: done.
>Setting securelevel: kern.securelevel: 0 -> 1
>swapctl: WARNING: /var/swap is readable by the world
>swapctl: adding /var/swap as swap device at priority 0
>Updating motd.
>starting local daemons:.
>Starting inetd.
>Thu May 16 23:27:36 GMT 2002
>NetBSD/sandpoint (sandpoint3.etri.re.kr) (tty00)
>login: root
>Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
>The NetBSD Foundation, Inc. All rights reserved.
>Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994
>The Regents of the University of California. All rights reserved.
>NetBSD 1.5ZA (BINSTALL) #1: Fri Apr 26 13:14:10 KST 2002
>Welcome to NetBSD!
>Terminal type? [unknown] vt100
>Terminal type is vt100.
>We recommend creating a non-root account and using su(1) for root access.
># ps
>PID TT STAT TIME COMMAND
>160 00 Ss 0:00.08 -csh
>163 00 R+ 0:00.00 ps
># df -k
>Filesystem 1K-blocks Used Avail Capacity Mounted on
>/dev/md0a 28015 24223 3792 86% /
># cat /etc/fstab
>/dev/md0a / ffs rw
>/var/swap none swap sw 0 0
># ls
>./ .profile dist/ mnt/ root/ usr/
>../ bin/ etc/ mnt2/ sbin/ var/
>.cshrc dev/ files* netbsd* tmp/
>=========================================
>Boo Geum Jung
>Senior Member of Research Staff,
>Network S/W Platform Team,
>Internet Technology Laboratory, ETRI
>161 Kajong-Dong, Yusong-Gu Taejon, Korea, 305-350
>Tel:+82-42-860-5315 home:http://circle.etri.re.kr/~bgjung
>