[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Preventing windows from screwing linux up - my own fault



Ah,
well it seems that is partly my own fault, though it was some
time before I found this out..

It's a long story by now but my disk looks essentially like this

Disk /dev/hda: 255 heads, 63 sectors, 2432 cylinders
Units = cylinders of 16065 * 512 bytes

   Device Boot    Start       End    Blocks   Id  System
   /dev/hda1   *         1       742   5960083+   c  Win95 FAT32 (LBA)
   /dev/hda2           743      2389  13229527+   5  Extended
   /dev/hda3          2390      2414    200812+  82  Linux swap
   /dev/hda5           743      1168   3421813+  83  Linux
   /dev/hda6          1169      1776   4883728+  83  Linux
   /dev/hda7          1777      2389   4923891   83  Linux

Unfortunately, I had used some software to resize the FAT32 hda1 when
I was first installing linux (I cant remember which software, it was a
few months ago), and at some point the FAT32 filesystem thought
it was larger than 742 cylinders.... Very recently lots more files went
onto the windows partition, and these managed to spill over from 
hda1 and overwrite the extended partition table in hda2 ( which contains
the extended linux partitions hda5, 6 and 7 )  - with the extended
partition table overwritten and the first few superblocks of the hda5
filesystem gone, i wasnt able to access hda5, 6 or 7 !!
All my files/data were gone  (I had two synchronised copies though, so I
wasnt really worried  :)  )

Last night when I used that _great_ utility gpart, it was able to find
the hda6 and hda7 filesystems which allowed me to rebuild the extended
partition table. The files/data on these were untouched thankfully.
I could then try to repair hda5 - but it was beyond help - this
was essentially all my debian installation.

Anyway gpart told me what was wrong - 
my partition table reported via gpart:

dev(/dev/hda) mss(512) chs(2432/255/63)(LBA) #s(39070080) size(19077mb)
Primary partition(1)
   type: 012(0x0C)(DOS or Windows 95 with 32 bit FAT, LBA) (BOOT)
   size: 5820mb #s(11920167) s(63-11920229)
   chs:  (0/1/1)-(741/254/63)d (0/1/1)-(741/254/63)r

but gpart examined the filesystem and said:

Possible partition(DOS FAT), size(6000mb), offset(0mb)
   type: 012(0x0C)(DOS or Windows 95 with 32 bit FAT, LBA)
   size: 6000mb #s(12288465) s(63-12288527)
   chs:  (0/1/1)-(764/235/63)d (0/1/1)-(764/235/63)r


!! - hence the reason for my linux filesystem getting overwritten...
(the Fat32 filesystem thought it had more room than the partition
table should have allowed it....  an extra 23 cylinders!!  )

Now I just have to figure out how to correct this problem, having
reinstalled Debian last night....

Thanks for all the helpful suggestions....

Cormac


On Mon, Jul 23, 2001 at 07:49:16PM -0400, Andy Saxena wrote:
> Could you please provide more information? It would help to know what your 
> partition table looks like (from fdisk). Could you state more specifically 
> what symptoms this has caused? Were you not able to boot into Linux; files 
> went missing, etc.
> 
> -Andy
> 
> On Monday July 23 2001 17:35, Cormac McGuinness wrote:
> > Hi
> > I'm hoping someone can help me with my frustrating problem...
> > I have a laptop, and something installed under windows 98 has now
> > (twice) overwritten the initial part of my Linux filesystem
> > which exists in an extended partition.
> > How can I prevent this (other than by deinstalling windows! - my wife
> > needs to use our laptop occasionally)
> > Is there a free (GPL'd) or cheap piece of windows 98 software that cen
> > prevent disk writes to any partition other than /dev/hda1  ?
> > I havent managed to identify what piece of software is the culprit
> > yet...
> >
> > Yours
> > Cormac



Reply to: