sudo parted -a optimal /dev/sdb print
Model: WD My Passport 0748 (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 2000GB 2000GB primary ntfs

http://www.howtogeek.com/howto/15037/use-an-ubuntu-live-cd-to-securely-wipe-your-pcs-hard-drive/

sudo apt-get install wipe

#make sure to get the right drive:
sudo fdisk -l
mount

sudo wipe /dev/sdb2
sudo wipe /dev/sdb1





on os x 10.8 (10.7+) they've eliminated formatting drive as "Mac OS Extended" (non-journaled).

Linux cannot write to HFS+ Journal, so must diable Journal:
To get around this:

You must partition it journaled; then select the partition in Disk Utility's sidebar, press the Option key before selecting File from the menubar, and you'll see a Disable Journaling option.

https://discussions.apple.com/thread/3232454?start=0&tstart=0




other options:

sudo parted -a optimal /dev/sdb mklabel mac
sudo parted -a optimal /dev/sdb mklabel msdos #is this Master Boot Record?

sudo parted -a optimal /dev/sdb mkpart primary NTFS 20.5kB 2000GB
Warning: The resulting partition is not properly aligned for best performance.
Ignore/Cancel? C


examples:

formatted with mac os X: (GUID Partition Table)
---------------------------------------------------
sudo parted -a optimal /dev/sdb print
Model: SAMSUNG HD204UI (scsi)
Disk /dev/sdb: 2000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number Start End Size File system Name Flags
1 20.5kB 210MB 210MB fat32 EFI System Partition boot
2 210MB 2000GB 2000GB hfs+ Untitled

looking into Advanced Format drives
wdc.com/advformat

they recommend parted (2.2 and up) instead of fdisk:
parted -v

#this starts in an interactive mode similar to fdisk:
sudo parted -a optimal /dev/sdb


#can also supply commands via command line:

sudo ls #prime sudo

sudo parted -a optimal /dev/sdb mklabel gpt
sudo parted -a optimal /dev/sdb print

sudo parted -a optimal /dev/sdb rm 1
sudo parted -a optimal /dev/sdb rm 2

sudo parted -a optimal /dev/sdb mkpart primary NTFS 1MB 2000GB
sudo mkfs.ntfs -L DATA -f /dev/sdb1

or
sudo parted -a optimal /dev/sdb mkpart primary hfs 1MB 2000GB
format on mac

or
sudo parted -a optimal /dev/sdb mkpart primary ext4 1MB 2000GB
sudo mkfs.ext4 -L backups /dev/sdb1

or
sudo mkfs.vfat -n UBUNTU /dev/sdb1
format USB drive


be sure to label the drive externally
when it was first initialized
what file system
capacity (in case it's not clear from the drive)

t (toggle)
af (HFS / HFS+)

format on Mac OS X using Disk Utility
Volume Format: Mac OS Extended
don't forget to change permissions for writing on linux:
sudo chmod -R 777 /media/external


t (toggle)
7 (HPFS/NTFS)
sudo mkfs.ntfs -L DATA -f /dev/sdc1

having trouble formatting drive as HFS+ after being formatted as ext3 (again... see.. [2008.10.27 14:29]
partition type set to af already
able to format it as MS-DOS (VFAT)

need to make sure that the partition size is correct
use the "Partition" option for the disk
select "2 Partitions"
allow the 1st to be the largest size allowed by configuration (might lose a few gigabytes here)
set the second one to be free space (can be reclaimed for swap later if needed)

consider making swap space on the drive if there is ever a chance that it will be the only drive in a live system
(if formatting with ext3, there is a good chance of that)
much easier to spare a few gigs now, than try to create it later.

delete
new
primary
1
write

#then make the new filesystem
sudo mkfs.ext3 -L data /dev/sda1

#open terminal
#find your drive
mount

#see what is mounted:
#/dev/sdb1 on /media/backups type ext3 (rw,nosuid,nodev,uhelper=hal)
#/dev/sdc1 on /media/CHARLES type vfat (rw,nosuid,nodev,uhelper=hal,shortname=mix

#scan dmesg for drive devices that were detected:
dmesg

#set up the one you want to format:
sudo fdisk /dev/sdc

macdrive7 looks like the software needed to mount hfs+ on windows machines.

http://www.google.com/search?client=firefox-a&rls=org.mozilla%3Aen-US%3Aofficial&channel=s&hl=en&q=windows+xp+hfs&btnG=Google+Search
windows xp hfs - Google Search
http://www.macwindows.com/disks2.html
Sharing Disks - Windows Products
http://hem.bredband.net/catacombae/hfsx.html
HFSExplorer
http://www.tomshardware.com/forum/103879-45-read-volumes-windows
How to read hfs volumes with windows xp
http://forums.macrumors.com/showthread.php?t=293781
HFS on Windows XP - Mac Forums
http://www.f.kth.se/~f96-bet/hfsutils/
HFS utilities for DOS, Windows and OS/2
http://www.mediafour.com/products/macdrive/
Mediafour | MacDrive
http://www.mediafour.com/support/macdrive/
Mediafour | MacDrive 7

hfsplus, formatted on mac, seems to load no problem in ubuntu
note [2008.02.15 11:11]
journaled is only read only on linux. need to make it non-journaled.

##########################
# FDISK AND MKRAID
##########################

#TODO:
#fdisk these drives for raid
#mkfs -t (same as current music) /dev/md0
#with only 3 drives in system:
#sudo mdadm --assemble /dev/md0 /dev/sdc1
sudo mdadm --assemble /dev/md0 /dev/sda1 /dev/sdd1

sudo fdisk /dev/sda
sudo fdisk /dev/sdd
#use type fd - Linux raid autodetect
#mdadm --create /dev/md0 --chunk=128 --level=1 --raid-devices=2 --spare-devices=0 /dev/hde1 /dev/hdg1

sudo mdadm -C -n 2 -l 1 -x 0 /dev/sda1 /dev/sdd1

sudo mkdir /media/data
sudo mount /dev/md0 /media/data
sudo mkreiserfs /dev/md0