Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

formating a partition after linux is installed (rh 8.0)

Status
Not open for further replies.

mackey333

Technical User
May 10, 2001
563
US
How do I change the format of a partition after linux is already installed? The partition is currently fat32 and I want to change it to ext3. I tried fdisk, but there was no format command. Also I tried to delete the partition from fdisk but it said it was of the "empty type" and wouldn't let me do it. The mounting line in fstab says "/dev/hda2" and that's what I was trying to modify in fdisk. I did umount the file system before trying to fdisk. -Greg :-Q

flaga.gif
 
You know that you will lose all the data, right?
Either way, the command you want is [tt]mkfs[/tt]. In your case, it would be [tt]mkfs.ext3 /dev/hda2[/tt]. //Daniel
 
yes i know i will lose the data..everything is backed up...thanks for the reply -Greg :-Q

flaga.gif
 
I'd just like to mention that this _will_ make the data on /dev/hda2 a thing of the past. There's no undoing it ;-)

Start fdisk:
fdisk /dev/hda

Check out the situation by printing the partition table:
p<enter>

Change the type of the 2nd partition:
t<enter>
2<enter> (hda2 should be the 2nd partition on /dev/hda)
83<enter> (sets it to be of filesystem type &quot;Linux&quot;)
w<enter> (writes the new info to the partition table)

Quit fdisk. Then run the mkfs.ext3 like danielhozac said.

Good luck! --
JR
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top