Skip site navigation (1)Skip section navigation (2)
Date:      02 Jul 2000 08:39:31 -0700
From:      Harry Putnam <reader@newsguy.com>
To:        freebsd-mobile@FreeBSD.ORG
Subject:   Re: Endless cycle of reboots
Message-ID:  <m2hfa8y218.fsf@reader.ptw.com>
In-Reply-To: David Bauer's message of "Sun, 02 Jul 2000 09:31:25 %2B0000"
References:  <m2k8f6sfak.fsf@reader.ptw.com> <395F0BED.BBEF2DE@genprofile.com>

next in thread | previous in thread | raw e-mail | index | archive | help
David Bauer <bauer@genprofile.com> writes:

> Harry Putnam wrote:
> > I was working on a way to start my network connection during boot and
> 
> I have this in pccard.conf:
> 
>         insert  logger -t pccard:$device -s NETGEAR FA410TX Ethernet
> inserted
>         insert  /etc/pccard_ether
>         remove  logger -t pccard:$device -s NETGEAR FA410TX Ethernet
> removed
>         remove  /sbin/ifconfig $device delete
> 
> The original pccard_ether script is designed to grab the pcmcia ethernet
> card configuration from rc.conf. I was not able to get this working so I
> replaced the pccard_ether with a very simple script:
> 
> #!/bin/sh
> /usr/local/sbin/fa_select ed1 0
> /sbin/ifconfig ed1 10.0.0.2
> /sbin/route add default 10.0.0.1
> 
> I have no idea why the machine is constantly rebooting. Even if the
> network configuration is absolutely wrong, the machine should stay up.
> Do you get a message like "Automatic reboot in progress.." as last
> console message or do you get a crash and reboot like after pressing a
> reset button ? If you have the reboot message is there any strange
> message before it, which could indicate what may be wrong in rc.conf ?
> 

What follows are the details of what caused this.  At the end are some
notes that might be important to fellow readers here.

Details:
This reboot cycle turned out to be caused by homeboy screwups in this
fashion:

I'd done some editing of pccard.conf rc.conf with lots of offlist
help.

The setup was working in that it was finding and making available the
pcmcia card so that the basic ifconfig commands could setup the
network .  In short, the NETGEAR FA410 was working fine (without any
fa_select).

I decided I wanted to automate the network setup so that when booted a
network would be started.  First off I put the normal `ifconfig_ed0'
type setting in /etc/rc.conf along with `defaultrouter' .  But it was
firing before the pccard was initialized.

So trying to find a later place to make those calls I tried
/etc/rc.local and put a call to a short script in /etc/rc.local.

The script said:
/bin/ifup-ed0:
^^^^^^^^^^
#!/bin/sh
sleep 15
ifconfig inet xxx.xxx.x.2 netmask 255.255.255.0 up
sleep 4
route add defalut xxx.xxx.x.1
## end    ^^^^^^^
^^^^^^^^^^

[NOTE: notice the misspelling of default -ed]

Well, looking back I think the machine was hanging after bootup while
the OS timed out looking for a `defalut' .  I took this hang to be an
`interminable hang' and powered down abrubtly.  Causing the inevitable
damage to the file system.

Then followed the sequence of recycling reboots.   I finally got in
with `boot -s' and ran fsck, still hadn't noticed the error message
about `defalut'.  Rebooted .... no cycling... bootup went all the way
but no prompt appeared.  (OS looking for defalut).  I just happened to
get busy with something else causing me to outwait the timeout and
bingo.. up jumps the login prompt.

From there I started studying boot messages and found the culprit.
Once corrected the setup worked ok.  A network would be established on
bootup. 

IMPORTANT notes:

I've learned a better way to do this from offlist help, that is
definitely the way to go and will probably work in other situations as
discribed in the reply message above.

Use the line:
pccard_ifconfig="xxx.xxx.x.3  netmask 255.255.255.0"

in /etc/rc.conf
That seems to know how to wait for the pccard to be initialized and
when to start the network.  I just have the stock /etc/pccard_ether.

Adding the normal `defaultrouter="xxx.xxx.x.1" to rc.conf works too so
apparently the pccard_ifconfig entry knows how to handle the timing of
things. 






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




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