From owner-freebsd-questions@FreeBSD.ORG Sun Jun 4 22:28:53 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 91EC016A476 for ; Sun, 4 Jun 2006 22:28:53 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from mxout5.cac.washington.edu (mxout5.cac.washington.edu [140.142.32.135]) by mx1.FreeBSD.org (Postfix) with ESMTP id 30DA943D45 for ; Sun, 4 Jun 2006 22:28:53 +0000 (GMT) (envelope-from youshi10@u.washington.edu) Received: from smtp.washington.edu (smtp.washington.edu [140.142.33.9]) by mxout5.cac.washington.edu (8.13.6+UW06.03/8.13.6+UW06.03) with ESMTP id k54MSqDR021968 for ; Sun, 4 Jun 2006 15:28:52 -0700 X-Auth-Received: from [192.168.0.40] (dsl254-013-145.sea1.dsl.speakeasy.net [216.254.13.145]) (authenticated authid=youshi10) by smtp.washington.edu (8.13.6+UW06.03/8.13.6+UW06.03) with ESMTP id k54MSjQ1016414 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=NOT) for ; Sun, 4 Jun 2006 15:28:51 -0700 Mime-Version: 1.0 (Apple Message framework v750) In-Reply-To: References: Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-Id: <1E4DD202-1F40-4C94-9CE5-B5763D172947@u.washington.edu> Content-Transfer-Encoding: 7bit From: Garrett Cooper Date: Sun, 4 Jun 2006 15:31:52 -0700 To: FreeBSD Questions X-Mailer: Apple Mail (2.750) X-Uwash-Spam: Gauge=IIIIIII, Probability=7%, Report='LEO_OBFU_SUBJ_RE 0.1, __CT 0, __CTE 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __SANE_MSGID 0, __STOCK_PHRASE_7 0' Subject: Re: forcing boot X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jun 2006 22:28:53 -0000 On Jun 4, 2006, at 2:40 PM, Lawrence Horvath wrote: > How can i force normal boot up even if the filesystem was uncleanly > dismounted, > i have a box that it looks like the HD is failing, but i still need > some of the info off it, so i would like to get it to boot normally > anyway so i can sftp/scp the files off it then i can replace the HD, > but it refuses boot anything but single user mode. > > Thanks > > -- > -Lawrence Don't think you can do that really because it's a failsafe with /etc/ rc. You may just want to try adding noauto to /etc/fstab for the time being so that booting doesn't halt on your system, then login and transfer all the data off your disk that you can. Since TERM isn't set in single-user mode, I've found learning how sed works is a very good thing to do. I believe this would fix your problem (can't test since my FBSD box has been down due to SCSI disk controller/PSU failure): #!/bin/csh FSTAB=/etc/fstab; #just a variable to reference the old fstab if [ -ne $1 ]; then # the device filename length should be non-zero cp -p $FSTAB $FSTAB.tmp; #backup the old fstab cat $FSTAB.tmp | sed -e s|^$1.*rw|$1.*rw,noauto|g > $FSTAB #replace rw for the old partition in fstab with rw,noauto fi -Garrett