From owner-freebsd-current@FreeBSD.ORG Mon Apr 20 10:39:59 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2846D1065670 for ; Mon, 20 Apr 2009 10:39:59 +0000 (UTC) (envelope-from info@martenvijn.nl) Received: from mail.math.leidenuniv.nl (mail.math.leidenuniv.nl [132.229.231.57]) by mx1.freebsd.org (Postfix) with ESMTP id E66D08FC21 for ; Mon, 20 Apr 2009 10:39:58 +0000 (UTC) (envelope-from info@martenvijn.nl) Received: from [132.229.231.13] (polaris.math.leidenuniv.nl [132.229.231.13]) by mail.math.leidenuniv.nl (Postfix) with ESMTP id 43E356E8F9; Mon, 20 Apr 2009 12:22:34 +0200 (CEST) From: Marten Vijn To: "K Anh, Hu" In-Reply-To: <20090420164641.1842c264@icy.local> References: <20090420164641.1842c264@icy.local> Content-Type: text/plain; charset=euc-jp Date: Mon, 20 Apr 2009 12:22:34 +0200 Message-Id: <1240222954.20308.6.camel@polaris> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org Subject: Re: auto boot into single mode X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Apr 2009 10:39:59 -0000 On Mon, 2009-04-20 at 16:46 +0700, K Anh, Hunh wrote: > Dear all, > > I have a pfSense router. pfSense is based on FreeBSD. > > Because of low cost design, I haven't any fail-over router. Hence I often follow these steps: > > * boot the router normally > * electric cut > * physically access the router > * boot the router in single mode > * run $fsck -y /dev/ad8s1a (automatically fix all errors) > * reboot the router in normal mode > * enjoy the next electric cut For crusial systems I put a box on top of it with USB (running NanoBSD or TinyBSD). USB gives my access to: - serial - power (Gembird Silver line) - http://sispmctl.sourceforge.net/ - http://www.freebsd.org/cgi/query-pr.cgi?pr=132786 You also may consider to rebuild your firewall in nanobsd, you don't have a gui, but will have of lot more freedom. cheers, Marten > > (Because the router has a very hard work it cannot suffer anything wrong on the harddisk.) > > I also have to do the same steps for my laptop. > > My question is that whether we can setup FreeBSD so that it can automatically boot into single mode if there's something wrong in hard disk, *OR* at least it will execute fsck automatically/successfully? > > (I often see that after such type of error, FreeBSD cannot fix the hard disk in normal mode. This is quite far from Linux; I rarely boot my Linux machines single mode after electric cut) > > Thank you for you helps, > > Regards, > -- Marten Vijn linux 2.0.18 OpenBSD 3.6 FreeBSD 4.6 http://martenvijn.nl http://opencommunitycamp.org http://wifisoft.org