Jump to content

Injecting Drivers Into an Install DVD


  • Please log in to reply
32 replies to this topic

#1
ObsidianX

ObsidianX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 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

#2
apache2

apache2

    InsanelyMac Protégé

  • Just Joined
  • Pip
  • 3 posts
It's about flipping time someone wrote a tutorial. Thank you, this guide helped me successfully inject my specific drivers into a DVD for installation.

#3
royco

royco

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 177 posts
Yeah its about time. Will try this tonite.

Thanks.

#4
ObsidianX

ObsidianX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts
Heh, possibly sticky? eh? eh?

#5
Stupidicus

Stupidicus

    InsanelyMac Protégé

  • Members
  • PipPip
  • 65 posts
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.

#6
NFOav8or

NFOav8or

    InsanelyMac Protégé

  • Donators
  • 14 posts
  • Gender:Male
  • Location:WA
I agree with all the other users praising this post. I was at a loss and unable to make sense of what the other posts were telling me to do. From a true NuB (but slowly catching on to OSX via the Macbook), THANKS! :(

#7
vakakush

vakakush

    InsanelyMac Protégé

  • Members
  • Pip
  • 48 posts
  • Gender:Male
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

#8
ObsidianX

ObsidianX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts

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.

#9
zapzupnz

zapzupnz

    InsanelyMac Protégé

  • Members
  • Pip
  • 39 posts
  • Gender:Male
  • Location:Wairoa, NZ
  • Interests:Computers, radio, TV, some movies, retail :)
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.

#10
AcidRain9

AcidRain9

    InsanelyMac Protégé

  • Members
  • PipPip
  • 51 posts
  • Gender:Male
  • Location:New England
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.

Any Ideas?

#11
CompCrasher86

CompCrasher86

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 175 posts
  • Gender:Male
  • Location:Massachussetts
  • Interests:Building computers, audio and video editing, HOME THEATER, Xbox 360.
STICKY! STICKY! STICKY!

super-useful tutorial, well written, about time somebody did this

#12
KenK2

KenK2

    InsanelyMac Protégé

  • Members
  • Pip
  • 16 posts
  • Gender:Male
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?

Thanks!

#13
ObsidianX

ObsidianX

    InsanelyMac Protégé

  • Members
  • PipPip
  • 60 posts

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

#14
zarac

zarac

    InsanelyMac Zaphod

  • Members
  • PipPipPipPipPip
  • 314 posts
  • Gender:Male
  • Location:Zagreb, Croatia
  • Interests:film/video editing and post-production
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)

#15
Cobretti

Cobretti

    InsanelyMac Protégé

  • Members
  • Pip
  • 6 posts
Thanks for this excellent guide!

#16
munky

munky

    Agent of Evolution

  • Retired
  • 2,900 posts
  • Location:The Land of Hairy-Arsed Highlanders
duly stickied

#17
muitommy

muitommy

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPip
  • 737 posts
  • Interests:Piano x Mac OS X
hmm, i followed your guide, but my dvd cannot boot up afterall .. what could make this wrong?

#18
MrRoper

MrRoper

    InsanelyMac Geek

  • Members
  • PipPipPipPip
  • 179 posts
  • Gender:Male

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 ...

#19
Incubus8P

Incubus8P

    InsanelyMac Protégé

  • Members
  • Pip
  • 9 posts
ObsidianX: Thanks for the tutorial. I bookmarked it a while ago and refer to it whenever I need to.

#20
XweAponX

XweAponX

    InsanelyMac Protégé

  • Members
  • Pip
  • 47 posts

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?





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

© 2014 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Mac Netbook  |   PHP hosting by CatN  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy