Re: WAY OT--Crisis...virus! Need help

Guest section DW (dwguest@win.tue.nl)
Tue, 27 Apr 1999 01:42:05 +0200 (MET DST)


From: James Willard <james@whispering.org>

... It does,
however, screw over your partition tables. I have two PCs right here that
are currently not functional because of this. Does anyone know if Norton
DiskDoctor might be able to fix the partition tables and at least recover
some data?

James D. Willard | Linux/FreeBSD/OpenBSD/Novell/Win/DOS/Minix User

What is that nonsense? Norton DiskDoctor?
Of course you use Linux DiskDoctor, and write it if it doesnt exist.
I think it exists already, but since I do not have a reference
and it is trivial to do, I just typed a tiny program that does a 100%
job of finding partitions on 4 of my disks. It only recognizes ext2
and old-fashioned swap space, and outputs (within a few seconds)

# ./rescue /dev/sda
0: partition or fat sector
ext2 partition: sectors 62 - 24799
ext2 partition: sectors 24800 - 4129199
4129200: partition or fat sector
old swap space: sectors 4129262 - 4390765
4402000: partition or fat sector
ext2 partition: sectors 4402062 - 8506399
8506400: partition or fat sector
ext2 partition: sectors 8506462 - 12523999
12524000: partition or fat sector

where sfdisk says

# sfdisk -l -uS /dev/sda

Disk /dev/sda: 1020 cylinders, 200 heads, 62 sectors/track
Units = sectors of 512 bytes, counting from 0

Device Boot Start End #sectors Id System
/dev/sda1 * 62 24799 24738 83 Linux
/dev/sda2 24800 4129199 4104400 83 Linux
/dev/sda3 4129200 12647999 8518800 5 Extended
/dev/sda4 0 - 0 0 Empty
/dev/sda5 4129262 4401999 272738 82 Linux swap
/dev/sda6 4402062 8506399 4104338 83 Linux
/dev/sda7 8506462 12523999 4017538 83 Linux
/dev/sda8 12524062 12647999 123938 ff BBT

Since it does not recognize anything other than ext2
and looks at every sector, it will be very slow on large disks
with other types of filesystem.
No doubt someone else can add stuff for other filesystems
(or tell me where to find the already existing utility).

Andries

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/