[comp.unix.questions] Corrupted Filesystem * IDEAS *

ac1@rosemary.cs.reading.ac.uk (Andrew Cunningham) (05/02/90)

In article <RW33-1Dggpc2@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes:
>I know the horses have already got out, but what we do at FICC is to
>dd the superblock out of every file system every night, so if it *does*
>get clobbered we can just dd it back and run fsck, which generally puts
>everything back together.


You could also try fsck -b<number>. This number if the superblock location.

I've yet to see a disk drive without a second superblock at 16 (/etc/fsck -b16)
though yours may be different.  Look in /etc/sbtab for a list if it's
not your root partition that's gone with the wind......



AndyC


Andrew Cunningham			 	JANET:ac1@uk.ac.reading.cs.csug
SNAIL: Dept. of Computer Science, Whiteknights, READING RG6 2AX
FROM UselessCapitals IMPORT Disclaimer;
"Sodomy non sapiens" (Buggered if I know)  -Terry Pratchett "Mort"

guy@auspex.auspex.com (Guy Harris) (05/04/90)

>I've yet to see a disk drive without a second superblock at 16 (/etc/fsck -b16)

I've seen plenty of them.

Some of them were running the BSD file system; they had it at 32, not 16.

Others were running the V7 file system as used by S5; they didn't *have*
a second superblock, period.

Does SCO Xenix's file system (which I'd have assumed was basically the
V7 file system as used by S5) store alternate superblocks somewhere?

torsten@pcsbst.pcs.com) (Administrator for this machine) (05/05/90)

In article <1990Apr29.133610.11755@NCoast.ORG> rhg@ncoast.ORG (Rich Garrett) writes:
>
>
>PROBLEM: I've lost a filesystem, one that has very important files on it.
>         As I posted to comp.unix.xenix, this was caused during a system
>         freeze while I was running Paradox under vpix.  A reboot followed
>         and I have to-date been unable to recover this filesystem.  The
>         paradox files were on the device /dev/de052 (/mnt2) and not on
>         or part of the DOS partition.
[..] Stuff deleted


	I've also sent this answer to Rich by mail but i think this is
	of general interest, so i post it here.

	I don't know vpix, but i think there are ways to do it :

	--You have a plain SYS_V filesystem, do the following :

	# :> file       # create an empty file
	# mkfs file YOUR_FILESYSTEM_CONFIGURATION     # do an mkfs which matches
						      # your damaged filesystem
		  # Be sure that you match it exactly !!!!!!!!!!!!!!!!!!!!!!!!!!
	          # Now use dd to copy the newly created superblock
		  # to your damaged filesystem. You should only copy
		  # the second block !!!!!

	# dd if=file of=/dev/device bs=512 skip=1 seek=1 count=1


	Now fsck will do the rest for you, because it now has all information
	it will need.


	--You have a BSD fast filesystem :

	Use fsck -b BLOCK to specify an alternate superblock to be used.
	On our Workhorses block 32 is always a copy of it.
	For your system lookup the fine manual ;-).

		Good luck, Torsten.
---
Name    : Torsten Homeyer
Company : PCS GmbH, Pfaelzer-Wald-Str. 36, 8000 Munich W-Germany.
UUCP    : ..[pyramid ;uunet!unido]!pcsbst!tho  (PYRAMID PREFERRED!!)
DOMAIN  : tho@pcsbst.pcs.[ COM From rest of world; DE From Europe ]
Name    : Torsten Homeyer
Company : PCS GmbH, Pfaelzer-Wald-Str. 36, 8000 Munich W-Germany.
UUCP    : ..[pyramid ;uunet!unido]!pcsbst!tho  (PYRAMID PREFERRED!!)
DOMAIN  : tho@pcsbst.pcs.[ COM From rest of world; DE From Europe ]