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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
|
08-24-2003, 06:59 PM
|
#1
|
LQ Newbie
Registered: Jan 2003
Posts: 16
Rep:
|
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!
|
|
|
08-24-2003, 07:09 PM
|
#2
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
08-24-2003, 07:14 PM
|
#3
|
LQ Newbie
Registered: Jan 2003
Posts: 16
Original Poster
Rep:
|
Ok
Ok I'll give it a try and hope for a miracle
|
|
|
08-24-2003, 07:28 PM
|
#4
|
LQ Newbie
Registered: Jan 2003
Posts: 16
Original Poster
Rep:
|
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.
|
|
|
08-24-2003, 07:30 PM
|
#5
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
08-24-2003, 07:32 PM
|
#6
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
08-24-2003, 07:37 PM
|
#7
|
LQ Newbie
Registered: Jan 2003
Posts: 16
Original Poster
Rep:
|
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?
|
|
|
08-24-2003, 07:47 PM
|
#8
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
08-24-2003, 07:52 PM
|
#9
|
LQ Newbie
Registered: Jan 2003
Posts: 16
Original Poster
Rep:
|
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.
|
|
|
08-24-2003, 07:56 PM
|
#10
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Drop in a win98 boot disk ( www.bootdisk.com) and do what you are used to then:
format C:
Cool
|
|
|
08-24-2003, 08:00 PM
|
#11
|
LQ Newbie
Registered: Jan 2003
Posts: 16
Original Poster
Rep:
|
Huh
heres the thing, I tried that and it said there is no Dos Partition, and could not Create temepory Directory
|
|
|
08-24-2003, 09:53 PM
|
#12
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
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
|
|
|
08-24-2003, 10:13 PM
|
#13
|
LQ Newbie
Registered: Jan 2003
Posts: 16
Original Poster
Rep:
|
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 
|
|
|
08-24-2003, 10:55 PM
|
#14
|
LQ Guru
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu ; CentOS ; Raspbian
Posts: 12,613
Rep:
|
Actually, it's pretty much like I showed above if you use the win98 boot disk...
Pretty straight forward stuff
Cool
|
|
|
08-25-2003, 12:26 AM
|
#15
|
LQ Newbie
Registered: Jan 2003
Posts: 16
Original Poster
Rep:
|
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.
|
|
|
All times are GMT -5. The time now is 08:23 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|