Showing posts with label apple. Show all posts
Showing posts with label apple. Show all posts

2015-10-17

Restore MacBook Air SSD with OS X 10.11 El Capitan

Backup /Users/ directory (with tar) and make a list of useful installed /Applications/.

Download El Capitan from App Store.

Format at least 8 GB usb drive to OS X Extended file system and create install media:

cd "/Applications/Install OS X El Capitan.app/Contents/Resources"
./createinstallmedia --volume /Volumes/new --applicationpath "/Applications/Install OS X El Capitan.app"

Optionally create a slim DMG from that install media:

cd "/Volumes/Install OS X El Capitan"
rm -R .Trashes/
hdiutil create -nospotlight -srcfolder "/Volumes/Install OS X El Capitan" -format UDBZ /Users/swegen/Desktop/ElCapitan.dmg

Download latest Ubuntu ISO and dd it to another at least 2 GB usb drive.

Boot to Ubuntu with option key pressed at boot. Put device to sleep by closing the lid and wake it up to unfreeze the SSD.

Open terminal and gain root rights with:

sudo passwd
su

Restore SSD memory cells to factory condition with ATA secure erase command (takes about six seconds):

hdparm -I /dev/sda
hdparm --user-master u --security-set-pass Eins /dev/sda
time hdparm --user-master u --security-erase-enhanced Eins /dev/sda

Optionally clear SMC and NVRAM to start install afresh.

Boot with El Capitan usb install media and start terminal to create 1MB aligned OS partition while preserving default EFI partition starting location and size to allow for future firmware updates (sizes are calculated for 250 GB SSD):

gpt create /dev/disk0
gpt add -b40 -s409600 -tefi /dev/disk0
gpt label -i1 -l "EFI System Partition" /dev/disk0
gpt add -b411648 -s488552448 -thfs /dev/disk0
gpt label -i2 -lSSD /dev/disk0
newfs_hfs -s -J -v SSD /dev/disk0s2
diskutil mount /dev/disk0s2
cd /Volumes/SSD
rm -R .Trashes/

Exit terminal and install El Capitan.

Installer replaces basic OS partition with unnecessary Core Storage volume manager. After installation is complete Remove Core Storage layer from GPT:

diskutil cs list
diskutil cs revert %lvuid%

Reboot and check again with above list command that it worked. Then restore your backups. Final partition layout (efi, hfs and recovery) is:

# gpt show /dev/disk0
      start       size  index  contents
          0          1         PMBR
          1          1         Pri GPT header
          2         32         Pri GPT table
         34          6         
         40     409600      1  GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
     409640       2008         
     411648  488552448      2  GPT part - 48465300-0000-11AA-AA11-00306543ECAC
  488964096    1269536      3  GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
  490233632       1087         
  490234719         32         Sec GPT table
  490234751          1         Sec GPT header

iOS jailbreak checklist

  • Update iTunes
  • Backup iDevice with iTunes
  • Backup iBooks and ringtones manually
  • Keep iDevice connected to computer and go into dfu mode (home and sleep buttons until black screen)
  • Update iDevice in dfu mode
  • Do not restore backup yet
  • Jailbreak iDevice
  • Run Cydia once to make space to OS partition
  • Restore data from backup using iTunes
  • Add Cydia tweaks

If an app crashes on launch, you can try to fix it with Link Identity Editor:

ldid -S Program

2011-07-20

boot.efi x64 patch for Mac OS X Lion and Snow Leopard

If the Apple computer you are using does not allow booting into 64-bit kernel, applying this patch will help.
It patches the boot.efi system file to allow x64 booting.
Should work for all Apple models.


Apple does not include 64-bit graphics drivers for some models.
Here are the Intel GMA X3100 64-bit kexts to use with 64-bit kernel
and a install script for:
MacBook3,1
MacBook4,1
MacBook4,2
MacBookAir1,1
AppleIntelGMAX3100-x64.tar.bz2

I cannot support these kernel extensions though, as I no longer have any of the above models. This forum has some info about getting the GMA X3100 to work. projectosx.com/forum/index.php?showtopic=763

    2011-01-14

    How to securely erase MBA SSD

    1. boot linux from usb key using grub-efi
    2. run 'hdparm -I /dev/sda'
    3. see that the disk security is frozen
    4. put mba to sleep
    5. resume from sleep
    6. run 'hdparm -I /dev/sda' again
    7. see that the disk security is not frozen
    8. follow instructions from tinyapps.org/docs/wipe_drives_hdparm.html