I seem to have managed to corrupt my /usr partition with cfdisk, by
impetuously trying to maximize its space (without really understanding what
I was doing).
Here's what I did. Breathless with excitement to upgrade to RedHat 6.0 on
my Compaq Presario 1621 (laptop), which is currently running 5.1, and
dismayed that I seemed not to have enough space on my /usr and / partitions
for even a minimal upgrade (I'm using a partition that takes up
approximately half of a 2 GB drive; other half is Win95), I started poking
around for ways of making even just A LITTLE more space. I came across the
"m" (maximize) option in cfdisk, which apparently recovers unused space
between the partition table and the beginning of a partition, the only cost
being a loss of compatibility with OS/2 and Windows. I didn't know how
much space I might recover, and I didn't really understand the process, but
I rashly went ahead with it anyway. I chose "m", then "w" (for write to
disk).
Sure enough, something went wrong. I don't remember exactly the message
I got from cfdisk, but I went ahead and rebooted, recalling that the cfdisk
man page suggested doing so in most cases after adjusting a partition.
The system wouldn't boot -- couldn't mount /usr (/dev/hda6 on my system).
I dug out my emergency boot floppy, brought it up in emergency mode, and
ran fsck.
Fsck told me that I had a bad "magic number" in the superblock for
/dev/hda6, and recommended running e2fsck -b 8193, to attempt to get to
some kind of backed-up version of the superblock (I didn't really
understand this). E2fsck (-b 8193) gave me the exact same message,
including the recommendation to run itself with the same option. Sensing
the possibility of an infinite recursion, I decided to bail.
At this point, it is evident to me that I probably could sort of reformat
/dev/hda6 (perhaps using mke2fs?), and then reinstall its contents, but of
course, I'd rather not do that. I'm in the middle of a big development
project (what kind of bozo tries to upgrade the OS at a time like this?),
and would like to get my system back up as quickly as possible. At this
point, I don't even care about the upgrade to RedHat 6.0 -- I can deal with
that later (probably need to get Partition Magic and do some resizing of
partitions). I just want Linux running!
Anyone know of a way to recover my corrupted partition?
Many thanks to anyone who can help!
Adam Siepel
P.S. /dev/hda6 is a logical partition, in case that makes a difference.
---------------------------------------------------------------------------
Adam Siepel phone: (505)982-7840
Software Development Group Leader fax: (505)995-4432
National Center for Genome Resources WWW: http://www.ncgr.org
1800-A Old Pecos Trail e-mail: [EMAIL PROTECTED]
Santa Fe, NM 87505