August 12, 2010

Fixing the Orange HardDisk Icons

Upon upgrading to OS X 10.6.3, the P55 chipset was supported OutOfTheBox.
But there's a downside...
Apparently due to a Gigabyte BIOS bug, all SATA hard drives appear as External (Orange Icons).
While it's just a cosmetic issue, it affects the familiar feeling of the OS X desktop.

Several methods were developed to overcome this.
I'll briefly describe the options here, and present my own 'Vanilla' Solution.

Option 1: Using the IOAHCIBlockStorageInjector kext

One of the options we skipped in the MultiBeast configuration in Part Three was the IOAHCIBlockStorageInjector.
This kext, makes all SATA drives appear as internal.
I call this a pseudo-kext, as it doesn't load a kext/driver binary, but instead overrides some options/configurations of the OS X original kext.

Although it's not an additional kext, I don't like it, as we lose Hot-Swap support.
It's still possible to unmount and remove drives, but upon reconnecting, those don't get mounted automatically (and it's necessary to use Disk Utility).

Option 2: Using the JMicron36xSATA kext

The JMicron36xSATA is identical to JMicron36xeSATA (which we selected in MultiBeast in Part Three), except that it uses an approach similar to the IOAHCIBlockStorageInjector, thus losing Hot-Swap again.

Option 3: Overwriting the External.icns file

This was used by some users in the tonymacx86 forum. It consists of overwriting the contents of the /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/External.icns file with the contents of /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/Internal.icns.
The easiest way to do this is to rename (so it also keeps a backup) the External.icns file, and copy the Internal.icns as External.icns.

The shortcomings of this method are, in my opinion, the "destruction" of the original icon file (albeit it's backed-up), and as a side-effect, all external drives on the SATA controller are shown as internal.


Option 4: Lnx2Mac 'Vanilla' solution... Assigning a custom icon

As the orange icons is just a cosmetic issue, I though it would be best to apply to it, well... "Make-Up"...

So we are going to assign a custom icon to our hard drive icon.

You might not be aware of it, but it's possible to alter the icon assigned to any file in OS X.
This is easily accomplished, by pasting the contents of the clipboard into the icon.

Great ! Let's do it on our hard drive icon!

So, first, we want to grab the original Internal Hard Disk icon into the clipboard.
We'll use Preview.app for this:
  • Open Preview.app
  • Select File|Open... or hit CmdKeyO
  • When the Open dialog appears, hit / (A "Go to the folder:" sub-dialog will appear)
  • Continue typing (or Copy/Paste) the following path:
    /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/
  • Click on "Go"
  • Select Internal.icns and click "Open"
  • If the preview sidebar is not shown, click on its icon
  • Select the first image, Internal.icns-1, and select Edit|Copy (or hit CmdKeyC)
  • You can now Quit Preview

With the Icon in the clipboard, we can now apply it to our hard disk icon.
  • Click on your Hard Drive's icon, on the desktop
  • Hit CmdKeyi to get the "Info" dialog
  • Select the small icon on the top of this dialog (not the one under Preview). A blue aura will appear
  • Hit CmdKeyV to paste the icon
  • Close the Info dialog

If you have multiple drives, you can repeat the Pasting process.


What's missing here ?...

Option 5: The holy grail... A DSDT based solution...

Ideally, we'd like to solve this at the DSDT level.
There were several attempts at it, but short of disguising the P55 as another Chipset, no other endeavor that I know of was successful at this...

Post your ideas, and we might collectively succeed at it !


Until then... Enjoy your familiar desktop !

21 comments:

  1. OPTION 4 is somewhat same with using CandyBar App. :)
    Thumbs Up!

    ReplyDelete
  2. @Melonetics: Yes, similar, but free ;)
    Also, I think in some cases, CandyBar behaves more like Option 3.

    ReplyDelete
  3. Dear Lnx2Mac, is this also true with the F11 BIOS for the GA-P55M-UD4, right? Nothing's changed, I mean?

    I would really be curious to see a DSDT solution in the (SATA) section. Perhaps we can add a register that overrides the BIOS default setting, or something. I wish I had more free time to read and experiment....

    ReplyDelete
  4. @Konsti: Yes, same with F11.
    I've been experimenting with that for several days, to no avail...

    It might be related to the SATA "CAP-Host capabilities register" bits 16:17, which the Gigabyte BIOS sets to 0:1, but the "Intel® 5 Series Chipset" datasheet states that "BIOS must set these bits to 00" (See section 14.4.1.1, page 594 on the linked datasheet) .

    ReplyDelete
  5. Hello,

    Thanks for this last tip. Easy, quick and non-intrusive!

    ReplyDelete
  6. @Adrián: Glad you liked it...

    But it's not the last ;)

    Stay tuned for more...

    ReplyDelete
  7. Option 4 would be my favorite, but it seems like it doesn't work on a NTFS disk / partition... I can't paste the icon.

    So i stay tuned, but if you have a solution meanwhile, i would be more than grateful !

    ReplyDelete
  8. @Jibi: Weird... I just tried on a FAT USB FlashDisk, and it worked...
    Check that the Internal.icns icon was correctly copied to the clipboard by pasting it on another icon on your desktop (you can create a temporary folder for that).
    If it works, try pasting again on your drive.
    It would surprise me that it doesn't work on an NTFS partition.

    BTW, to restore the icon to the default, select it (in the Info window), and hit Delete (Backspace).

    Hope this helps !

    ReplyDelete
  9. Thanks for the fast answer.

    It actually really doesn't work with a ntfs drive accessed through osx ntfs driver (read only).
    I installed the NTFS driver from NTFS-3g (read and write) and i can now change the icon.

    But thanks again, and i stay tuned.

    ReplyDelete
  10. @Jibi: Good to know !
    Every day I learn something new ! Thanks !

    ReplyDelete
  11. Here's the same thing as option 4:

    cp /System/Library/Extensions/IOStorageFamily.kext/Contents/Resources/Internal.icns /.VolumeIcon.icns

    Use /Volumes/YOUR-DISK/.VolumeIcon.icns for other mounted drives.

    This automated way could also be added to multibeast.

    ReplyDelete
  12. @Anthony: Indeed, I wrote about it in the tonymac86 forum a while back.
    However, as Finder caches whether a custom icon has been set, this seems to works only if you have already applied one.

    ReplyDelete
  13. Hi Lnx2Mac, i actually havn't any kext in /E/E, but...without the IOAHCIBlockstorage.kext (and use part4) my internal ntfs-drive always show up on Desktop, even if in Finder Preferences the Checkbox isn't checked. Any Solutions for this?

    ReplyDelete
  14. @karacho: You can try in a terminal:
    chflags hidden /Volumes/NameOfNTFSDrive
    and to restore it:
    chflags nohidden /Volumes/NameOfNTFSDrive

    You might have to restart Finder for this to take effect.

    ReplyDelete
  15. Gracias por todo! de verdad!

    I don't have audio yet, but I have an idea how to do it for my GAP55A UD3P, but I don't want to ruin everything again.

    Alex

    ReplyDelete
  16. Hi Lnx2Mac, Thank you so much i was searching everywhere for this...

    Ok i have one question... Now if i change the icon from external to internal using Option 4. Will it change in the System Information from External HDD to Internal HDD in the Volume Type.

    (Or)

    Is there a seperate procedure for that? How i can do that?

    ReplyDelete
  17. @Vaibhav Bharadwaj: No. Option 4 is just a cosmetic fix. If you want the drive to be recognized as internal, you can use option 1 or 2...

    But note that you'll lose the ability to hot-plug eSATA devices.

    ReplyDelete
  18. @ Lnx2Mac, Thank you for the reply much appreciated... So it cant be done in any other method using DSDT for now?

    And there wont be any difference in the system performance in any means, if the HDD showing external in the System Information right???

    ReplyDelete
  19. @Vaibhav Bharadwaj: Don't know if it can't be done with DSDT, but I wasn't able to do it, and didn't find a DSDT solution from the community.

    And no, no performance penalty.

    ReplyDelete
    Replies
    1. Via DSDT you can designate the SATA ports as ESB2 ports. I do believe you loose hit swap here too however.

      Delete
  20. Tried your option 1 thro multibeast and succeeded.
    Keep it up

    ReplyDelete