Can't reinstall Mac OS X El Capitan because the only partition is a locked OS X Base Image taking up the full HDD I'm trying to reinstall Mac OS X El Capitan on a new Macbook Air. Disk Utility lists a single SSD with a capacity of 251GB and a single partition (OS X Base system) that is taking up 250.4GB. When I try to create another partition it says that I need to enable journaling, but the option is greyed out. I also can't reinstall from the internet because the OS X Base System partition is locked.

Any ideas?

Edit: As requested by @klanomath
Here is an OCRed version of the screenshot (it may contain small errors):

-bash-3.2#  gpt -r show disk0
     start      size  index contents
         0         1            PMBR
         1         1            Pri GPT header
         2         4            Pri GPT table
         6     76800      1     GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     76806  61043841      2     GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  61120647    158692        
  61279339         4            Sec GPT table
  61279343         1            Sec GPT header
-bash-3.2# df
Filesystem     512-blocks      Used Available Capacity   iused     ifree    %iused  Mounted on
/dev/disk0s2    488350728   2506264 485332464     1%    377281  60666558       1%   /
devfs                 374       374         0   100%       648         0     100%   /dev
/dev/disk1          10240     10240         0   100%      1278         0     100%   /private/var/log
/dev/disk2           1024       288       736    29%        34        92      27%   /Volumes
/dev/disk3           1024       296       728    29%        35        91      28%   /private/var/tmp
/dev/disk4           1024       312       712    31%        37        89      29%   /private/var/run
/dev/disk5           1024       280       744    28%        33        93      26%   /System/Installation
/dev/disk6           1024       504       520    50%        61        65      48%   /private/var/db
/dev/disk7          12288      6552      5736    54%       817       111      53%   /private/var/folders
/dev/disk8           4096       448      3648    11%        54       456      11%   /private/var/root/Library
/dev/disk10          1024       328       696    33%        39        87      31%   /Library/Preferences
/dev/disk11          1024       312       712    31%        37        89      29%   /Library/Preferences/SystemConfiguration
/dev/disk12          2048       280      1768    14%        33       221      13%   /Library/Keychains
/dev/disk13         12288      1712     10576    14%       212      1322      14%   /private/var/tmp/RecoveryTemp


On your main disk a third partition usually containing the Recovery HD is completely missing: the line in the gpt output starting with 61120647 should look like this:

     61120647     158692      3     GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC


Instead the content of Base OS X image (usually residing on the Recovery HD partition) seems to be written to disk0s2 as visible in the df output:

/dev/disk0s2    488350728   2506264 485332464     1%    377281  60666558


The occupied 2506264 (512) blocks are roughly equal to the size of a decompressed Base OS X: 1.2 GB.

The content of Base OS X probably got copied to your main volume somehow. Booted to this volume, any attempt to erase the disk or volume will fail.



To solve your problem boot to Internet Recovery Mode (hold altcmdR while booting) and open Disk Utility.

Choose the superior SSD disk (and not the inferior volume) and hit the erase button. Choose a name, OS X Extended (journaled) and the GUID partition scheme.

If this fails for whatever reason open Terminal in the menubar Utilities > Terminal. Enter diskutil list to get the disk identifier of the internal disk (probably disk0 - below I assume it's disk0)

Then enter diskutil eraseDisk JHFS+ "Macintosh HD" disk0. If this fails also, hammer the stubborn SSD with either:

diskutil umountDisk disk0
gpt detroy disk0
gpt create -f disk0


or 

diskutil umountDisk disk0
dd if=/dev/zero of=/dev/disk0 bs=4096 count=6


Be sure that it's disk0 though!

Now enter exit and quit Terminal. Open Disk Utility again and partition the disk like described previously.

Quit Disk Utility and in the Utilities window open Restore OS X and follow the instructions..