From owner-freebsd-questions Mon Nov 22 19:12:27 1999 Delivered-To: freebsd-questions@freebsd.org Received: from smtp02.teb1.iconnet.net (smtp02.teb1.iconnet.net [209.3.218.43]) by hub.freebsd.org (Postfix) with ESMTP id CD78A1593F; Mon, 22 Nov 1999 19:12:18 -0800 (PST) (envelope-from babkin@bellatlantic.net) Received: from bellatlantic.net (client-117-211.bellatlantic.net [151.198.117.211]) by smtp02.teb1.iconnet.net (8.9.1/8.9.1) with ESMTP id WAA13458; Mon, 22 Nov 1999 22:12:04 -0500 (EST) Message-ID: <383A0760.CCD09C66@bellatlantic.net> Date: Mon, 22 Nov 1999 22:17:52 -0500 From: Sergey Babkin X-Mailer: Mozilla 4.07 [en] (X11; I; FreeBSD 3.0-980222-SNAP i386) MIME-Version: 1.0 To: Eduardo Viruena Silva Cc: freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG Subject: Re: FreeBSD 3.3, DISKLESS, kernel format must be AOUT ? References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Eduardo Viruena Silva wrote: > > O! wise FreeBSD gurus! > I ask for your advice... > > I have a FreeBSD 3.3 system in a Pentium computer and an old 486 > computer that I want to make a diskless system. > > I found that in directory: /usr/src/sys/i386/boot/netboot > there is a way of building "nb3c509.com" program. > This program is used to emulate the "boot" chip for my 3c509 card. > It seems to work fine. Cool! It still works! :-) > It can get the "freebsd.xxx.xxx.xxx.xxx" file containing the parameters to > download the kernel image. It works ok and tries to download the > image. Nevertheless it halts displaying a message saying: > > kernel: Bad executable format! > > (or something like that). > > FreeBSD 3.3 uses ELF format and previous versions (2.x.y) use AOUT format. > > According to my believes, it seems that there is a function (or macro) > called "N_BADMAG" that tests the kernel file type, but I could not find it > in the source files. Trying to overcome this problem, I forced the test, > but "elf" image did not work. I guess when the new fancy 3-stage disk boot and ELF format support was introduced the network boot code was not updated and this seems to be the root of the problem. > Is there a way of building "nb3c509.com" accepting ELF format ? > == ===== = === == ======== ============= ========= === ====== = I guess yes but that would need some significant amount of work. > Do I have to create an AOUT kernel image? > > will it work? > it seems to works... > > Now, can you tell me which "/etc/rc.*" configuration scripts are executed > in the booting process? what file systems do they try to mount? The main script is /etc/rc which calls the other scripts. Normally it tries to mount the filesystems listed in /etc/fstab. > what is a "mfs" ? (memory file system? a virtual disk?) Yes, memory filesystem. > My computer gets frozen because of some kind of problem while booting. > it seems to be mounting several file systems in a "mfs" while it > starts. Does it happen during the diskless boot ? A good way of finding out which command is running now is pressing Control+T. And Control+C may be used to interrupt the current command if it seems to hang by unknown reason. I think that to use mfs a large enough amount of swap space must be configured. Otherwise I don't know what would happen when it gets out of memory but certainly nothing good. And if the swap space is configured over NFS then swapping is very slow. > Documentation about diskless installation is *very* old. I guess I was about the last one who touched it around '95. I can't remember any use of mfs in the netboot. I ran it with both root filesystem and swap on NFS and it ran although very slowly. Also I remember that I had very little memory (2MB to 4MB) on the diskless machines and the boot worked VERY slowly even on the 4MB machines until I cut the rc script to the very basics. -SB To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message