From owner-freebsd-questions Wed Sep 29 1: 2:45 1999 Delivered-To: freebsd-questions@freebsd.org Received: from freebie.lemis.com (freebie.lemis.com [192.109.197.137]) by hub.freebsd.org (Postfix) with ESMTP id 9E05D150A6 for ; Wed, 29 Sep 1999 01:02:35 -0700 (PDT) (envelope-from grog@freebie.lemis.com) Received: (from grog@localhost) by freebie.lemis.com (8.9.3/8.9.0) id RAA85327; Wed, 29 Sep 1999 17:29:40 +0930 (CST) Date: Wed, 29 Sep 1999 17:29:40 +0930 From: Greg Lehey To: "Oleg L. Tortseff" Cc: freebsd-questions@freebsd.org Subject: Re: Problem with repearing damaged filesystem! Message-ID: <19990929172939.B85028@freebie.lemis.com> References: <19990925092518.Y54407@freebie.lemis.com> <199909271736.VAA62265@dmitrov.ru> <19990925092638.Z54407@freebie.lemis.com> <199909271729.VAA62119@dmitrov.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.4i In-Reply-To: <199909271729.VAA62119@dmitrov.ru>; from Oleg L. Tortseff on Mon, Sep 27, 1999 at 09:29:33PM +0400 WWW-Home-Page: http://www.lemis.com/~grog X-PGP-Fingerprint: 6B 7B C3 8C 61 CD 54 AF 13 24 52 F8 6D A4 95 EF Organization: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Monday, 27 September 1999 at 21:29:33 +0400, Oleg L. Tortseff wrote: > Hello, Greg! > >>> run fsck on /dev/wd3c >> >> Oleg's error message indicates that the file label is so messed up >> that he can't even read it. This is bad stuff. > Not at all. When I'm booting from fixit floppy I CAN read label, > but it is empty! Step-by-step: > > Fixit# disklabel -r /ev/rwd3 > # /dev/rwd3: > type: unknown > disk: amnesiac > label: > flags: > ...some sh#t about HDD... > 8 partitions: > # size offset fstype [fsize bsize bps/cpg] > c: 6185088 0 unused 0 0 # (Cyl. 0 - 6135) > > In fact, label is really empty (I saw it in 1-st physical sector). I don't > know who and how made it, but i need to repear that HDD. OK, you should be able to change this label with disklabel -e. The question is, do you recall how you partitioned the disk? If so, just recreate it. If not, one possible way to do this is to create a single a partition the same size as the disk. Do an fsck -n on it (don't write anything back, just see if it looks like it's finding a file system there). If it does, you can do an fsck -y and mount the file system. Then you'll find the real size of the file system, and you can modify the label and create another partition out of the rest of the disk. If you had swap on the disk, of course, you're going to have to know how big it was, or you'll have difficulty finding the next file system. > In man pages I saw something about in-core label... I wanna drag it > from, and drop it in 1-st physical sector, if it possible. Well, it's not a drag and drop business, and since the in-core label gets read from disk, you're out of luck once you reboot. Greg -- When replying to this message, please copy the original recipients. For more information, see http://www.lemis.com/questions.html See complete headers for address, home page and phone numbers finger grog@lemis.com for PGP public key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message