LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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 08-24-2003, 06:59 PM   #1
Zakane
LQ Newbie
 
Registered: Jan 2003
Posts: 16

Rep: Reputation: 0
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!
 
Old 08-24-2003, 07:09 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 08-24-2003, 07:14 PM   #3
Zakane
LQ Newbie
 
Registered: Jan 2003
Posts: 16

Original Poster
Rep: Reputation: 0
Ok

Ok I'll give it a try and hope for a miracle
 
Old 08-24-2003, 07:28 PM   #4
Zakane
LQ Newbie
 
Registered: Jan 2003
Posts: 16

Original Poster
Rep: Reputation: 0
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.
 
Old 08-24-2003, 07:30 PM   #5
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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..

Cool
 
Old 08-24-2003, 07:32 PM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 08-24-2003, 07:37 PM   #7
Zakane
LQ Newbie
 
Registered: Jan 2003
Posts: 16

Original Poster
Rep: Reputation: 0
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?
 
Old 08-24-2003, 07:47 PM   #8
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 08-24-2003, 07:52 PM   #9
Zakane
LQ Newbie
 
Registered: Jan 2003
Posts: 16

Original Poster
Rep: Reputation: 0
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

Last edited by Zakane; 08-24-2003 at 07:53 PM.
 
Old 08-24-2003, 07:56 PM   #10
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

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



Cool
 
Old 08-24-2003, 08:00 PM   #11
Zakane
LQ Newbie
 
Registered: Jan 2003
Posts: 16

Original Poster
Rep: Reputation: 0
Huh

heres the thing, I tried that and it said there is no Dos Partition, and could not Create temepory Directory
 
Old 08-24-2003, 09:53 PM   #12
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

Rep: Reputation: 69
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
 
Old 08-24-2003, 10:13 PM   #13
Zakane
LQ Newbie
 
Registered: Jan 2003
Posts: 16

Original Poster
Rep: Reputation: 0
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
 
Old 08-24-2003, 10:55 PM   #14
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613

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

Pretty straight forward stuff

Cool
 
Old 08-25-2003, 12:26 AM   #15
Zakane
LQ Newbie
 
Registered: Jan 2003
Posts: 16

Original Poster
Rep: Reputation: 0
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, *pulls out a hammer*

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

Last edited by Zakane; 08-25-2003 at 12:30 AM.
 
  


Reply



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
Formating a new external hard drive SpartacusJones Linux - Hardware 1 01-02-2005 05:28 AM
formating hard drive icanspellnew Linux - General 9 11-13-2004 03:56 PM
Formating hard drive? jnassiri Linux - Newbie 5 08-04-2004 12:11 AM
formating / partitioning a new hard drive true_atlantis Linux - Hardware 15 12-07-2003 06:09 PM
Formating 2 hard drive Tenchi147 Linux - Hardware 1 05-31-2003 05:01 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:06 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
Open Source Consulting | Domain Registration