Resize EXT2/EXT3 Partition Under OSX

From Wiki
Jump to navigationJump to search

e2fsprogs must be installed.

 brew update
 brew install ext2fuse
 brew install Caskroom/cask/osxfuse
 brew install e2fsprogs

Insert the SD card

 sudo diskutil list

Find the disk number for SD card, typically last the entry

 sudo diskutil unmountdisk /dev/diskX
 sudo zxcat imagename.xz | dd bs=16m of=/dev/diskX
 sudo diskutil unmountdisk /dev/diskX
 sudo fdisk -e /dev/diskX
   e 2
   n
   <enter>
   <enter>
   w
   q
 sudo /usr/local/Cellar/e2fsprogs/1.42.11/sbin/resize2fs -f /dev/diskXs2
 sudo diskutil eject /dev/diskX