Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Jan 2001 17:01:26 +0100
From:      Danny Pansters <danny@ricin.com>
To:        "Ming Tang" <mtang@prairienet.org>
Cc:        freebsd-questions@freebsd.org
Subject:   Second NIC and kernel config when installing fBSD ( was Re: FreeBSD installation)
Message-ID:  <01010117012601.25486@ricin.localnet>
In-Reply-To: <002d01c07350$cdc21340$09141618@chmpgn1.il.home.com>
References:  <000e01c071f5$251c1ee0$09141618@chmpgn1.il.home.com> <00123001511600.00360@ricin.localnet> <002d01c07350$cdc21340$09141618@chmpgn1.il.home.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Sunday 31 December 2000 18:40, you wrote:

> My intention for the upgrade is to build up a proxy server for my home
> network, so I need to put another NIC (3Com 3C900) into the computer. The
> new NIC is not any brand names showing in the Kernel Configuration Menu. I
> just booted the computer and it seems like the computer detect the new
> device which I can see by ifconfig. I then gave an IP for the NIC,
> everything seems working fine with ping command. 

OK, you probably see a xl0 interface. You can put your ifconfig parameters in 
/etc/rc.conf to make them be set at boot. Use man rc.conf to learn more. You 
can also run /stand/sysinstall and have this stuff done in the networking 
menu, configure additional network services. Here's a part of my gateway 
machine's /etc/rc.conf:

gateway_enable="YES"
network_interfaces="lnc0 xl0 lo0"
ifconfig_xl0="inet 212.120.8x.xx netmask 255.255.240.0" # @home cablemodem
defaultrouter="212.120.80.1"
ifconfig_lnc0="inet 192.168.100.1 netmask 255.255.255.0"
hostname="arsenicum.localnet"

In the end you should have something like this too. In my case I have a 3com 
card (xl) and some old on-board AMD ethernet controller (lnc). Since you've 
already used both NICs you should be able to tell which ones you'll need in 
your kernel config. I know the descriptions in the interactive kernel menu 
when booting off the floppies are not really clear, if you absolutely can't 
find anything else, maybe you should just try those one by one until you find 
the right one. If theyre both 3com cards you should see a xl0 and xl1 when 
both are put in the machine, otherwise an xl0 and an ed0 or lnc0 or some 
other. Please note that the menus you get on install boot have the purpose to 
get you going through the install (including a working NIC of course) but in 
my view it's not really meant as a method to see/configure your two nics 
right away, though it might work (in my case it did). If the unknown NIC 
worked with an earlier fBSD, you should know what its driver was called!? I 
can't imagine that it would not be supported now. 

> Now I am a little bit
> confused since I did not do anything yet and expect to further configure
> the kernel for its new network driver. I am afraid that I will get some
> problem later. Is this normal? If I need to configure kernel for the new
> network driver, could please tell me where to change to move the name of
> the driver into the Kernel Configuration Menu?

The kernel menu you can enter when booting off the install floppies is a 
somewhat user-friendly front-end to an interactive kernel menu that can make 
you do stuff right before loading the kernel. Its main use is being able to 
boot another (old) kernel in case you screwed up and installed a kernel that 
doesn't boot. If you have a linux background (my guess) you'll be familiar 
with the "append" thing you can do with LILO, this is somewhat the same 
thing. Because the generic kernel from the second floppy has many drivers 
compiled into it (to support the most common hardware) they give you the 
chance to drop into the kernel config menu to prevent conflicts by disabling 
certain (most) drivers. You'll find those in /boot/kernel.conf file. I 
suppose that quite a lot of people continue to use the generic kernel (if 
everything works) but of course this is really an ugly way to configure the 
kernel. You might want to try renaming kernel.conf and see what happens when 
booting with all NIC drivers in the generic kernel enabled or experiments 
alike. If your machine is able to boot the generic kernel with both NICs and 
if you can see them both being detected (use dmesg) then you might not have 
to compile kernel, although in the end you probably will want to to make it 
smaller and/or to enable things that do require a kernel compile.

For these reasons, I suggest you build a new kernel. If you didn't install 
kernel sources yet, you can do this with sysinstall easily.. pick source 
distribution and then pick only kernel sources (i think its called ssys).
Now have a look at two files in /usr/src/sys/i386/conf/ that is GENERIC and 
LINT. GENERIC is the configuration file for your curent generic kernel. This 
is a good starting point for making your own config file. FreeBSD does not 
have a nice menu to make a kernel config file like Linux. You are required to 
make your own file. Most people name it after the computer's name but you 
don't have to. The LINT file is NOT usable to compile from but it has many 
examples for most drivers/modules available as well as some warnings, so look 
through it. So you can edit the old GENERIC file and steal some lines from 
LINT. It's really simple, if you know which hardware you have you can delete 
anything else from your config file (I recommend doing that). Please be 
careful, a few options MUST be in it. Also, the GENERIC file shows you most 
supported NICs and if you need to you could even try them one by one.

In short, to compile a kernel: Suppose you made a config file called MYKERNEL 
in /usr/src/sys/i386/conf/ then you type config MYKERNEL, next cd to 
/usr/src/sys/compile/MYKERNEL and type make depend, after that type make and 
you can have coffee :-) Finally you type make install. You may want to clear 
your old /boot/kernel.conf otherwise you could see some silly warnings on 
boot.

Please read the kernel part of www.freebsd.org/handbook for more info. Also, 
have a look at README files or the like that come with your kernel sources. 
Please keep in mind that only two months ago I still used Linux and not fBSD, 
so if the handbook says anything contradictory to what I wrote, then please 
trust the handbook.

> Happy New Year!

Same to you and good luck! Hope I don't confuse you even more with this much 
info. 


Danny


P.S. When replying to email you get because of a question you post on the 
mailing list, please send a cc to the mailing list too. Chances are that 
other people might react to it and that again can be helpful for you or for 
me. It will also end up in the mailing list's archive so that it might be 
useful for other people later. Thanks.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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