Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sierra 10.12.4 hangs during boot, stuck at gIOScreenLockState #24

Open
dcosson opened this issue Apr 2, 2017 · 71 comments
Open

Sierra 10.12.4 hangs during boot, stuck at gIOScreenLockState #24

dcosson opened this issue Apr 2, 2017 · 71 comments

Comments

@dcosson
Copy link

dcosson commented Apr 2, 2017

Hey, I'm trying to get this to boot the first time. After following the README directions it just hangs about 30 seconds into starting up. The last log lines when it hangs are shown below. Any idea what the issue is?

I'm on Virtualbox 5.1.18 r114002 (Qt5.6.2) and MacOS 10.12.4 on an early 2015 Macbook Pro, and in Virtualbox I'm using 4GB RAM, 128MB video memory, 2 CPUs, and I've tried marking the ISO as Live CD/DVD

screen shot 2017-04-01 at 5 37 14 pm

@dcosson dcosson changed the title Hangs during boot, stuck at gIOScreenLockState Sierra 10.12.4 hangs during boot, stuck at gIOScreenLockState Apr 2, 2017
@dcosson
Copy link
Author

dcosson commented Apr 2, 2017

I downloaded the latest El Capitan installer from the mac store and that works fine. So it seems like there's an issue with the latest macOS Sierra version.

@mam8cc
Copy link

mam8cc commented Apr 5, 2017

Can confirm, latest macOS Sierra stops at gIOScreenLockState

@andrewschreiber
Copy link

@dcosson How did you download the El Capitan installer? I get a "the version of macOS is too new" error.

Link: https://itunes.apple.com/us/app/os-x-el-capitan/id1147835434?mt=12

@aabdellah
Copy link

Same issue here.

@dcosson
Copy link
Author

dcosson commented Apr 7, 2017

@andrewschreiber I was able to download from purchases list in my app store. I got this machine in ~ October 2015 so it came with El Capitan originally, is yours newer possibly?

@z
Copy link

z commented Apr 7, 2017

Here's a tutorial on how to download the El Capitan pkg and trick the App Store into installing it, instead of Sierra, by hosting it locally.

https://7labs.heypub.com/tips-tricks/el-capitan-direct-download.html#El_Capitan8211_Single_Download_Multiple_Installations

@pineman
Copy link

pineman commented Apr 9, 2017

I can also reproduce this issue. Why would it be that 10.12.4 raises this issue?

@stevenirby
Copy link

I'm also stuck on the gIOScreenLockState error. I've tried everything with tweaking the settings.

@plessbd
Copy link

plessbd commented Apr 13, 2017

I believe it has something to do with 10.12.4 I was able to install 10.12.3 (had a previous install downloaded already) and upgrade to 10.12.4 without issue.

@livelite
Copy link

livelite commented Apr 13, 2017

I can confirm the same issue, stuck on gIOScreenLockState booting OS X Sierra 10.12.4
It worked for OS X El Capitan without issues.

@stevenirby
Copy link

So according to this: https://github.com/timsutton/osx-vm-templates#issue-with-10124

The Sierra 10.12.4 installer seems to no longer support including custom packages as part of the installer, unless they are signed by Apple.

I think until a hack is found this will no longer be possible.

@skela
Copy link

skela commented Apr 13, 2017

I've the same issue with 10.12.4.

I'd also like to point out that Parallels lets you create a virtual machine image from the recovery drive that works, also with 10.12.4. Not sure how this is achieved though.

@LaloLoop
Copy link

LaloLoop commented Apr 13, 2017

