Re: RAMDISK now running! but some questions left.

Erik Änggård <[email protected]>
Newsgroups gmane.os.netbsd.ports.sandpoint
Message-ID <[email protected]>
Hi Boo. See my answers below.
/Erik

Boo Geum Jung wrote:

>Thank you very much for your answers.
>I tried as you mentioned.
>More script is attached just below.
>
>>As far as i know swapping to a ramdisk is does not serve any purpose.
>>Simply remove the swap line from your /etc/fstab.
>>
>I removed the line at fstab.
>But the follwoing error message came out.
>
>.....
>/etc/rc: WARNING: No swap space configured!
>.....
>
Well, that's just a warning. If you want to get rid of it you can add 
the following line to /etc/rc.conf:
no_swap=YES

>
>
>>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.
>>
>
>Yes, I manually did "mdsetimage" before vnconfig -u.
>This problem was cleared!
>
>>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.
>>
>
>.....
>Building databases...
>kvm_mkdb: /netbsd: No such file or directory
>.....
>
>kvm_mkdb was exeuted at initial time, and it need /netbsd.
>And some command like "netstat -rn" need /netbsd.
># netstat -rn
>netstat: /netbsd: No such file or directory
>
kvm_mkdb is run from /etc/rc.d/sysdb and since you don't have /netbsd it 
will give you that error message. But that shouldn't matter if you have 
created kvm.db manually as described above. Do you have a /var/db/kvm.db 
on your system? And is it the same as the one you created (run a "diff" 
on them to make sure they are the same). Maybe (but I don't think so) 
/etc/rc.d/sysdb will overwrite the manually created /var/db/kvm.db, if 
that is the case just comment out or remove the kvm_mkdb line in 
/etc/rc.d/sysdb.

>
>>Do they output any error messages?
>>
># useradd -m -c "Boo Geum Jung" -G wheel bgjung
>useradd: pw_mkdb failed: No such file or directory
># vipw
>vipw: the passwd file is busy.
>#
>
"pw_mkdb" should be read pwd_mkdb, right? It should be located here: 
/usr/sbin/pwd_mkdb, maybe you missed to add it to your ramdisk. When 
vipw gives that error message it's because there's a lock file named 
"/etc/ptmp", see man vipw (8). Just remove it and you should be able to 
run vipw again. Note: vipw also uses pwd_mkdb so you must fix that first.

PS. I take it that you're from Korea, is that correct? I'm going there 
on vaccation in a few weeks, do you have any recommendation on what to 
see and do in Korea?

>
>Boo Geum Jung
>
>Senior Member of Research Staff,
>Network SW Platform Team,
>Internet Technology Laboratory, ETRI
>161 Kajong-Dong, Yusong-Gu Taejon, Korea, 305-350
>[email protected]     +82-42-860-5315
>
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.