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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how can i format a drive in redhat?

Status
Not open for further replies.

farley99

MIS
Feb 12, 2003
413
0
0
US
how can i format a drive in redhat?

how can i fix hard disk errors?
 
man fdisk... ChrisCW

** Helen Waite is now in charge of all rush orders. If you are in a hurry, just go to Helen Waite.
 
Hi,

What type of error message did you get? To fix it you can use fsck command. Please refer to man page for option. I'm not on my linux machine now. Let us know if you stuck with anything.

regards,
feroz
 
If you need to repartition then use fdisk, if you need to format, then it depends on the filesystem you are using: ext2, ext3, jfs, reiserfs, xfs, etc.


Type mount and look to for the keyword "type", next to it will tell you what type of filesystem you are using.

Next you need to use the format command

mkfs.typeOfFS /dev/device

if you have ext3 then type mkfs.ext3 or if you have xfs type mkfs.xfs

So if you need to format the first ide parition on the first ide drive with xfs type:

mkfs.xfs /dev/hda1

Hope that helps.
 
I have a hard drive that had errors on a windows computer, I want to format, fix the errors and put linux on it. It had bad sectors. How can I do that?
 
1. Put your favorite distro's first CD in your CD-ROM drive.
2. Make your computer boot from that CD.
3. Install the distro.
During step 3, unless your distro is completely useless (no offense), it will ask you if you want to format the drive and check for bad blocks. //Daniel
 
If you've got multiple bad sectors, then it's time to get a new harddisk - it's only going to get worse.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top