I tried the procedure described in this repo just in the days when 10.12.4 came out, and I can confirm that this is not working with the new version. I did not have the oportunity to try it with 10.12.3, but I checked back in that day for any issues related and could not find anything.
I also tried running it in vmware 7 (an old version compared to toady's) on my MacbookPro but it hung up on the Apple Logo screen. So I believe this is related to the latest Installer. Probably Apple made some breaking changes.
Probably the only solution would be to install with 10.12.3, and then upgrade? If someone has this kind of setup please report it. Thank you all!

@plessbd
Copy link

plessbd commented Apr 13, 2017

@LaloLoop as I commented 10 hours ago, I was able to install with 10.12.3 and upgrade to 10.12.4

@tcurdt
Copy link

tcurdt commented May 3, 2017

Does anyone know how/where to download 10.12.3? I am also stuck when trying to install 10.12.4

@nathanhleung
Copy link

@tcurdt I'm facing this same issue - I don't think there's any way to get the previous installer unless you know someone who already has it. I ended up redownloading El Capitan from the App Store and I'm using it now

@tcurdt
Copy link

tcurdt commented May 5, 2017

@nathanhleung I am doing the very same thing. Still need Sierra at some point though.

@petemounce
Copy link

Is http://osxdaily.com/2016/09/27/allow-apps-from-anywhere-macos-gatekeeper/ any help?

Sorry, not really a subject matter expert; I'm probably conflating Apps with the pkg, and I've no idea whether it's possible to even run commands before the pkg is used?

@nathanhleung
Copy link

@tcurdt I downloaded the Sierra installer on my El Capitan VM and have gone through the install/restart process a few times but it doesn't seem to be working - by any chance have you taken that route in trying to install Sierra?

@tcurdt
Copy link

tcurdt commented May 13, 2017

@nathanhleung no, I never tried that as I assume the download will have the same problem. I just found an old Sierra USB stick ready to install though. I might try to turn that into an iso and see if that works. That's about all the options I see at the moment.

I am wondering if this works for vmware/parallels - then switching away virtualbox could be another option.

@jonanh
Copy link

jonanh commented May 14, 2017

I was having the same issue and unfortunately I didn't have any copy of an older installer either, and in my desperate search for a solution I found this thread. I wanted to try AutoDMG + vfuse but I wanted to use virtualbox for now, so I wrote a modified version of Tim Sutton's prepare_iso.sh timsutton/osx-vm-templates#82 which does the same as AutoDMG + vfuse but using Virtualbox's tools, which generates a vdi with a fresh install.

prepare_vdi.sh

The idea more less of what this script is doing is:

IMAGE_SIZE=32
IMAGE_SIZE_BYTES=$(($IMAGE_SIZE * 1024 * 1024 * 1024))
sudo hdiutil attach -noverify -mountpoint /tmp/installesd /Applications/Install\ macOS\ Sierra.app/Contents/SharedSupport/InstallESD.dmg
sudo hdiutil create -size "${IMAGE_SIZE}g" -type SPARSE -fs HFS+J -volname "Macintosh HD" -uid 0 -gid 80 -mode 1775 sierra.dmg
MOUNTOUTPUT=$(sudo hdiutil attach -noverify -mountpoint /tmp/os -owners on sierra.dmg)
sudo installer -verboseR -dumplog -pkg /tmp/installesd/Packages/OSInstall.mpkg -target /tmp/os
DISK_DEV=$(grep GUID_partition_scheme <<< "$MOUNTOUTPUT" | cut -f1 | tr -d '[:space:]')
sudo cat "$DISK_DEV" | VBoxManage convertfromraw stdin ~/Documents/output.vdi "$IMAGE_SIZE_BYTES"
hdiutil detach /tmp/os
hdiutil detach /tmp/installesd

I hope that it helps :-)

@fabriziogiordano
Copy link

Will Sierra 10.12.5 fix this? Did some of you tried already?

@benmarten
Copy link

Just tried today, same issue with 10.12.5.

@tcurdt
Copy link

tcurdt commented May 16, 2017

@jonanh that looked very promising at first - but now it's just doing:

...
May 16 18:38:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:39:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:40:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:41:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:42:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:43:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:44:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:45:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:46:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:48:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:49:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:50:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:51:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
May 16 18:52:18  installer[63714] <Alert>: client 0x7f84b6d163d0: phaseName = "OS Installer"
...

@jonanh
Copy link

jonanh commented May 16, 2017

@tcurdt this is the output I get after running the prepare_vdi.sh from timsutton/osx-vm-templates#82

@tcurdt
Copy link

tcurdt commented May 16, 2017

@jonanh oh, I was trying your script from above. Will give that a try.

@tcurdt
Copy link

tcurdt commented May 17, 2017

I finally got it working like this:

sudo prepare.sh ~/Desktop/Install\ macOS\ Sierra.app
#!/bin/sh
set -x
set -e

IMAGE_SIZE=32
IMAGE_SIZE_BYTES=$(($IMAGE_SIZE * 1024 * 1024 * 1024))

echo "attaching input OS X installer image"
hdiutil attach \
  -noverify \
  -nobrowse \
  -owners on \
  -mountpoint /tmp/installesd \
  "$1/Contents/SharedSupport/InstallESD.dmg"

echo "creating empty read-write DMG"
hdiutil create \
  -size "${IMAGE_SIZE}g" \
  -type SPARSE \
  -fs HFS+J \
  -volname "Macintosh HD" \
  -uid 0 \
  -gid 80 \
  -mode 1775 \
  /tmp/sierra.dmg

echo "mounting empty read-write DMG"
MOUNTOUTPUT=$(hdiutil attach -noverify -mountpoint /tmp/os -nobrowse -owners on /tmp/sierra.dmg.sparseimage)

echo "installing macOS"
installer \
  -verboseR \
  -dumplog \
  -pkg "/tmp/installesd/Packages/OSInstall.mpkg" \
  -target "/tmp/os"

