From owner-freebsd-mobile Sun Jul 2 10: 7:52 2000 Delivered-To: freebsd-mobile@freebsd.org Received: from mail.networkone.net (mail.networkone.net [209.144.112.75]) by hub.freebsd.org (Postfix) with SMTP id 30D7737B627 for ; Sun, 2 Jul 2000 10:07:42 -0700 (PDT) (envelope-from reader@newsguy.com) Received: (qmail 649 invoked from network); 2 Jul 2000 17:07:41 -0000 Received: from adsl-117-113.ln.networkone.net (HELO reader.ptw.com) (209.144.117.113) by mail.networkone.net with SMTP; 2 Jul 2000 17:07:41 -0000 Received: (from reader@localhost) by reader.ptw.com (8.9.3/8.9.3) id KAA28419; Sun, 2 Jul 2000 10:07:37 -0700 To: freebsd-mobile@FreeBSD.ORG Subject: Re: Endless cycle of reboots References: <395F0BED.BBEF2DE@genprofile.com> From: Harry Putnam In-Reply-To: David Bauer's message of "Sun, 02 Jul 2000 09:31:25 +0000" Date: 02 Jul 2000 08:39:31 -0700 Message-ID: User-Agent: Gnus/5.0807 (Gnus v5.8.7) Emacs/20.5 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Lines: 103 Sender: owner-freebsd-mobile@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org David Bauer 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