From owner-freebsd-questions@FreeBSD.ORG Sat Nov 5 22:56:02 2005 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 132D416A41F for ; Sat, 5 Nov 2005 22:56:02 +0000 (GMT) (envelope-from grog@lemis.com) Received: from ext-gw.lemis.com (ext-gw.lemis.com [150.101.14.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 580DA43D45 for ; Sat, 5 Nov 2005 22:56:01 +0000 (GMT) (envelope-from grog@lemis.com) Received: from wantadilla.lemis.com (wantadilla.lemis.com [192.109.197.135]) by ext-gw.lemis.com (Postfix) with ESMTP id EFC85131D59; Sun, 6 Nov 2005 09:25:59 +1030 (CST) Received: by wantadilla.lemis.com (Postfix, from userid 1004) id C2161854C3; Sun, 6 Nov 2005 09:25:59 +1030 (CST) Date: Sun, 6 Nov 2005 09:25:59 +1030 From: Greg 'groggy' Lehey To: alicornio Message-ID: <20051105225559.GD85332@wantadilla.lemis.com> References: <20051105_040249_019155.alicornio@ig.com.br> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="ZARJHfwaSJQLOEUz" Content-Disposition: inline In-Reply-To: <20051105_040249_019155.alicornio@ig.com.br> User-Agent: Mutt/1.4.2.1i Organization: The FreeBSD Project Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: freebsd-questions@freebsd.org Subject: Re: Problems on start of my system 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: Sat, 05 Nov 2005 22:56:02 -0000 --ZARJHfwaSJQLOEUz Content-Type: text/plain; charset=us-ascii Content-Disposition: inline [Format recovered--see http://www.lemis.com/email/email-format.html] Computer output wrapped. On Saturday, 5 November 2005 at 2:02:49 -0200, alicornio wrote: Content-Description: Mail message body > Hi all > > I have a problem on start of my system, appear this mesage: > > Staring file system checks: > /dev/ad0s1a: 1304 files, 18242 used, 300053 free (1149 frags, 37363 blocks, 0.4% fragmentation) > /dev/ad0s1g: DEFER FOR BACKGROUND CHECKING > /dev/ad0s1f: DEFER FOR BACKGROUND CHECKING > /dev/ad0s1d: DEFER FOR BACKGROUND CHECKING > /dev/ad0s1e: FILE SYSTEM CLEAN; SKIPPING CHECKS > /dev/ad0s1e: clean, 57112 free (40 frags, 7134 bloks, 0,1% fragmentation) > WARNING: /home was not properly dismounted > ad0: FAILURE - READ-DMA status=51 ERROR=40 LBA=2398527 > mount: /dev/ad0s1: input/output error > WARNING: /usr was not properly dismounted > WARNING: /var was not properly dismounted > mounting /etc/fstab filesystems failed, start up aborted > ad0: FAILURE - READ-DMA status=51 ERROR=40 LBA=2191743 > boot interruped > enter full pathname of shell or return for /bin/sh: > > I type something and the system reboot after this mesages: If you typed something, you should say what. But in this case, you have two problems. Most people replying to this thread have concentrated on the unclean umount. The real issue seems to be the hard errors on the disk: LBA=2398527 LBA=2191743 The question is: which file system? That's not clear from the output. There's a very good chance that you need a new disk, but the question is how to recover the data. You have a choice of what to do now. The safest approach is: - buy a new disk and install your chosen version of FreeBSD on it. - put the old disk in the system in some other position (slave or second IDE channel, for example). - mount the file systems read-only, without running fsck - copy across the data that you need. If you choose to keep the existing disk, you can try this: - run fsck -u on each file system in turn: fsck -y / fsck -y /usr fsck -y /var fsck -y /home If the system panics, you will know which file system was affected. The ones that have already been fsck'ed will stay that way; you don't need to repeat that. - If it succeeds, you're done. Otherwise you have at least narrowed down the problem to a specific file system. You can mount it read-only and back up the contents. Then, if it's not the root file system (this won't work for the root file system), do (assuming that it's /dev/ad0s1g, which you don't appear to have :-), dd if=/dev/zero of=/dev/ad0s1g bs=128k conv=sync seek=9 This writes zeroes to the entire partition, with the exception of the disk label. Obviously this destroys all data on the partition. It's possible that the drive will then succeed in writing the data and clean up the soft errors. If this works, you can run newfs on the partition and restore the data. Greg -- When replying to this message, please copy the original recipients. If you don't, I may ignore the reply or reply to the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address and phone numbers. --ZARJHfwaSJQLOEUz Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iD8DBQFDbTh/IubykFB6QiMRAu1VAJ46B6Lm4cEm7HuB7xtm3wvI5fQOoQCgoSoH rTY2hGeTZ+rN4YXZyfs/buc= =vef0 -----END PGP SIGNATURE----- --ZARJHfwaSJQLOEUz--