LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-15-2005, 05:15 PM   #1
Moses420ca
Member
 
Registered: Jul 2003
Distribution: Ubuntu
Posts: 142

Rep: Reputation: 15
Format ext3 partition to FAT32?


Hi. It just won't format.
Code:
drew:/home/drew# fdisk -l

Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          63      506016   82  Linux swap / Solaris
/dev/hda2              64        1279     9767520   83  Linux
/dev/hda3   *        1280        4318    24410767+   c  W95 FAT32 (LBA)
/dev/hda4            4319        4981     5325547+   f  W95 Ext'd (LBA)
/dev/hda5            4319        4981     5325516   83  Linux
drew:/home/drew# mkfs.vfat -F 32 /dev/hda5
mkfs.vfat 2.11 (12 Mar 2005)
drew:/home/drew# fdisk -l

Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          63      506016   82  Linux swap / Solaris
/dev/hda2              64        1279     9767520   83  Linux
/dev/hda3   *        1280        4318    24410767+   c  W95 FAT32 (LBA)
/dev/hda4            4319        4981     5325547+   f  W95 Ext'd (LBA)
/dev/hda5            4319        4981     5325516   83  Linux
drew:/home/drew#
Thanks for any help. Drew
 
Old 09-15-2005, 05:19 PM   #2
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
fdisk knows nothing of file-systems, and more to the
point, it's not trying to detect them. To change the
partition type (this is what you're actually looking at)
you use fdisk and then t (for type).


Cheers,
Tink
 
Old 09-15-2005, 05:24 PM   #3
overflowed
LQ Newbie
 
Registered: Oct 2003
Location: Germany - Berlin
Distribution: Debian GNU / Linux
Posts: 8

Rep: Reputation: 0
you don't want to format,
you want to create a filesystem.

just try

mkdosfs /dev/hda5

if nothing works delete partition and create a new one with fdisk at least that should work.
 
Old 09-15-2005, 07:00 PM   #4
Moses420ca
Member
 
Registered: Jul 2003
Distribution: Ubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Thanks Tinkster, That worked great. I then boot off a Windows 98 boot floppy and formated the /dev/hda5 partition so I could make use of the integrity check of format.com. That made my partition table look like this:

Code:
root@0[knoppix]# fdisk -l

Disk /dev/hda: 40.9 GB, 40982151168 bytes
16 heads, 63 sectors/track, 79408 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1         1920663     3757825   925929529+  68  Unknown
Partition 1 does not end on cylinder boundary.
/dev/hda2         1319628     1854326   269488144   79  Unknown
Partition 2 does not end on cylinder boundary.
/dev/hda3          534712     1921977   699181456   53  OnTrack DM6 Aux3
Partition 3 does not end on cylinder boundary.
/dev/hda4   *     1383560     1383581       10668+  49  Unknown
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order
root@0[knoppix]#
Anyone have any idea how to put it back to the way it was?
 
Old 09-15-2005, 07:40 PM   #5
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
Urrrgh. What tool did you use to scramble your partition
table like that? :}


Cheers,
Tink
 
Old 09-15-2005, 07:47 PM   #6
Moses420ca
Member
 
Registered: Jul 2003
Distribution: Ubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Like my post said, format.com from a windows 98 boot floppy. Question is, How do I make it all better again?
 
Old 09-15-2005, 08:01 PM   #7
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
I can't see how Windows' format would scramble the partition-table
in all honesty ... did you (by any chance) let it "use the whole
available disk-space" via DOS' fdisk?


Cheers,
Tink
 
Old 09-15-2005, 08:11 PM   #8
Moses420ca
Member
 
Registered: Jul 2003
Distribution: Ubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
nope. I had 2 disks available to me from dos. c: (/dev/hda3) and d: (/dev/hda5). I then did format d: and everything went ok. I rebooted right after the format finished only to find my partition table went poof. Any ideas on how to fix it?
 
Old 09-15-2005, 08:25 PM   #9
danimalz
Member
 
Registered: Jul 2005
Location: West Coast South, USA
Distribution: debian 3.1
Posts: 266

Rep: Reputation: 36
Uh oh...

I may be wrong about this, but i think i see something strange in your original
fdisk listing. It appears that your hda4 and hda5 are both using the same physical
disk space, yet being referenced twice - once as windows 'f' and once as 83 linux. Im really
not too sure about this, but i've never seen that before...





