Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Nov 1999 22:17:52 -0500
From:      Sergey Babkin <babkin@bellatlantic.net>
To:        Eduardo Viruena Silva <mrspock@esfm.ipn.mx>
Cc:        freebsd-questions@FreeBSD.ORG, freebsd-hackers@FreeBSD.ORG
Subject:   Re: FreeBSD 3.3,  DISKLESS, kernel format must be AOUT ?
Message-ID:  <383A0760.CCD09C66@bellatlantic.net>
References:  <Pine.BSF.4.05.9911221905270.29480-100000@Michelle.esfm.ipn.mx>

next in thread | previous in thread | raw e-mail | index | archive | help
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-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?383A0760.CCD09C66>