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

Re: Debian FDISK vs. Microsoft Format

On Wed, Aug 15, 2001 at 11:58:32PM -0700, Curt Howland wrote:
> I am trying to install Debian and Windows on the same 4GB 
> drive, and have run into a snag.
> After giving up on Windows, and making backups, I booted
> from the Debian CD and repartitioned. After reading the
> Multi-OS mini HowTo, I set up 4 partitions:
> 2.5GB FAT32 Primary Boot
> 1.6GB Linux Native Boot
> 100MB Linux Swap
> 100MB FAT32 Logical
> Debian installed fine, no problems.
> Putting in the Win95 CD and floppy, I started to format
> the C: partition.
> HOWEVER: Format reported 3.9GB of C: drive. This is very
> wrong. MS fdisk (on the floppy, yes I've done this sort of
> thing before) reports the correct sized partition of 2.5GB.
> Did I do this in the wrong order? Should I have used MS fdisk
> first, to create the partitions, then Debian fdisk to redefine
> as the correct partition types?
> That is the only thing I can think of doing differently. But
> I would prefer not to loose the Debian install.

>From 'man fdisk':

       The DOS 6.x FORMAT command looks for some  information  in
       the  first  sector  of the data area of the partition, and
       treats this information as more reliable than the informa­
       tion in the partition table.  DOS FORMAT expects DOS FDISK
       to clear the first 512 bytes of the data area of a  parti­
       tion  whenever a size change occurs.  DOS FORMAT will look
       at this extra information even if the /U flag is given  --
       we consider this a bug in DOS FORMAT and DOS FDISK.

       The  bottom  line  is  that  if you use cfdisk or fdisk to
       change the size of a DOS partition table entry,  then  you
       must  also use dd to zero the first 512 bytes of that par­
       tition before using DOS FORMAT to  format  the  partition.
       For example, if you were using cfdisk to make a DOS parti­
       tion table entry for /dev/hda1, then (after exiting  fdisk
       or  cfdisk and rebooting Linux so that the partition table
       information is  valid)  you  would  use  the  command  "dd
       if=/dev/zero  of=/dev/hda1  bs=512  count=1"  to  zero the
       first 512 bytes of the partition.

       BE EXTREMELY CAREFUL if you use the dd  command,  since  a
       small  typo can make all of the data on your disk useless.

End man page quote.

I think this is the root of your problem.  I would suggest to format
the DOS partition from Linux ( apt-get install dosfstools && mkdosfs
-F 32 -n MS-junk /dev/hda1 ), then install Windows (if you absolutely
have to).

You can also change the sequence as you were saying, but then you put
your Debian installation at risk.

Good luck


Rolf Heckemann

Reply to: