LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Formating Hard Drive (https://www.linuxquestions.org/questions/linux-newbie-8/formating-hard-drive-85288/)

Zakane 08-24-2003 06:59 PM

Formating Hard Drive
 
Ok, I posted this before but really need the answer, I am trying to reformat a hard drive that has Linux Red hat 7.1 and I have "NO Clue" what I am doing Please help need Detailed help!

MasterC 08-24-2003 07:09 PM

What do you want to format to? Fat32, Ext3, ReiserFS?

Assuming ext3:

mke2fs -j /dev/hdx

Where /dev/hdx is the partition that you want formated. If you don't have any partitions on the drive, use:
fdisk /dev/hdx
First to create at least 1 partition to create a filesystem (format) on.

If you want to create fat32:
mkfs -t vfat /dev/hdx
IIRC is the syntax. Check man mkfs for more info.

Cool

Zakane 08-24-2003 07:14 PM

Ok
 
Ok I'll give it a try and hope for a miracle

Zakane 08-24-2003 07:28 PM

Quote:

Originally posted by MasterC
What do you want to format to? Fat32, Ext3, ReiserFS?

Assuming ext3:

mke2fs -j /dev/hdx

Where /dev/hdx is the partition that you want formated. If you don't have any partitions on the drive, use:
fdisk /dev/hdx
First to create at least 1 partition to create a filesystem (format) on.

If you want to create fat32:
mkfs -t vfat /dev/hdx
IIRC is the syntax. Check man mkfs for more info.

Cool

I suppose what I want to do Is take its off remove it from the hard drive, not installing it Ok sorry mabye not sure I am total Blargh at the moment.

MasterC 08-24-2003 07:30 PM

Re: Ok
 
Quote:

Originally posted by Zakane
Ok I'll give it a try and hope for a miracle
Miracle? And I thought you were looking to Format your hard drive.. :D

Cool

MasterC 08-24-2003 07:32 PM

Quote:

Originally posted by Zakane
I suppose what I want to do Is take its off remove it from the hard drive, not installing it Ok sorry mabye not sure I am total Blargh at the moment.
Take what off, and remove what from the hard drive? You want to format something to do something, but I'm not sure I follow exactly what.

If you want to format the HD to remove linux you'll need to boot up with a rescue disk of some sort, maybe the install Disc that came with your distro has a rescue feature in it, if so, boot up with it, and follow the above mentioned syntax for whatever filesystem you want to be on that HD.

If you want to remove windoze, boot up into Linux and follow the above examples...

:)

Cool

Zakane 08-24-2003 07:37 PM

Quote:

Originally posted by MasterC
Take what off, and remove what from the hard drive? You want to format something to do something, but I'm not sure I follow exactly what.

If you want to format the HD to remove linux you'll need to boot up with a rescue disk of some sort, maybe the install Disc that came with your distro has a rescue feature in it, if so, boot up with it, and follow the above mentioned syntax for whatever filesystem you want to be on that HD.

If you want to remove windoze, boot up into Linux and follow the above examples...

:)

Cool

Ok I am way confused, what I was wondering ok you know DOS? it has a format C: and it erases everthing that want I want to do with my Linux box basicly clear the hard drive is there a command or what not?

MasterC 08-24-2003 07:47 PM

Sure, but it's not as crippled of a program as DOS's is. So you'll need to give it some parameters. If you wanna just wipe a disk completely, and remove all partitions, here's what I'd do:
dd if=/dev/zero of=/de/hdb

This will basically write a bunch of zero's to that drive (*NOTE: /dev/hdb is the Master Slave drive, replace the B with the letter pertaining to the drive you wanna wipe)

Once that's done, you'll then need to recreate a partition on that drive:
/sbin/fdisk /dev/hdb (again, use the above letter corresponding to the drive you want to do this to)

Then:
n
To create a new partition
p
For a primary
1
For the first primary
And use the defaults for size if you just want to make 1 big partition on the drive.
w
to write the changes, save and exit. THEN you'll need to make a filesystem on the new partition:
mke2fs -j /dev/hdb1

And after that's finished, you'll then have a spankin new drive, with an ext3 filesystem on it ;)

Cool

Zakane 08-24-2003 07:52 PM

Ok, I'll try that but not now if I do I may end up throwing my computer out the window, Just so you know most of this is chinese to me But thanks for the help none the less

P.S basicly I just wanted to clearn linux off and put windows back on that system X.x

MasterC 08-24-2003 07:56 PM

Drop in a win98 boot disk (www.bootdisk.com) and do what you are used to then:
format C:

;)

Cool

Zakane 08-24-2003 08:00 PM

Huh
 
heres the thing, I tried that and it said there is no Dos Partition, and could not Create temepory Directory

MasterC 08-24-2003 09:53 PM

You'll first have to use DOS's crippled fdisk to delete and create the DOS partitions:
fdisk

Then you'll use the old:
format C:

And likely, finally use:
fdisk /mbr

To get rid of the boot loader.

Cool

Zakane 08-24-2003 10:13 PM

huh
 
MasterC do you know where I can get a detail desc of doing this? hmm I'll go look around myself. Thanks for the help I am sure get this mess fixed :confused: :(

MasterC 08-24-2003 10:55 PM

Actually, it's pretty much like I showed above if you use the win98 boot disk...

Pretty straight forward stuff ;)

Cool

Zakane 08-25-2003 12:26 AM

Well I am not sure what happen but now Linux won't even load, but I can still load boot disk, CD's wont work so I am in a big mess, :rolleyes: *pulls out a hammer* :scratch:

I actaully download fdisk, in hopes of mabye using it, but don't know if I can get my fdisk to be a boot disk :confused:


All times are GMT -5. The time now is 11:51 PM.