VERY OT, But this guy really needs help (PT clobbered)

Mike McCarty mike.mccarty at sbcglobal.net
Fri Feb 17 15:50:07 UTC 2006


Chasecreek Systemhouse wrote:
> On 2/17/06, Mike McCarty <mike.mccarty at sbcglobal.net> wrote:
> 
>>Over on the Debian lists is a guy who clobbered his partitions
>>last night, late. I spent a few hours poring over his information
> 
> 
> His partition table/disk label is destroyed most likely.
> 
> Is this a dual boot or linux only laptop?  Can he just try restoring
> grub using grub-install off a recovery CD?  I'm at a loss for helping
> because I have no idea what you tried thus far or what the actual
> events were leading up to this situation.


Of course you are at a complete loss, since I provided no
concrete information. First, I wanted to see whether there
were a volunteer helper. We can take this off-list, unless
you think that the others on Fedora might benefit enough.

I don't see any reason cfdisk needed to write to his /home
partition, even to rewrite the geometry information.

Here are the relevant dumps of his PT...

> 
> Here's my partition table now, in a couple different formats:
> 
>                                  cfdisk 2.11u
> 
>                               Disk Drive: /dev/hda
>                         Size: 30005821440 bytes, 30.0 GB
>               Heads: 15   Sectors per Track: 63   Cylinders: 62016
> 
>     Name        Flags      Part Type  FS Type          [Label]        Size (MB)
>  ------------------------------------------------------------------------------
>     hda5        Boot        Logical   Linux                             4702.45*
>     hda6        Boot        Logical   Linux                             1000.10*
>     hda7        NC          Logical   Linux ext3       [/home]         14999.98*
>     hda8                    Logical   Linux swap                         511.91
>     hda2        Boot        Primary   Linux ext3       [/]              5000.01
>     hda1        Boot        Primary   Win95 FAT32 (LBA)                 3790.89
>                             Primary   Free Space                           0.49
> 
> 
> Partition Table for /dev/hda
> 
>             First    Last
>  # Type     Sector   Sector   Offset  Length   Filesystem Type (ID)   Flags
> -- ------- -------- --------- ------ --------- ---------------------- ---------
>  3 Primary        0 41434469      63 41434470  Extended (05)          None (00)
>  5 Logical       63* 9184516*     63  9184454* Linux (83)             Boot (80)
>  6 Logical  9184517*11137831*     63  1953315  Linux (83)             Boot (80)
>  7 Logical 11137832*40434659       1#29296828* Linux (83)             None (00)
>  8 Logical 40434660 41434469      63   999810  Linux swap (82)        None (00)
>  2 Primary 41434470 51200099       0  9765630  Linux (83)             Boot (80)
>  1 Primary 51200100 58604174       0  7404075  Win95 FAT32 (LBA) (0C) Boot (80)
>    Primary 58604175 58605119       0      945  Free Space             None (00)
> 
> I didn't print the partition table before the changes, but it would
> have looked like this, gotten by deleting the two new partitions in
> cfdisk (without saving the changes):
> 
>                                   cfdisk 2.11u
> 
>                               Disk Drive: /dev/hda
>                         Size: 30005821440 bytes, 30.0 GB
>               Heads: 15   Sectors per Track: 63   Cylinders: 62016
> 
>     Name        Flags      Part Type  FS Type          [Label]        Size (MB)
>  ------------------------------------------------------------------------------
>                             Pri/Log   Free Space                        5702.57*
>     hda5        NC          Logical   Linux ext3       [/home]         14999.98*
>     hda6                    Logical   Linux swap                         511.91
>     hda2        Boot        Primary   Linux ext3       [/]              5000.01
>     hda1        Boot        Primary   Win95 FAT32 (LBA)                 3790.89
>                             Primary   Free Space                           0.49
> 
> Partition Table for /dev/hda
> 
>             First    Last
>  # Type     Sector   Sector   Offset  Length   Filesystem Type (ID)   Flags
> -- ------- -------- --------- ------ --------- ---------------------- ---------
>    Pri/Log        0 11137831*      0#11137832* Free Space             None (00)
>  3 Primary 11137832*41434469       0 30296638* Extended (05)          None (00)
>  5 Logical 11137832*40434659       1#29296828* Linux (83)             None (00)
>  6 Logical 40434660 41434469      63   999810  Linux swap (82)        None (00)
>  2 Primary 41434470 51200099       0  9765630  Linux (83)             Boot (80)
>  1 Primary 51200100 58604174       0  7404075  Win95 FAT32 (LBA) (0C) Boot (80)
>    Primary 58604175 58605119       0      945  Free Space             None (00)
> 
> 
> 
>>> Well, you are the one who did things. Did you keep a written
>>> log of your actions and what happened?
> 
> 
> The exact actions I took were to run boot into knoppix, then:
> cfdisk /dev/hda
> move cursor onto unused space
> n (new partition)
> l (logical)
> Size (in MB):  1000
> e (end)
> move cursor onto unused space
> n (new partition)
> l (logical)
> Size (in MB):  4702.47   (all the remaining space)
> e (end)
> 
> I mounted the root partition and changed hda5 and hda6 to hda7 and
> hda8, and ran update-grub while chrooted into the root partition
> (which I later realized was unnecessary, since the root partition
> didn't change).
> 
> One thing I noticed is that the home partition now has the flag "NC"
> which I don't think it had before.  Also, I got a warning that since I
> had more than one bootable partition (I now have four), DOS MBR could
> not read this.  I didn't worry about it, since I'm using GRUB.
> 
> 
> 
>>> I recommend that you not exit Knoppix until either you are
>>> reasonably satisfied that you are fixed up, or until
>>> you give up in despair. Hopefully, with a little help,
>>> you can get back where you were.
>>>
>>> We're here to help, if we can.
> 
> 
> THANK you.  I will remain in knoppix until said conditions.

===============================================================

> Here is the output of fdisk -u and fdisk -u -l:
> 
> knoppix at ttyp0[knoppix]$ sudo fdisk -l
> 
> Disk /dev/hda: 15 heads, 63 sectors, 62016 cylinders
> Units = cylinders of 945 * 512 bytes
> 
>    Device Boot    Start       End    Blocks   Id  System
> /dev/hda1   *     54181     62015   3702037+   c  Win95 FAT32 (LBA)
> /dev/hda2   *     43847     54180   4882815   83  Linux
> /dev/hda3             1     43846  20717203+   5  Extended
> /dev/hda5   *         1      9720   4592195+  83  Linux
> /dev/hda6   *      9720     11787    976626   83  Linux
> /dev/hda7         11787     42788  14648413+  83  Linux
> /dev/hda8         42789     43846    499873+  82  Linux swap
> 
> Partition table entries are not in disk order
> knoppix at ttyp0[knoppix]$ sudo fdisk -u -l
> 
> Disk /dev/hda: 15 heads, 63 sectors, 62016 cylinders
> Units = sectors of 1 * 512 bytes
> 
>    Device Boot    Start       End    Blocks   Id  System
> /dev/hda1   *  51200100  58604174   3702037+   c  Win95 FAT32 (LBA)
> /dev/hda2   *  41434470  51200099   4882815   83  Linux
> /dev/hda3            63  41434469  20717203+   5  Extended
> /dev/hda5   *       126   9184516   4592195+  83  Linux
> /dev/hda6   *   9184580  11137831    976626   83  Linux
> /dev/hda7      11137833  40434659  14648413+  83  Linux
> /dev/hda8      40434723  41434469    499873+  82  Linux swap
> 
> Partition table entries are not in disk order
> knoppix at ttyp0[knoppix]$
> 
> 
> (I'm including Mike's last message below for the archives, as it has
> some useful info in it)
> 
> 2006/2/17, Mike McCarty <mike.mccarty at sbcglobal.net>:
> 
>>> Levi Waldron wrote:
>>
>>>> > 2006/2/17, Mike McCarty <mike.mccarty at sbcglobal.net>:
>>>> >
>>>
>>>>> >>First step before messing with partitions: do a backup.
>>>>> >>Second step before messing with partitions: save your MBR on a floppy.
>>>>> >>Third step before messing with partitions: save the first sector
>>>>> >>of each partition on a floppy.
>>>
>>>> >
>>>> >
>>>> > I have backups at home of everything important on the home partition,
>>>> > but I'm on the road right now and it will be very annoying if I have
>>>> > to resort to that...  more info than needed though  :) .  Point taken,
>>>> > backup backup backup.  The MBR didn't seem like a big deal to me
>>>> > because I don't have a floppy, and figured I could always rebuild it
>>>> > from Knoppix.  I didn't know about saving the first sector of each
>>>> > partition - thank you an I will in the future.
>>
>>>
>>> The first sector of each partition is the Boot Record
>>> for that partition, sometimes also called the BPB,
>>> though that's rather dated and not actually applicable
>>> for non-MSDOS partitions.
>>>
>>> First thing I did with my machine after I got it home
>>> was add a floppy disc drive. Dunno why they don't come
>>> with 'em any more.
>>>
>>
>>>>> >>I dunno what you have in your MBR for boot code, but
>>>>> >>I don't see how you created two more if you have a
>>>>> >>"normal" setup. With a normal setup, you can only
>>>>> >>have up to four partitions, one of which can be
>>>>> >>"extended" and have logical partitions in it.
>>>>> >>You already had three partitions, so how did you
>>>>> >>add two more? I suppose that hda5 and hda6 are inside
>>>>> >>of an extended partition you created before. Or are
>>>>> >>you using LVM? If you use LVM, I can't help you much
>>>>> >>if at all.
>>>>> >>
>>>>> >>What does fdisk say?
>>>>> >>What were the start/end addresses before you changed the PT?
>>
>>>
>>> The stuff to look at is the start/end disc addresses for the
>>> partitions, and the types. What I see here does not indicate
>>> that you simply moved some partitions down, unless cfdisk
>>> actually copied a bunch of data. That would have taken a
>>> significant amount of time. E.g. to copy /home to hda7 would
>>> require copying 15 GB which would take several minutes.
>>>
>>> I hope you understand that I'm sitting here reading this stuff
>>> and trying to make some sense of it. I know you are on
>>> tenterhooks, but I haven't gone away.
>>>
>>> Anyway, it'll take a little while to figure out what is likely
>>> to have happened. I'm not real familiar with cfdisk.
>>>
>>> Also, there may be others out there more familiar with cfdisk
>>> who can help.
>>>
>>> Hang in there. As Red Green says, "We're all in this together,
>>> and I'm pullin' for you."
>>>
>>> Anyway, just sent this note so you wouldn't feel abandoned
>>> or lost, at least not just yet.





Mike
-- 
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!




More information about the fedora-list mailing list