Subject: Boot process hangs in i386 with PCMCIA card inserted..??
To: None <netbsd-help@netbsd.org>
From: Paul Doyle <paul@mcmadd.net>
List: netbsd-help
Date: 02/23/2002 21:30:56
OK....

I figured out the untarring bit just before you mailed.  Now it does =
boot up and find a PCMCIA controller, but if I leave the card in during =
boot, it hangs with the prompt "db>"

What I can see from dmesg with a clean boot is:

pcmcia0 at cardslot0
pcmcia1 at cardslot1

Which is the correct settings I think for the cardbus/bridge for pcmcia.

I have created /etc/myname, /etc/mygate, edited the /etc/hosts file to =
include the IP address and name of the machine.  I created a =
/etc/ifconfig.eg file ready for when I know what interface it will be =
[ep0 etc]

Any ideas?

Paul

-----Original Message-----
From: Chris Lloyd [mailto:strawberry@toth.org.uk]
Sent: Saturday, February 23, 2002 11:10 AM
To: Paul Doyle
Subject: Re: i386 PCMCIA - Howto


On Sat, Feb 23, 2002 at 06:47:28PM -0000, Paul Doyle wrote:
> Thanks for replying.
>=20
> I am pretty new at this stuff so forgive me.

No problem, have to start somewhere :)

> I downloaded teh latest iso image and I am installing from the CD.  It =
installs OK, but I am not sure that I am doing the right thing.
>=20
> On installing should I choose custom and toggle the generic kernel?  =
If so will it allow me then to choose the generic laptop kernel?

The laptop kernel is pretty identical to the generic kernel. However it =
adds
support for some cardbus and usb devices that might be necessary to get =
a
laptop up and running but aren't needed for most desktop installs.
The chances are that the generic kernel will work fine for your laptop =
unless
it's quite new and needs cardbus support.

ftp://ftp.netbsd.org/pub/NetBSD/NetBSD-1.5.2/i386/INSTALL.txt has more=20
information on the things you should do after installation.

Installing the generic kernel should be fine, since pcmcia and support =
for
your network card is included with it. NetBSD doesn't have any of the =
problems
linux experiences with pcmcia devices, it should Just Work.

> Once I have installed, I have to change some parameters.  Along time =
ago when I used RedHat I had to change PCI_OPTS etc to get it working.

This is very rarely necessary with NetBSD, it'll probably just detect =
your
card on startup, or whenever you plug it in.

> When I looked at the documentation it [probably me being unable to =
understand], did not tell me that much..
> How can I tell if the correct kernel is loaded, or if PCMCIA support

When you first install NetBSD, you get a generic kernel, which has =
support
for pretty much absolutely everything. After you get NetBSD installed =
and
working the idea is that you should create a custom kernel (much easier =
on
netbsd than on linux!) that only contains the options you need for your =
system.

More information on kernel compilation can be found at:

http://www.netbsd.org/Documentation/kernel/#how_to_build_a_kernel

To make sure that netbsd found your pcmcia bits:

If you type in at a shell prompt "dmesg | less" without the quotes you =
should
see all the bootup messages repeated back. You should be able to scroll
through the list and you'll see something like:

pcmcia0 at pcic0 controller 0 socket 0 : PCMCIA controller

Except with numbers and a better description of the controller you have, =
this
indicates that netbsd found the pcmcia bus okay.

A bit later on it should have:

ep0 at pcmcia0 function 0 : 3Com 3c589 Ethernet
ep0: interrupting at irq <whatever>
ep0: MAC address xx:xx:xx:xx:xx:xx

Again, with meaningful values. If you see those three lines, or ones =
like them
then netbsd successfully found and configured your network card.

However it won't have assigned it an IP address or anything like that =
yet.
For example to configure your card with an IP address of 192.168.1.1 and
a subnet mask of 255.255.255.0 you would use:

ifconfig ep0 inet up 192.168.1.1 netmask 0xfffff00

at a (root) shell.

Or alternatively you would put the following line in /etc/ifconfig.ep0 :

inet up 192.168.1.1 netmask 0xffffff00

and then every time netbsd started up it would configure the card with =
those
addresses.

Hope everything goes okay now, write back to either me or the mailing =
list
if you have any more problems!

  - Chris

--
strawberry@toth.org.uk
http://www.toth.org.uk/~strawberry