LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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-06-2003, 09:35 PM   #1
scorpion777
Member
 
Registered: Jul 2003
Location: Georgia
Posts: 49

Rep: Reputation: 15
i need help formatting a drive


Hey guys, i'm pretty new to linux (about 1 yr into using it off an on) and I can't find my partitions
or my other hard drive. I need to format the other drive and I'm not sure how even once i find
it. Can anyone help??

Thanks
 
Old 08-06-2003, 09:54 PM   #2
2damncommon
Senior Member
 
Registered: Feb 2003
Location: Calif, USA
Distribution: PCLINUXOS
Posts: 2,918

Rep: Reputation: 103Reputation: 103
fdisk -l /dev/hdx
Will display partitions on a drive.
Check 'man fdisk'
Exact formatting command depends on the fileststem you wish to use.
For instance, for Reiser filesystem:
mkreiserfs /dev/hdxx
Check 'man mkreiserfs'
Help any?
 
Old 08-06-2003, 09:56 PM   #3
cmleungive
LQ Newbie
 
Registered: Apr 2003
Distribution: RH9
Posts: 5

Rep: Reputation: 0
You can find all the drives and partitions by the command under superuser mode:
fdisk -l

To format the partitions as ext3, type:
mke2fs -j /dev/hdxn
Where x=a for primary master, b for primary slave, c for secondary master, d for secondary slave.
Also n is the parition number starting from 1.
For example, mke2fs -j /dev/hdc1 formats the first partition in secondary master hard disk.
Be careful with this. It will erase all data!
 
Old 08-06-2003, 10:36 PM   #4
sanki_man
LQ Newbie
 
Registered: Aug 2003
Location: India
Posts: 5

Rep: Reputation: 0
First go in the superuser mode. type the following on the shell prompt:-

su

then provide the superuser password.

You can then format the partitions by a general command.

mkfs

eg:-

mkfs -t ext2 /dev/hda3

mkfs can create file systems of various types like vfat,ext2,ext3 etc. see man mkfs for details.

Dear partner note that fdisk command is used to create partitions and after creating them you have to create filesystem(format it) for that you need mkfs.

Note that playing with partitions is dangerous.
 
  


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
Formatting a Hard Drive dudeman41465 Linux - Software 3 10-13-2005 04:09 PM
Formatting a usb drive guldo Linux - Hardware 11 10-09-2005 11:16 AM
Hard-drive formatting kc0bus Linux - Newbie 5 07-02-2005 12:14 PM
Formatting a missing drive mebrelith Fedora 0 11-30-2004 09:31 PM
Formatting hard drive... Linux~Powered Linux - Hardware 1 02-09-2004 04:13 PM

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

All times are GMT -5. The time now is 07:28 PM.

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