echo "exporting vdi to /tmp"
DISK_DEV=$(grep GUID_partition_scheme <<< "$MOUNTOUTPUT" | cut -f1 | tr -d '[:space:]')
echo "DISK_DEV=$DISK_DEV"
cat "$DISK_DEV" | pv -s $IMAGE_SIZE_BYTES | VBoxManage convertfromraw stdin /tmp/macos-10.12.vdi "$IMAGE_SIZE_BYTES"

echo "done"
hdiutil detach /tmp/os
hdiutil detach /tmp/installesd

In case you don't have pv installed you have to remove the pv -s $IMAGE_SIZE_BYTES | of course.

But be aware - updating to 10.12.5 after the install broke the booting similar to what I saw on the former install attempts. So it doesn't seem to be the final solution.
Maybe I'll try again after increasing the memory of the vm. Or I just cave and shell out the money for an upgrade of the old vmware/parallels license :-/

@ghost
Copy link

ghost commented Aug 1, 2017

I had the same problem trying with 10.12.6 in Virtualbox 5.1 and Virtualbox 5.0.
I've tried with the usual custom vboxmanage setextradata stuff and cpuid and without, tried without USB, with USB1.1, 2 and 3. It gets stuck at gIOScreenLockState regardless.

@ynikanchyk
Copy link

ynikanchyk commented Aug 2, 2017

With instructions for prepare_vdi.sh provided by @jonanh I was able to obtain a working VirtualBox VM with OS X 10.12.6 on the Mac mini host. I was able to enter my Apple ID and get updates for applications. I didn't use packer, just imported appliance from .ovf-file. All VM options were used as provided by prepare_ovf.sh script, only after successfull update I decided to switch off audio and change network settings according to my needs.

Just for assurance, the boot log contains the same message with gIOScreenLockState mentioned but boot process doesn't stuck after it (IOLockUnlock(gIOConsoleUsersLock);is executed there according to xnu-3789.51.2/iokit/Kernel/IOService.cpp - I have no idea if/why it stucks when installation is started from ISO image).

Once again for guys having the problems: make sure that installation is performed NOT on VM from the .iso-image but on the host to .dmg-file and then VM is created to use the disk with already installed OS X. That's what prepare_vdi.sh/prepare_odf.sh are for.

Thank you very much, @jonanh.

@kennethreitz
Copy link

@ynikanchyk you hopefully just saved me. will know soon :)

@ashumeet
Copy link

ashumeet commented Aug 6, 2017

@ynikanchyk ..Thank you ... it worked after 3 hours of searching internet. macOS 10.12.6
@jonanh .. Thank you ... you are a real life saver.

@ghost
Copy link

ghost commented Aug 6, 2017

@jonanh This helped me test macOS Sierra 10.12.6 on windows host.
I had to set cpuid, DeviceID and SMC of box to make it work on windows.

@adrian-keith
Copy link

@soapagent Can you go into more detail about setting the CPUID, DeviceID, SMC? I'm new to this and attempting to run on my desktop.

-Core i5 6500
-16GB RAM
-W10 x64

@ghost
Copy link

ghost commented Aug 8, 2017

@lXbalanque , Please check this article.

  • First part makes ISO, so you don't need to see them, ISO image is not working, we need to create pre-installed vdi using @jonanh 's script.
  • Then using VBoxManage command, this is the part setting CPUID and etc.

https://www.howtogeek.com/289594/how-to-install-macos-sierra-in-virtualbox-on-windows-10/

@kennethreitz
Copy link

Now, if only @jonanh's script worked with High Sierra :)

@mrroboto1420
Copy link

@jonanh hello, I am having this same issue on a Windows 10 host. I was just wondering how to use your script? I have a Sierra.iso file created from the instructions on the HowToGeek page.

Do I need to take a few steps back a run the scripts on my Mac with the .dmg file? I am new to this kind of thing and could not figure out what to do from this thread.

@pbar1
Copy link

pbar1 commented Sep 8, 2017

@mrroboto1420 The .iso method doesn't work anymore as of 10.12.4. Ignore all the steps in the Howtogeek article on creating the .iso and instead run @jonanh's script on your Mac. Make sure you have VirtualBox installed on your Mac as well, as the script depends on it. After you've generated the .vdi, you can put that on your Windows host and run it from there.

@ncs-minapuck
Copy link

ncs-minapuck commented Sep 8, 2017 via email

@ghost
Copy link

ghost commented Sep 8, 2017

I made it sure iso method is working with 10.12.6.3 installer.
It sure is not working with VBox, it is only working with VMware.

@ghost
Copy link

ghost commented Sep 8, 2017

If you are somewhat interested in working in the virtually installed macOS, like coding with GUI interface, you better use VMware, as it has a little stronger graphics virtualization.

If you want a non-GUI server, using VBox is not so bad. :)

@ncs-minapuck
Copy link

ncs-minapuck commented Sep 8, 2017 via email

