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.
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:
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.