PDA

View Full Version : Reformatting NTFS -> FAT32



dataco
03-01-2006, 11:16 PM
Hi

I tring to automate a system recovery script but I am having problems formatting a partition.

I have a NTFS partition and using the command mkdosfs -F 32 /dev/hda1 I have formatted it as FAT32 and copied some new files to it (namely i386 from XP CD)

BUT, when I restart the PC using a Win98 boot disk it cannot see the partition. FDisk (DOS version) sees the partion as NTFS.

In knoppix, QTPARTED sees the partition as FAT32 BUT sfdisk -l shows the following info:-
boot start end cyls block Id system
/dev/hda1 * 0+ 1025- 1026 8241313+ 7 HPFS/NTFS

What have I done wrong? I was hoping not to have to delete the partition, just reformat it, but maybe I can't?

Many thanks
AlanC

Harry Kuhman
03-01-2006, 11:33 PM
I was hoping not to have to delete the partition, just reformat it, but maybe I can't?
What does this even mean? You can't convert a NTFS partition to FAT and keep the files that are on it, so in what way do you think it is better to try to not just delete the NTFS partition and make a FAT partition in the same space?

dataco
03-02-2006, 12:15 PM
Hi Harry,

Sorry, what I typed wasn't very clear.

This is the scenario. Existing NTFS partition with data that I don't care for. I am tring to format it as FAT32 so that I can copy an unattended install of XP from the network and then boot from a floppy/CD and run setup.

I am trying to scripts this. There may be other partitions on the drive that I want to leave, thats why I don't really want to mess with partitions on the drive. IE, just scrap the existing XP install ready for a reinstall.

I can format the NTFS partition as FAT32 and copy files to it, but when I boot from a DOS floppy/cd that supports FAT32 it cannot see the drive. DOS Fdisk still sees it as NTFS which is why I guess it doesnt give me drive C.

Thanks
AlanC

|enouf|
03-02-2006, 02:06 PM
...
[...]
but when I boot from a DOS floppy/cd that supports FAT32 it cannot see the drive. DOS Fdisk still sees it as NTFS which is why I guess it doesnt give me drive C.

Thanks
AlanC
fdisk /mbr from boot floppy
then SYS C:

jjmac
03-07-2006, 01:28 AM
Howdy all,

>>
fdisk /mbr from boot floppy
then SYS C:
>>

(lol, please please stop, grin)



>>
when I boot from a DOS floppy/cd that supports FAT32 it cannot see the drive. DOS Fdisk still sees it as NTFS which is why I guess it doesnt give me drive C.
>>

hmmmm,


>>
In knoppix, QTPARTED sees the partition as FAT32 BUT sfdisk -l shows the following info:-
boot start end cyls block Id system
/dev/hda1 * 0+ 1025- 1026 8241313+ 7 HPFS/NTFS
>>


Well, qtparted is reading enough info from the partition itself to establish the filesystem it contains, and very good too qtparted. while the other programs are reading the partition table.

Each table record has a "type" field, a single byte (the 5th) which is set to a two character hex value.

Dosen't do much really, but programs can use it to find out what the partition is likely being used for. Which is what the, somewhat amusing, confusion is here.

Invoke "cfdisk" and at the bottom you will find a menu option called "[type]". Key that and you will get a list of various type fields.

HPFS/NTFS --- 0x07
W95 FAT32 --- 0x0B
linux ----------- 0x83
linux swap ---- 0x82

There will also be a message "continue ..."

Key enter and enter the two chars (alph/num, or num/num) to change that type to the correct type.

Changing that field wont change the actual fs on a partition, of course.

And reformatting a partition wont change the type field in the table either.

It just prevents shananigans like this from occuring :D

I would think that XP will try to reformat anyway, during the reinstall. So you may have to debate the issue there as well.

Windows does tend to like to be boss at times, as it will. :D


jm