Intro

I was looking through my VimWiki KB when moving to Notion, and I’ve found these drafts/notes which might be useful to me (or someone else) some day, so I want to make them public.

Triple boots MB2010

Triple boots on my old macbook (2010 unibody) were done through rEFInd.

However, the main issue was in the fact that NVidia’s drivers won’t work if system was booted in EFI mode – not in windows nor in linux (OSS drivers worked in linux though).

So, I had to boot Windows in legacy mode, which meant that hybrid MBR was needed.

I’ve had 7 GUID partitions iirc:

  • EFI (FAT?)
  • OS X Recovery (HFS)
  • OS X (HFS)
  • Windows (NTFS)
  • Common Data (ExFAT)
  • Linux System (ext4)
  • Linux Swap (swap)

And I made a hybrid MBR out of it:

  • First protective partition: EFI, OS X Recovery, OS X
  • Windows
  • Common Data
  • Second protective partition: Linux System & Swap

But OS X Bootloader didn’t like having two protective MBR partitions (as gdisk has warned), so I had to change partition ID on one of them to something else.

Another issue: On OS X updates bootcamp would reset Hybrid MBR layout to one it prefered, with OS X root partition being avaliable to Windows.

So, I had an usb stick with Arch Linux installer on it, and I booted it time to time just to fix hybrid mbr/change boot order with efibootmgr.

It was fun, I miss my old macbook :(

Later I have installed Windows 10 by using Win7=>Win10 upgrade tool (the one which caused so much controversy)

Further reading: https://www.zdnet.com/article/heres-how-you-can-still-get-a-free-windows-10-upgrade/ https://www.rodsbooks.com/gdisk/hybrid.html

Non-booting MBP 2015

One day MBP belonging to a friend of mine stopped booting.

The issue was caused by preboot partition being out of sync and thus making decryption impossible.

I don’t know all the details, but Preboot seems to be a helper partition which is not encrypted and has pregenerated graphics and other fancy pre-macOS stuff.

I’ve found the solution some time after poking in the recovery, and have tweeted it:

So, here’s how to fix this:

  • Boot into recovery
  • Terminal
  • diskutil apfs list
  • diskutil apfs unlockVolume diskXs1
  • diskutil apfs updatePreboot diskXs1 -od /Volumes/Macintosh\ HD/var/db/dslocal/nodes/Default
  • Reboot

Symtoms: Stuck on Apple Logo, can’t go further, doesn’t even get to asking password

If it ever gets indexed by Google: failed to unwrap volume key APFS

(Also lol, it was indexed by Google indeed)

Further reading: https://blog.eriknicolasgomez.com/2016/09/24/apples-efi-logonui-managing-macos-sierras-wallpaper/

Non-booting MBP 2017

Some time ago while trying to install macOS 10.13.6 update I’ve got a bootloop.

I booted into recovery, did nvram boot-args='-v', and saw what was the issue:

ERROR!!! Load prelinked kernel with status 0x800000000000000e
Error loading kernel cache (0xe)

So, I’ve booted into recovery once again and have invalidated kext cache & regenerated prelinked kernelcache:

diskutil unlockVolume diskXs1
kextcache -invalidate /Volumes/Macintosh\ HD
touch /Volumes/Macintosh\ HD/System/Library/Extensions
kextcache -u /Volumes/Macintosh\ HD
kextcache -prelinked-kernel /Volumes/Macintosh\ HD/System/Library/Caches/com.apple.kext.caches/Startup/kernelcache -K /Volumes/Macintosh\ HD/System/Library/Kernels/kernel /Volumes/Macintosh\ HD/System/Library/Extensions

When it has successfully booted, I’ve regenerated prelinked kernel once again:

sudo kextcache -system-prelinked-kernel

Further reading: https://discussions.apple.com/thread/7298047

External SSD with Windows 10 for MBP 2017

So, I wanted to make an external bootable windows SSD for my new macbook – obviously for gayming.

I’ve bought an external SSD enclosure (first one turned to be really slow, so I had bought another one), and started trying to install windows on it.

So, I’ve tried two options, and I’m not really sure which one has worked:

  • Embed Apple’s drivers into the install.wim (See links below)
  • Install Windows from within another windows (VM) with dism

However, the next challenge was booting – I couldn’t get Windows to boot normally without the usb installer drive.

So, this is what I’ve done:

  • Install Windows with bootcamp
  • Move entire EFI partition to external SSD
  • Use EasyBCD/BCDEdit to fix up disk/partition GUIDs

Further reading: https://youtu.be/4gFAjCVleOk https://ndswanson.wordpress.com/2014/10/24/inject-drivers-to-windows-10-install-media/ http://codeabitwiser.com/2014/03/how-to-install-windows-7-with-only-usb-3-0-ports/ https://community.spiceworks.com/how_to/125921-how-to-add-drivers-manually-to-usb-drive-to-install-windows-using-a-usb-3-0-port

http://dismgui.codeplex.com