Erasing you HD through the terminal

Discussion in 'Mac Help/Tips' started by Irishgent, Nov 25, 2002.

  1. Irishgent macrumors newbie

    Joined:
    Nov 14, 2002
    #1
    Hey. If Im booted from an external HD and I want to erase my HD into four partitions from the Terminal - how do I do it.

    Can you issue commands for the terminal to use disk utility?


    Any help would be great.
     
  2. Billicus macrumors 6502a

    Billicus

    Joined:
    Apr 3, 2002
    Location:
    Charles City, Iowa
    #2
    Why not just launch a Disk Utility, why bother with Terminal at all?
     
  3. vincentmeanie macrumors newbie

    Joined:
    Aug 28, 2002
    #3
    spark up terminal, then change drives till you are at the root of the drive you want to erase, and use "rm -r" no quotes

    then go buy a book on unix and learn how it worked. I think oreiely has a good one for OS X users
     
  4. Nipsy macrumors 65816

    Nipsy

    Joined:
    Jan 19, 2002
    #4
    Okay, before you goof and lose ALL your data, reverse the above instructions:

    Buy a book, read on the web, read "man rm", etc.

    Then issue the command.

    You can do a lot of damage if you blindly issue commands written by others, without understanding what they do.

    You've been warned...
     
  5. gbojim macrumors 6502

    Joined:
    Jan 30, 2002
    #5
    The command you want to use to change partitions on your hard disk is fdisk. I haven't played with this with OS X so I can't give you step by step instructions. If the disk is mounted, you must unmount it before running fdisk.

    Generally with fdisk you would start the program with the command and the device you want to partition. Something like:

    fdisk /dev/rdisk0

    You can then print the existing partitions to the screen using: p

    You kill any partitions you do not want with: e n where n is the partition number. The partition numbers are displayed when you use p

    Create your new partitions using: n. You will have to read the directions for creating partitions with fdisk in OS X since different revs of the fdisk command behave differently.

    When finished, save the partition table (usually using: w), quit fdisk (usually using: q) and reboot. The partitions should auto mount.

    Hope this helps.
     

Share This Page