/dev/hda4 4319 4981 5325547+ f W95 Ext'd (LBA)
/dev/hda5 4319 4981 5325516 83 Linux
 
Old 09-15-2005, 08:39 PM   #10
Moses420ca
Member
 
Registered: Jul 2003
Distribution: Ubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
/dev/hda4 and /dev/hda5 are essentially the same partition because /dev/hda4 is an extended partition and /dev/hda5 is a logical partition inside of it.
 
Old 09-15-2005, 08:43 PM   #11
Tinkster
Moderator
 
Registered: Apr 2002
Location: in a fallen world
Distribution: slackware by choice, others too :} ... android.
Posts: 23,066
Blog Entries: 11

Rep: Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910Reputation: 910
You'll have to use Linux' fdisk again

fdisk /dev/hda
and then change the type for each partition accordingly
83 for Linux, 82 for Linux swap, c for the extended partition
and f for the FAT partition(s).


Cheers,
Tink
 
Old 09-15-2005, 08:45 PM   #12
danimalz
Member
 
Registered: Jul 2005
Location: West Coast South, USA
Distribution: debian 3.1
Posts: 266

Rep: Reputation: 36
Quote:
Originally posted by Moses420ca
/dev/hda4 and /dev/hda5 are essentially the same partition because /dev/hda4 is an extended partition and /dev/hda5 is a logical partition inside of it.
Yes, i understand this but look at the listing again. It shows that the extended partition
is being used by both windows and linux. This may not be an issue, but as i said, i've
never seen this type of listing before.
 
Old 09-16-2005, 02:18 AM   #13
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
Use cfdisk if you want an easier fdisk. Partitions that you are going to be used for FAT or FAT32 needs a partitin type of b. The utility cfdisk is a front end to fdisk.

By typing mkfs.vfat will format the drive but it will not check for bad sectors. If you mount the partition as vfat, you should be able to access it. Windows and DOS will have problems.

To fix your partition table. Use cfdisk to compare the start and end cylinders of each partition that represents the information that you gave from your first post. You can change the partition table as many times as you like. Each partition table change you have to reboot or run hdparm to re-calculate the geometry. Your data will be still be there. Do not format the partitions or your data will be history.

Quote:
you don't want to format,
you want to create a filesystem.

just try

mkdosfs /dev/hda5

if nothing works delete partition and create a new one with fdisk at least that should work.
Format is the same thing as create a filesystem. You need to format before writing/reading data or else the computer will spend a lot of time writing/reading the storage medium. The term format means it will draw a grid on the medium to make the data oranized instead of all over the medium.
 
Old 09-16-2005, 11:58 AM   #14
Moses420ca
Member
 
Registered: Jul 2003
Distribution: Ubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Thanks Electro. That worked and great info too. Do I have to reinstall the mbr? It still won't boot. This is what my partitions look like now.

Code:
root@0[knoppix]# fdisk -l

Disk /dev/hda: 40.9 GB, 40982151168 bytes
255 heads, 63 sectors/track, 4982 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1               1          63      506016   82  Linux swap / Solaris
/dev/hda2              64        1279     9767520   83  Linux
/dev/hda3   *        1280        4318    24410767+   b  W95 FAT32
/dev/hda4            4319        4982     5333580    5  Extended
/dev/hda5            4319        4982     5333548+   b  W95 FAT32
root@0[knoppix]#
 
Old 09-16-2005, 01:31 PM   #15
Moses420ca
Member
 
Registered: Jul 2003
Distribution: Ubuntu
Posts: 142

Original Poster
Rep: Reputation: 15
Well. All is back to rights. I reinstalled my mbr by grub-install /dev/hda and my /dev/hda5 partition is usable under Windows XP and Linux but not under DOS now. So I'm back at the beginning.

Thanks everyone for you're help. Drew
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to format to FAT32, and how to mount my FAT32 partition. bonniehandi Linux - Newbie 16 03-05-2006 08:54 PM
How can I format my ext3 partition to use 1024 byte blocks and 1 inode per block? abefroman Linux - Hardware 1 11-27-2005 12:01 AM
format reiserfs partition to ext3 safely chocloman Linux - Software 2 10-03-2005 05:14 PM
Win2000 trying to see ext3 partition as FAT32-- dual-boot problem guybrush3322 Debian 3 03-16-2005 03:34 PM
I need to format a fat32 partition through a redhat 9 shell rendaimedia Linux - General 1 04-27-2004 10:50 AM


All times are GMT -5. The time now is 06:07 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration