LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 11-02-2005, 10:10 AM   #1
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Rep: Reputation: 30
using parted to erase whole disk


I wanted to use parted to automatically partition my harddrive. As far as I can tell, their is no option to erase the drive in one step. I can do it using a bash or python script that gets output from the command
Code:
parted /dev/hda -s print
with this output I could manulally have the script run this command on each of the found partitions
Code:
parted /dev/hda -s rm $NUMBER
before I write this script, I am wondering if ther is a way to just erase the whole drive with one parted command. for example, if this command was available
Code:
parted /dev/hda -s rm all

Last edited by shanenin; 11-02-2005 at 10:22 AM.
 
Old 11-02-2005, 11:19 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,156

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
You might like to take a look at this link (describing Partition Tables):

http://www.win.tue.nl/~aeb/partition..._tables-2.html

It seems to me that if you just use dd to zero out the partition table, then all the partitions are "Deleted". Then you can start reconstructing them. Or maybe it isn't that simple?

HTH
 
Old 11-02-2005, 11:36 AM   #3
shanenin
Member
 
Registered: Aug 2003
Location: Rochester, MN, U.S.A
Distribution: Gentoo
Posts: 987

Original Poster
Rep: Reputation: 30
thanks for the suggestion, that sounds like that might be a good solution :-)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
cannot use 100% of hard disk, fdisk / parted / partition question lucastic Linux - Hardware 5 12-02-2005 08:58 PM
erase cd help ..!! bruse Linux - Newbie 3 04-13-2005 08:22 AM
How to erase your hard disk with Linux partitions on it 357mag Mandriva 10 03-16-2005 08:53 AM
Gnu Parted Boot Disk: No Root Image ghborrmann Linux - General 2 05-16-2004 04:43 PM
erase my settings? shanenin Linux - Software 2 10-29-2003 08:43 AM

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

All times are GMT -5. The time now is 06:14 PM.

Contact Us - Advertising Info - Rules - Privacy - Donations - Contributing Member - LQ Sitemap - "Weather apps tell you it'll rain. Wyndo tells you when to go."
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