LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-23-2005, 09:32 PM   #1
StreetRacer0491
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Rep: Reputation: 0
Partitions


How do you delete a partition in Linux?
 
Old 12-23-2005, 09:38 PM   #2
dmartins
Member
 
Registered: Oct 2005
Location: Ontario, Canada
Distribution: Arch, Gentoo
Posts: 98

Rep: Reputation: 15
You can create and delete partitions using the fdisk command. type 'fdisk /dev/hda' as root, replacing /dev/hda with the hard drive the partition you want to delete is on. If your system uses IDE, hda is the primary master, hdb is the primary slave, hdc is the secondary master, and hdd is the secondary slave. If your system is SCSI based then use /dev/sda, etc.

So, once you have fdisk running you can press m for a list of commands. 'p' prints the partition table, 'd' deletes a partition, but be warned, there's no turning back and you'll lose all the data on you partition.

edit: when you are done making changes, pressing 'w' saves the changes and exits. If you decide not to change anything press 'q' to quit without saving.

Hope this helps

Last edited by dmartins; 12-23-2005 at 09:39 PM.
 
Old 12-23-2005, 09:52 PM   #3
StreetRacer0491
LQ Newbie
 
Registered: Dec 2005
Posts: 12

Original Poster
Rep: Reputation: 0
Where do I enter in the fdisk command?
 
Old 12-23-2005, 10:13 PM   #4
Brian1
LQ Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 65
Open a terminal session. Issue the command ' su - ' to change to root and use root's enviroment variables. Now run the command ' fdisk /dev/hda ' if you wish to modify the first IDE harddrive. The First USB or SATA drive will be /dev/sda.

Brian1
 
Old 12-23-2005, 10:15 PM   #5
dmartins
Member
 
Registered: Oct 2005
Location: Ontario, Canada
Distribution: Arch, Gentoo
Posts: 98

Rep: Reputation: 15
In a console. The window manager you are using (KDE, Gnome, xfce4, etc..) probably has one installed. Check your applications menu for a terminal or console program and run that. This will open a box which looks a bit like a MS-DOS prompt but is much more powerful.

If you aren't already the root user (type 'whoami' to find out) then type 'su'. You'll be asked to enter the root password so do so. now you can type the fdisk command.

Check out www.tldp.org. It is an excellent source of linux documentation. There is also a google linux search which is pretty useful. www.google.com/linux
 
  


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
/proc/partitions showing wrong partitions netstv Linux - General 1 07-10-2006 01:11 PM
Create software RAID partitions first, then create filesystem partitions on top of th stefanlasiewski Linux - Software 1 04-28-2004 04:12 PM
partitions tangy Linux - Newbie 5 03-10-2004 01:59 AM
need help with partitions shyam_d_sundar Linux - Newbie 2 03-07-2004 01:04 PM
RH 9.0 and where is my Win Partitions? Mega Man X Linux - General 13 06-05-2003 03:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:06 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