@weaseltraps
Copy link

Thanks for this helpful thread. I've used prepare_vdi.sh to successfully boot a sierra guest in VBox on my Windows host.

My issue is I can't get more than 4MB for the VRAM so tthe interface is painfully slow. Host has 24GB RAM and integrated intel 520 graphics (i5-6200u). Anyone have the same issue and resolved it?

Thank you in advance for any help.

@an-rohangovekar
Copy link

I am getting this after booting from the generated vdi file on Ubuntu.
virtualbox_sierra_20_09_2017_12_47_06

@styxlab
Copy link

styxlab commented Sep 24, 2017

@jenilkansara: Having the same issue with iphone not deteced since Sierra 10.12.4. In my case the iphone is showing up in the device list with correct infos, but neither itunes nor xcode is able to detect it.

@jenilkansara
Copy link

@styxlab I got it working on MacOS Sierra by using VMWare. The iPhone connects successfully.

@styxlab
Copy link

styxlab commented Sep 29, 2017

@jenilkansara Thanks. I can confirm that. As I'm bound to virtualbox: Has anyone had success with iphone usb passthrough on virtualbox since Sierra 10.12.4 or higher?

@dimabin
Copy link

dimabin commented Sep 29, 2017

After updating the system (Sierra 10.12), my Mac mini boots up until the progress bar is at about 50%, then display becomes simply black. The computer does not shut down, but display is simply black.

If I boot in verbose mode, the last line I see is the following:
IOConsoleusers: gIOScreenLockState 3, hs 0, bs 0, now 0, sm 0x0

Internet recovery (Shift-Option-Command-R) does not help: recovery itself seems to proceed fine, but when it comes again to the Apple logo, the progress bar again reaches about 50% and the display becomes black.

Starting up in Recovery mode(Command-R) and starting up in Safe mode (Shift) do not help: as in Normal mode, it reaches 50% of progress bar and the display becomes black.

I can boot in single user mode (Command-S): "fsck -fy" does not find any problems. I don't know what other things I can do in single user mode.

As I understood, my video hardware is not compatible with the new version of Sierra. What can I do? Can I install previous versions of macOS? How can I do that if I can boot only in single user mode?

Info:
Mac Mini 5,1
Dual Core Intel Core i5
Intel HD Graphics 3000

@nikitalpopov
Copy link

@dimabin I have the same issue with my MacBook Pro today. How did you solve it?

@dimabin
Copy link

dimabin commented Jan 3, 2018 via email

@0kzh
Copy link

0kzh commented Feb 27, 2018

@dimabin I'm facing the exact same issue but on a Macbook Pro. Any ideas what I should be replacing?

@dimabin
Copy link

dimabin commented Feb 27, 2018 via email

@geerlingguy
Copy link
Owner

Not sure what to do with this issue; it looks like there are a few related issues mentioned in the thread, but as it's grown to 67 comments and I don't think there's any software fix I can add in the repo to 'fix' these issues (especially when they're related to hardware), I'm tempted to close it.

@0kzh
Copy link

0kzh commented Aug 15, 2018

@geerlingguy What worked for me was dropping the dGPU completely and switching to integrated graphics. See here

@widhaya3
Copy link

For me, set paravirtualization interface to "None" and it's work.

#https://gist.github.com/arobb/447a962af4f07ef81e79987d686275e5
#https://www.insanelymac.com/forum/topic/292170-how-to-spoof-real-mac-in-vmware/
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-F22589C8"
VBoxManage setextradata "$NAME" "VBoxInternal/Devices/efi/0/Config/DmiSystemSerial" "CK1156I6DB6"
VBoxManage modifyvm "$NAME" --paravirtprovider none

#REVERT BACK WHEN FINISH INSTALLATION
VBoxManage modifyvm "$NAME" --paravirtprovider default

mingwandroid added a commit to mingwandroid/osx-vm-templates that referenced this issue Oct 3, 2019
geerlingguy/macos-virtualbox-vm#24

Make sure to undo this finally - for 10.12.4 and above, but there could be other
issues after: https://github.com/timsutton/osx-vm-templates#issue-with-10124
mingwandroid added a commit to mingwandroid/osx-vm-templates that referenced this issue Oct 5, 2019
geerlingguy/macos-virtualbox-vm#24

Make sure to undo this finally - for 10.12.4 and above, but there could be other
issues after: https://github.com/timsutton/osx-vm-templates#issue-with-10124
@RefriZaddo
Copy link

RefriZaddo commented Feb 4, 2022

well I passed the gIOScreenLockState, but I got stuck in Sound Assertion in AppleHDAEngine at line 605

Edit: I managed to pass my problem
Also, I use VirtualBox 6.1.32. The code's last line made the vm unbootable, so I reverted it to 0. The mac model I set my vm to is iMac 19,1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests