Jump to content

Injecting Drivers Into an Install DVD


ObsidianX
 Share

33 posts in this topic

Recommended Posts

Well I wasn't able to find any tutorials on how to inject drivers into the damn DVD's so I figured I'd make one for anybody interested. Of course thanks go out to the fine folks in the IRC channel who were helpful in pointing me to the necessary tools in which to do this :P

 

Necessary Tools:

 

* TransMac

* VMWare (or some sort of Mac machine with HFS+ for the permissions)

* An ISO to work with

 

 

Alright, so with your perfectly legitimate copy of TransMac <.< open the ISO in the lower half of the screen and navigate to

HFS+ Partition/System/Library

In here you'll find a bunch of folders and the Extensions.mkext file, this is the one we want. Copy this to wherever you'd like outside of the ISO and quit TransMac.

 

NOTE: This injection method still works perfectly on Leopard disks! The only thing I've seen that is different is the majority of the folders are hidden on the Leopard disk. All you have to do is show hidden folders and the rest is identical!

 

NOTE: In order to successfully apply this injection method you need to ensure that the DVD image does not include the Extensions folder along side Extensions.mkext in the /System/Library folder. If it does, the DVD will default to the directory's contents and load each driver it finds there. Remove this folder, and the DVD will use the mkext instead

 

Next we need to get this over to a Mac machine to do the modifications. I'll assume you have this setup as thats beyond the scope of this tutorial. From within Mac open up a terminal and navigate to the directory with the Extensions.mkext file and run the following commands:

mkdir extracted
mkextunpack -a i386 -d extracted Extensions.mkext

Quick explanation of commands for the weary:

mkdir extracted - makes a new directory called extracted
mkextunpack - unpacks the mkext file
-a	- specifies the architechture type, in our case, i386
-d	- specified the directory we want the files to be extracted to

Alright, now that we're cozy running random commands we need to inject our new driver into the mix. Hopefully you have the kext on a thumb drive or on the computer you're working on, cuz you'll need it.... This is the easy part, all you have to do is copy/move the .kext folder into our folder, extracted, repair permissions, and roll up our mkext like so (I'll use AppleVIAATA.kext as our example):

mv /Users/obsidian/AppleVIAATA.kext /Users/obsidian/extracted/.
sudo chown -R root:wheel /Users/obsidian/extracted
sudo chmod -R 755 /Users/obsidian/extracted
kextcache -a i386 -m /Users/obsidian/NewExtensions.mkext /Users/obsidian/extracted

Explanation of commands for the weary:

mv - move command, hope this doesn't frighten you too much
chown - changes ownership of files and folders
-R	- Recursively change ownership (go into all subsequent directories and files and change those too)
 root:wheel - sets the owner to root and the group to wheel which is what the kernel wants for its extensions
 chmod - changes the access rights of files and folders
 -R	- just like chown, recursively make changes
 755	- again, required by the kernel, this sets the access rights to be read/execute by all and writable by the owner (root)
kextcache - creates a kernel extension cache file
 -a	- like mkextunpack this will select a particular architechture to put into the cache file
 -m	- create an mkext style file with the name specified
sudo - runs the following commands/arguments as root just once

Alright! Now at this point you should have NewExtensions.mkext and Extensions.mkext in the directory you were working on, in my case it was my home directory /Users/obsidian. Now all you have to do is take NewExtensions.mkext and put it back into the DVD. Of course, remember that the file needs to be renamed Extensions.mkext which will overwrite the old one already in the DVD.

 

So back over on your Windows machine with TransMac open the ISO back up and in the top folder navigate to where your NewExtensions.mkext (renamed to Extensions.mkext) file is located and drag it back over to the directory we originally got the Extensions.mkext from: HFS+ Partition/System/Library.

 

It'll ask if you want to overwrite the file, yes of course we do, happy little progress bar, aaaaaaaaaaaand DONE! Burn this sucker onto a DVD-R(W) (preferrably a RW to test :) ) We now have our custom AppleVIAATA.kext (or what ever you're trying to inject) in our install DVD :)

 

On a side note, it should be noted that burning install DVD's at faster speeds caused nothing but trouble for me so I highly recommend burning at 1x or 2x so there's a low chance of things getting funky when you boot the DVD. A 1x burn for a full sized 4.7GB DVD will take about an hour, and a 2x will take about 30 minutes but its better to burn once and have it work then pull your hair out over coaster'd DVD's.

 

Hope this helps :)

-ObsidianX

Link to comment
Share on other sites

  • 2 months later...

Obsidian, this is most helpful.

 

That said, I find myself wishing this forum had a "Karma" or "Applaud" system, I find it wholly unsatisfying to just say thanks and leave it at that. It's nice to have a track record for those who have added a lot to our community.

My $0.02.

Link to comment
Share on other sites

  • 3 weeks later...

chown -R root:wheel /Users/obsidian/extracted

chmod -R 755 /Users/obsidian/extracted

 

here you have to use

 

sudo chown -R root:wheel /Users/obsidian/extracted

sudo chmod -R 755 /Users/obsidian/extracted

 

and is there any way to add .pkg to install dvd with simultaneous installation of the packages with the OSx install

coz every time i install leopard i have to install so many softwares and drivers afterwards

pls help

Link to comment
Share on other sites

chown -R root:wheel /Users/obsidian/extracted

chmod -R 755 /Users/obsidian/extracted

 

here you have to use

 

sudo chown -R root:wheel /Users/obsidian/extracted

sudo chmod -R 755 /Users/obsidian/extracted

 

Ah, right, thanks for pointing that out :) I always just sudo -s and go from there, but I'll update it.

 

and is there any way to add .pkg to install dvd with simultaneous installation of the packages with the OSx install

coz every time i install leopard i have to install so many softwares and drivers afterwards

pls help

 

Unfortunately I've never bothered messing with the installation packages, and don't know where to even start on the matter. I'd be more than happy to look into that in the future though, as I'm sure its not that hard. Sorry I can't be any immediate help though.

Link to comment
Share on other sites

Much as I know this is in the Tiger forum, but so hard to find tutorials that anyone can use, is this still applicable to Leopard? I heard their discs are differently set up.

Link to comment
Share on other sites

  • 3 weeks later...
Much as I know this is in the Tiger forum, but so hard to find tutorials that anyone can use, is this still applicable to Leopard? I heard their discs are differently set up.

Yes, this still applies to a Leopard disk, I just wrote this tutorial before the Leopard forum was created and it got moved to Tiger automatically.

 

After injecting the AppleNForceATA.kext from MeDevil i noticed that the dvd boots but very slow. and it hangs on install when trying to install on a SATA drive.

Few things to try:

1) Make sure you dont have an Extensions folder in the ISO as well, otherwise the kernel will load that up, causing it to boot VERY slowly and possibly not at all.

 

2) Burn it at a slow speed, like 1x or 2x (2x works for me) as the disk gets very very picky the faster you burn.

 

3) Make sure your device is actually supported by MeDevil's new driver. My device is on the blacklist, and it freezes on boot, sadly, so I still have to use the VIAATA method.

 

Awesome information, I appreciate the info! Is there any way to add a .pkg to a DVD so it is installed after you install Leo? Like have Xbench or whatever included? Does it apply the same way?

I haven't tried injecting packages into the ISO, haven't had the need. It's a little out of the scope of this particular tutorial, but if I ever get around to that I'll definitely create a tutorial for that as well.

 

Cheers,

ObsidianX

Link to comment
Share on other sites

excellent guide ObsidianX

i agree with others in this thread - this definitely should be stickied.

 

and is there any way to add .pkg to install dvd with simultaneous installation of the packages with the OSx install

coz every time i install leopard i have to install so many softwares and drivers afterwards

pls help

read here:

How to create a custom OSX DVD (Tiger & Leo)

Link to comment
Share on other sites

  • 4 weeks later...
  • 1 month later...
hmm, i followed your guide, but my dvd cannot boot up afterall .. what could make this wrong?

 

i thought this would be as easy as opening the kalyway10.5.2 iso image to edit using transmac. but when i use transmac, all that does is place the iso image in the top window. click to open the file and transmac uses magic iso to open it, which renders the image unbootable. try and insert my new extensions.kext and it says not enough room to save disc. alternatively i have transmac try to open the iso with ultra iso premium or power iso . . . all with the same result

 

can anyone help ? what am i doing wrong ?

 

I've got transmac, mac drive, ultra iso, power iso, magic iso, win iso, nero ...

Link to comment
Share on other sites

  • 3 weeks later...
  • 1 month later...
Necessary Tools:

 

* TransMac

* VMWare (or some sort of Mac machine with HFS+ for the permissions)

* An ISO to work with

 

-I can probably find TransMac... But could I use the old Virtual PC program for Mac by Connectix?

 

and by ISO I take it you mean, and ISO image of any of these versions of OSx86?

Link to comment
Share on other sites

  • 2 months later...

Hey i know you said this works with leopard but in the kalyway iso I'm using there is a extensions folder with a bunch of kexts as well as the extensions.mkext. This is not the case with other install isos i've used. When i tried injecting the driver (nforceata.kext) it got the still waiting for root device error, this may have been my fault as i think i might have previously edit that iso before, maybe. Is there anything we have to do differently when we add the driver or is it probably just my fault?

 

By the way, thanks for the great tutorial it really helped me out with a different install!

Link to comment
Share on other sites

  • 1 month later...
  • 3 weeks later...

Hello all

 

Im using kaly 10.5.2 as my install disk. So far i have tried two types of injections:

 

1) insert the extensions.mkext file back into the ISO after modifying it with a mac AND ALSO DELETE the extensions folder in System/Library --> burn.

 

This method installed the kext i wanted (raid drivers enabling osx to see my hard disk) and subsequently enabled me to install about 30% of leopard before it got stuck.

 

 

2) insert the extensions.mkext file back into the ISO after modifying it with a mac AND DO NOT DELETE the extensions folder in System/Library --> burn.

 

Disk utilities was unable to see my HD despite the next extensions.mkext being inserted into the iso.

 

 

Method 1 was successfull in installing the kext i wanted but the install of leopard perhaps failed due to my deleting of the extensions folder.

 

Method 2 follows the instructions but does not seem to have the effect of installing the desired kext.

 

Can anyone see where i went wrong? =D

Link to comment
Share on other sites

  • 4 weeks later...
  • 4 weeks later...
 Share

×
×
  • Create New...