User Tools

Site Tools


unix:osx:usb_file_systems

Some USB Drives cannot be formatted under Disk Utility

For whatever reason, Disk Utility cannot format some USB connected drives correctly. The problem seems to be either a mis-read of the number of sectors (or other geometry) or cheap-o USB interfaces.

Some commands to help remedy are fdisk and pdisk, fdisk for MBR, pdisk for AFP, gpt for GUID.

frieda:~ ben$ sudo fdisk -a boothfs /dev/rdisk1
Disk: /dev/rdisk1	geometry: 9729/255/63 [156301489 sectors]
Signature: 0xAA55
         Starting       Ending
 #: id  cyl  hd sec -  cyl  hd sec [     start -       size]
------------------------------------------------------------------------
*1: AB    0   1   1 - 1023 254  63 [        63 -      16384] Darwin Boot 
 2: AF 1023 254  63 - 1023 254  63 [     16447 -  156285042] HFS+        
 3: 00    0   0   0 -    0   0   0 [         0 -          0] unused      
 4: 00    0   0   0 -    0   0   0 [         0 -          0] unused      

This is not usable.

THIS IS, note the one sector smaller size specified:

frieda:~ ben$ sudo fdisk -i -a boothfs -S 156285041 /dev/rdisk1
fdisk: could not open MBR file /usr/standalone/i386/boot0: No such file or directory

	-----------------------------------------------------
	------ ATTENTION - UPDATING MASTER BOOT RECORD ------
	-----------------------------------------------------

Do you wish to write new MBR and partition table? [n] y

Filesystems can then be made at will:

frieda:~ ben$ newfs_hfs -v Untitled -n c=4096,e=1024 /dev/rdisk1s2
Initialized /dev/rdisk1s2 as a 75 GB HFS Plus volume
frieda:~ ben$ newfs_hfs -v Untitled -J -n c=4096,e=1024 /dev/rdisk1s2
newfs_hfs: /dev/disk1s2 is mounted on /Volumes/Untitled
frieda:~ ben$ newfs_hfs -v Untitled -J -n c=4096,e=1024 /dev/rdisk1s2
Initialized /dev/rdisk1s2 as a 75 GB HFS Plus volume with a 8192k journal
frieda:~ ben$ newfs_hfs -v 75G -J -n c=4096,e=1024 /dev/rdisk1s2
Initialized /dev/rdisk1s2 as a 75 GB HFS Plus volume with a 8192k journal
frieda:~ ben$ newfs_hfs -v 75G -J -n c=8192,e=1024 /dev/rdisk1s2
Initialized /dev/rdisk1s2 as a 75 GB HFS Plus volume with a 8192k journal
frieda:~ ben$ newfs_hfs -v 75G -J -n c=16384,e=1024 /dev/rdisk1s2
Initialized /dev/rdisk1s2 as a 75 GB HFS Plus volume with a 8192k journal

Pdisk: It's complicated, who knows…

GPT: I/O errors.

unix/osx/usb_file_systems.txt · Last modified: 2010/02/22 08:09 by ben