Jump to content

Waiting for root device when kernel cache used; only with some disks +FIX


bcc9
 Share

158 posts in this topic

Recommended Posts

I've updated my patch script for IOAHCIBlockStorage so that it should work under both 10.8 & 10.8.1. Update: 10.8.2 support added, and patch moved to post #1.

I have not personally tested this under 10.8.x as I'm currently running UEFI bios that does not exhibit this timing problem. The patch is confirmed to be working by others.

 

I would have done this much sooner but I've been swamped with real life stuff. Also the whole tonymac habit of copying my fixes omitting the documentation, where the fix came from, and the copyright is a real negative motivator. Google all the references to "patch relocation table for our patch point" for a sample, as well as my post at tonymac if you care. I've requested a fix over there but it's fallen on deaf ears. Perhaps my new do-not-steal/provide attribution copyright will make this more clear...

 

As for the comment about simply using a startup time-delay script:

That idea is a non-starter as this driver needs to load before the filesystem can be accessed.

 

Now, as I've hinted, I've tried to write a better fix where I have a time-delay kext that plugs in to IOAHCIFamily, and then IOAHCIBlockStorage plugs in to my time delay kext. This almost works but I can't get IOAHCIBlockStorage to then run correctly. There seems to be an issue with the constructors/metaclass or perhaps the plugin architecture that is getting in the way. If some developer has knowledge of the binary interface for these things I could use some help.

Link to comment
Share on other sites

@bcc9

 

I just tried your 10.8.1 patch method and sorry to report it did not work for me on the Lenovo T420.

- still get "waiting for root device" when using KernelCache=Yes

 

Oddly --- What does (still) work is your patched 10.8.0 kext (just the executable) for 10.8.1

 

so i put the older (10.8.0) patched binary in place and I can boot with kernelcache - running 10.8.1.

 

i.e /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

which is 180064 Bytes in size for 10.8.0 vs 180168 Bytes for 10.8.1.

Link to comment
Share on other sites

@bcc9

 

I just tried your 10.8.1 patch method and sorry to report it did not work for me on the Lenovo T420.

- still get "waiting for root device" when using KernelCache=Yes

 

Oddly --- What does (still) work is your patched 10.8.0 kext (just the executable) for 10.8.1

 

so i put the older (10.8.0) patched binary in place and I can boot with kernelcache - running 10.8.1.

 

i.e /System/Library/Extensions/IOAHCIFamily.kext/Contents/PlugIns/IOAHCIBlockStorage.kext/Contents/MacOS/IOAHCIBlockStorage

which is 180064 Bytes in size for 10.8.0 vs 180168 Bytes for 10.8.1.

Interesting, what about if you use my original workaround of booting with debug=8 ahcidisk=1? Does that work on your machine with 10.8.1?

Are you booting from an SSD or an ordinary laptop hard disk drive?

 

You could also patch the 10.8.1 version with a huge time delay, like 1-2 seconds instead of 200ms.

Link to comment
Share on other sites

Adjust installer for 10.8.2 :D

Not out yet AFAIK. I'm not going to make patches for developer previews as the driver code is still subject to change (and I don't use developer previews for interim releases).

You are welcome to patch it yourself and post an updated version here if you'd like.

 

I tried to make the ongoing maintenance of this patch fairly easy by breaking it down in the script to 4 things: maintaining the 2 relocation table indexes, the patch point address, and some fuzz that insures the patch is correctly being applied.

Link to comment
Share on other sites

@bcc9 -

 

sorry for the delay in response.

 

1) no i did not try the debug=8... approach as the bin patch method worked.

2) i too was thinking that longer delay may solve it for 10.8.1. but i was not sure what that string would look like? if you can provide the patch string for say 500 ms? i will test that out.

 

thanks. (for now rollback 10.8.0 exec is working on 10.8.1 kernel)

 

t

Link to comment
Share on other sites

1) no i did not try the debug=8... approach as the bin patch method worked.

2) i too was thinking that longer delay may solve it for 10.8.1. but i was not sure what that string would look like? if you can provide the patch string for say 500 ms? i will test that out.

Well I don't know why you won't test debug=8 ahcidisk=1 under 10.8.1 like I asked.

In any case I've updated the script to version 0.2 which allows you to specify whatever delay you wish, with a default of 200ms.

The delay is in units of ms. So:

./patch-ahci-mlion.pl -d 100

for 100ms

./patch-ahci-mlion.pl -d 1000

for 1 second

Link to comment
Share on other sites

@bcc9

ok good news. your revised method (script 0.2) with variable sleep time worked with the 10.8.1 kext. I had to go up to 600ms for 10.8.1. well 400 did not work, and 600 did. so i call that success.

 

also i tried your early method of boot args ahcidisk=1 debug=8 and that did not work with the sto.

 

as soon as i upgrade to 10.8.2 I will post the results with (the 0.3 script) etc.

 

thanks much!

t

PS. this is on a Lenovo T420 with 320GB 7200rpm sata as single device.

Link to comment
Share on other sites

Could someone report whether or not the problem remains after upgrading to 10.8.2?

 

Just installed 10.8.2 and booted > sadly the problem persists. I'm going to patch the kext now with upgraded script...

 

Updated patch is working perfectly for 10.8.2 - thanks again bcc9.

 

I'm wondering what Apple is updating in detail in the kext every time :/

Link to comment
Share on other sites

I'm unable to boot to 10.8.2 without -f, and the binary has changed since 10.8.1 - your patch doesn't apply, as the bytes have changed.

I also updated to 10.8.2. The problem is still there... i know this ll sound weird here but I do not know what to do to patch the IOAHCIBlockstorage.kext. I tried a couple of things but not sure what to do with the script in #01 post.

pls guide me. thanks.

Link to comment
Share on other sites

Ok, I've updated the script to version 0.3, which includes osx 10.8.2 support. The new version is in post #1.

 

Confirming successful boot after the running the updated patch. I believe people reporting failures need to increase the default delay for their particular case.

Link to comment
Share on other sites

bcc9, would you be able to locate the bytes in AppleIntelPIIXATA to delay its getting loaded? This one (by Detrich 2010-03-29, still the same we're using these days for L & ML)?

I don't see what bug that post is trying to fix and what the fix is supposed to be. The rest of the thread doesn't seem to pertain to a timing bug, so I don't think the fix here would be applicable there.

I guess the bug over there relates to using intel ICH in IDE mode? I would never use a hackintosh that way - AHCI mode has superior performance.

I can't really (don't have time to) start developing fixes for problems that don't pertain to hardware I use.

 

 

@bcc9

ok good news. your revised method (script 0.2) with variable sleep time worked with the 10.8.1 kext. I had to go up to 600ms for 10.8.1. well 400 did not work, and 600 did. so i call that success.

I'm fairly surprised such a different delay was required for your system. After all, all us sandy bridge users are using systems with similar cpu speeds.

I guess variance in how long disk drives take to initialize/answer async requests is making the difference.

 

Oh and thanks everyone for the compliments.

 

Link to comment
Share on other sites

 Share

×
×
  • Create New...