PDA

View Full Version : how to install kext from usb stick in terminal ?


dj-dc
01-08-2009, 09:29 PM
can anyone write it down for me what i need to do to install a kext from a usb stick in terminal when i boot from the instal cd ?

milanca
01-08-2009, 10:50 PM
Hi and welcome to InfiniteMac forum.

To install kext, driver for example your chipset controller or graphic card, you need some basic console commands. This is a basic, usual routine to install some kext.
Suppose that kext is in the root of your usb drive. If not, just point to the folder containing the kext by adding /~FolderName/ before ~DriverName.kext

Become 'su' first

sudo -s

You can list your Partitions/Volumes with

ls /Volumes

Copy kext:

cp -r /Volumes/USBPartitionName/~DriverName.kext /Volumes/~LeopardPartitionName/System/Library/Extensions

*Do the same for every kext you want to install.

Change permissions and ownership to new installed kext(s).

chmod -R 755 /Volumes/~LeopardPartitionName/System/Library/Extensions/Kextname.kext
chown -R root:wheel /Volumes/~LeopardPartitionName/System/Library/Extensions/Kextname.kext


*Do the same for every kext you installed.

Remove cache and rebuild:

rm -rf /Volumes/~LeopardPartitionName/System/Library/Extensions.mkext
kextcache -k /Volumes/~LeopardPartitionName/System/Library/Extensions


Reboot.

lanceomni
01-08-2009, 11:45 PM
If your in Single User Mode by booting with -s you can mount your USB thumb drive like this.

Boot into Single User Mode without the USB thumb drive plugged in.

1. Allow for the modification of files by typing:
/sbin/mount -uw /2. Make a directory in Volumes to mount to. We will call it "usbstick" by typing:
mkdir /Volumes/usbstick3. Before we plug it in we need to make reference to what other drives we see in /dev by typing (You might want to write them down):
ls /dev/disk*4. Now plug in the usb thumb drive, wait a second then look for a new addition by typing:
ls /dev/disk*5. Now lets mount it. Lets say you there are two new additions disk4 & disk4s1. Type the following (replace msdos with hfs depending on how the usb thumb drive is formatted. If you use it on a PC too then its msdos):
mount -t msdos /dev/disk4s1 /Volumes/usbstickThen you can access your usb thumb drive at /Volumes/usbstick

If you are getting a basic understanding of the commands that Milanca posted then you should be able to supliment them with your USB thumb drive's location.

dj-dc
01-09-2009, 03:41 PM
Hey thanks alot for your help guys , these info's really help me out, i was having a hard time finding some console commands for terminal with google.

Do any of you know a site where you can learn more of these commands ?
i've come across some pages on google with lots of commands but with the little knowledge of terminal i have it's hard to use then without knowing what they mean

lanceomni
01-09-2009, 05:05 PM
http://www.ss64.com/osx/
http://www.westwind.com/reference/OS-X/commandline/

These two are pretty useful.

osxdaily.com also had a few articles that were useful