In case of four wrong MACOs drivers, skip the simple steps to reinstall

Source: Internet
Author: User
Currently, MAC systems are easy to install. AMD is only a matter of time. The so-called apple is hard to crack and hard to drive. Without a perfect drive system, there is a famous car, but there is no fuel. Due to the use of the cracked version, it is easy to install the driver in four countries (four languages prompt to restart), unable to start the system. In this case, do not choose to re-install the hard disk. In the early days, I made such a mistake, and I do not know how much damage I suffered.
If the four-nation interface is displayed, that is, the driver is not correctly installed, delete the wrong driver.
Start countdown, press any key, and press-s to enter the command mode.
First, be sure to master the following tips: Use the tab key to automatically complete the command. For example, if you enter CD/sy in the/system directory and press the tab key, the command will be automatically merged into CD/system with Case sensitivity. The MAC system is very strict in Case sensitivity.
Let's get started. Take the NVIDIA graphics card driver as an example (the most difficult to install the graphics card driver) 2d7d3d6e
Mount-UW/Rm-RF/system/library/extensions/nvinject. kextchown-r root: wheel/system/library/extensionschmod-r 755/system/library/extensionsrm-RF/system/library/extensions. mkextrm-RF/system/library/extensions/caches/Rm-RF/system/library/caches/
At this point, we only delete the nvinject. kext file, while many NVIDIA graphics cards need to add IDs to geforce. kext, nvdanvx0hal. kext, and nvdaresman. kext. Therefore, it is best to create a backup habit before modifying the driver file. Assume that the source files of geforce. kext, nvdanvx0hal. kext, and nvdaresman. kext are backed up in the old folder on the desktop. Copy the source files to the extensions folder and fix the permissions as follows.
CP-RF/users/your user name/desktop/old // system/library/extensions (the/behind the old is very important, otherwise the folder will be copied together) chown-r root: wheel/system/library/extensionschmod-r 755/system/library/extensionsrm-RF/system/library/extensions. mkext
Restart-F to reload the startup content. The four countries have disappeared.
The drive may take a long journey. It may take four or more times a day, so we have to input the same command n times repeatedly, Which is boring. Here we will introduce a method to script the commands for deleting the error driver file and restoring the source file. After the wrong driver is installed, you only need to enter the command mode in-S, Sudo-S, find the corresponding script file, and press enter to run the script. It is convenient and quick. Assume that the script file is stored on the desktop as follows:
/Users/your username/desktop/Script Name (with a suffix) Press enter (the tab key can be used soon) sh/clean to execute the cleanup script, operation complete-E * u7 S4 c) u'o) N $ O7 C3 A5 X * Q4 I) ^ share my Delete nvinject and restore geforce again. kext, nvdanvx0hal. kext, nvdaresman. kext script. Note: You can use the text editing tool to edit the script. Modify the script according to the location where your source file is stored.
Attachment: script download


OSX command line knowledge (from the network) OSX file system! A'j, y9 P3 X6 F8 aosx is a UNIX file system. All files are stored in the directory/. Therefore, the drive letter concept in windows is not required .! R, H "i8 N" W; u7 M (R; e the hard disks you see on the desktop are all mounted under/volumes. J. D! H "E! For example, if z * H is connected to a mobile hard disk called usb hd, a hard disk icon is displayed on the desktop. Where is it actually ?, M: R! V: B: n8 X! G and k run ls/volumes/usb hd on the terminal to check whether the content of the mobile hard disk is displayed. % V4 G + T! N R5 O; ^
/W + G! '+ D4 W7 c @ root directory location is/Core mach_kernel here, * x $ X) W & V! E! M + D! _ Driver location/Development me/library/extensions $ B, [: O7 S4 i7 N "R" V; e) A: H user folder location/user name % d: Z 'c8 ^ # \ ([3 [desktop location/user name/desktop + j9 _ * E3 y0 N + N6 Q (S (G "d % W3 W. ~ & F: A2] the file wildcard is * 2 K1 I2 @ o, L4 x
$ U! E $ W +] 3 {8 O3 S1 S + {Note: In the unixsystem, A. txt is not equal to a.txt. 6} (t) Z! N3 J4 A2 a root directory flag/is not dispensable, CD/system indicates to go to the system under the same directory, the CD system indicates to transfer 2 K + k to the system in the current directory! {0 I + F7 Z -?
2 C-Z4 N3 S-C6 O) W2 J-r ----------------------------------------------- M # H (u8 _ 9 F0 F6 [5 K % z7) UU # W4 _ How to enter the command line operation mode 5 I 'w' B "z7 R (V $ w/\ and then use the Finder to open the application Program Utility terminal; | "} 6 O; _ 2 v. f if the graphic interface cannot be connected (for example, the display driver is incorrect), press F8 at startup and start it with the-S parameter, then enter the command Mount-UW/* P' O (F # I (E, I * V! L $ E6 K1 o _; P + F2 s 'd/^. v-I3 J) B "N * l get permission/H5 Q % C (\ % X3 M (\ 4 'to prevent misoperation from damaging the system, if the user does not have the permission to access important files of the operating system, therefore, you must first obtain the root permission "I & G + Y3 B2 W2] Sudo-S4 p'f9 R5 Q4 I & _ and then enter the password. No echo is displayed when you enter the password, there are no stars, just press Enter. % K; A # H +? 4 R2 U $ Q * g % v) E & Y1 y) e W8 U ----------------------------------------------. B/G8 Z + Q '? /K
6x0 K5 w6 W, N basic command "W4 q0 W0 w-^ * o-D & T # X: V list files: T + g'z ('/T0 records parameter directory name 1 I % ^ 0 o: K-F' B4 X, B example: to see what is in the directory, M % d, L3 O5 B! Ils/(V1 l % C "Z % I1 f, x-P" [want to see what is in the driver directory, L + Z. i/d6 Q3 A (S5 F, | ls/system/library/extensions/W; f (z) B3 S7 P "X2 Z; the X + F3 _ parameter-W displays Chinese characters and-l details.-A includes hidden files. I "R"} 7 N6 x * s conversion directory) Z. V + D & W, _ % K *? CD: R/W4 f (z 'a2 R' F example: Think of a drive directory slide up to a lap: Z! U # x0 B2 o, K2 ~ 3] 7 P4 H/F + ycd/system/library/extensions/N & E9 P, F3 _! {
(J $ N/P0 W9 H0 N, B (Q creates a new directory 4 @. F4 U-Z % C ({! Mmkdir Directory Name & C-R' | 7] + N-y example: create a backup directory backup3 C % x. [) a'} 4 K-\ under the driver directory -\! R/V * H mkdir/system/library/extensions/backup & E5 W8 O; A * n8 o8 y creates a backup directory backup on the desktop; | 8 m; W: o5 I2 A1 ~ Mkdir/user name/desktop/backup 'i2 N7 @ % L: W + I5 Q, J2 '7 a % E % @. m) E: Z; r copy file 8 J & _ Z' y # n gcp parameter source file target file: Z4 m'r2 _ + O # L $ y, F example: the natit of the desktop. copy kext to the driver directory 7 I "W4 S4 S, C, A, F CP-r/user name/desktop/natit. kext/system/library/extensions8 J. R & ^ "] 3 M $ Q &? The R parameter indicates recursive operation on the directory. kext looks like a file on the GUI, but actually a folder .! W7 @/~ "Y $ }% {! E. Back up all the files in the driver directory to the desktop backup! M) \]. @ B8} 3 q cp-r/system/library/extensions/*/user name/desktop/backup: J, A-U9 H. j6 a-p $ P9 C1 g
% T4 }! X5 P5 y (H. Y3 @ 9 Y1 v delete a file: L & P #~ 9 \ & h t # N0 ^) NRM parameter file. U (G5 D7 F, r example: to delete the driver cache | 1 ["H "~ X; q, K3 n) o rM-RF/system/library/extensions. kextcache! | 9 ~. L4 X! L & zrm-RF/system/library/extensions. mkext8 C (f @ % H & C2 a parameter-RF indicates recursion and force. Be careful when using this parameter, if you run Rm-RF/your system, $ Q4} 7 C "O: J (\; C! H "T4 G0 _'m * j''-Z2 F $ q0 h move file 7 G7] 4 N-C' H3 W1 FMV file 8 R2 B8 C; L & B: @ 9 Z: I want to apphda. kext moves to desktop 8 C5 S: o % H * I * B mV/system/library/extensions/applehda. kext/user name/shorttop6 I/N (U6X(P1 o wants to apphda. move kext to the backup directory; _-\; j 'U' X. R "\ 8 C % s I & V mV/system/library/extensions/applehda. kext/system/library/extensions/backup + C "\ 'a @! I4 H
* \ "K-Z8 E:. t4 F5 C change file permissions 5 D; Q7 P' J + x) @ chmod parameter permission file 6 F,], O (V1 \; V, u (V: Z example: set all files in the driver directory to root read/write, and other users are read-only. h # Z1 R4 u * I1 P2 E5 l chmod-r 755/system/library/extensions "P: L-e; L -~ /K; L2 F-Z2 e parameter r indicates recursion, and 755 indicates permissions of each user! P2 | # J; q $ B % u $ Z/D! V/H9 Z (w D-o change file owner, V % @) G1 K9 I B "r'o" [% qchown parameter User: group file 7 T # K2 _ 'w5 V; m example: Change the owner of all files in the driver directory to the root user 7 c (R6 F! O $ K hchown-r root: wheel/system/library/extensions ;~) M $ T & B8 S6 c )? The R parameter indicates recursive A9 l0 U, U6} 5 P & P! V (T & Z/F7 K5] 0x1 y; W: {permission to repair files in the entire system & G # G: K! C) T * vdiskutil repairpermissions/* [2 U # x9 F # k'n' strictly speaking, this is not a Unix Command, but an OSX software, remember to run the modified or added driver once. 0 y, V ~ "I. ^ 9 B! O
"G % Y/V7 z6 w-D3 H! N % d text edit * s "] $ Z. h # h $ R-S2 f w "tnano file name $ u] 7 R (U1 D4 M/X & R % J example: Edit natit info. plist, _ 8 S9 @,? "T9 F/B5 ^ nano/system/library/extensions/natit. kext/info. plist $ Z "U, K6 E-V + P after editing, use Ctrl + O to save the disk, CTRL + X to exit: Y: D7 w'd6 N; W. r9 f Another text editing software is VI, which has some odd operations and is very easy to use. It is also used in all UNIX-like systems. * R + A' _ (C8 C & S5 l0 s;} (t2] #? "K B5 {) x * t run the script command 4 P %] (l0 P0 V (RSH script file name: W! S $ C "V # Y )~ "K. After the driver is modified, all required operations are saved as a script. After the driver is modified, you only need to run the script once, l % t "l8 Q" z/| % {1. run nano/clean-V8 in the terminal? "D6 D6 x2. Code Paste it to nano 9 a. f #~, L # H + {& U9 f * 'rm-RF/system/library/extensions. kextcache; R8 D #? 5 O7 X "B7? Rm-RF/system/library/extensions. mkext5 \ % d "M6 Q 'x) X4 @ ^ chown-r root: wheel/system/library/extensions 'b6 'G $ v. c, U3 H5 nchmod-r 755/system/library/extensions; Q1 N1 y # R! T & x $ M diskutil repairpermissions/9 F & D8 B4 H "Y: l! C. lkextcache-k/system/library/extensions/1] # F % h a (B-A3 w3. Ctrl + O save disk, CTRL + x exit!} $ A0 H "I; '" Z; u4. after the driver is activated, run sh/clean2 F/W7 Z & T once on the terminal! Z2 B) B, O1 J E (]/U2 K9 t ------------------------------------ * E6 H, V (Q-x Tips 1 E2 L # R: I0 |. p'h4 K0 _ % O/f use the tab key to automatically complete the command 8 GB (U % Q ${4 *~ For example, enter CD/sy in the/system directory and press the tab key. The command is automatically merged into CD/system % R3 q + x2 G) e5]/S/d; Y u, J * I operation files and directories with spaces in names, Y-c "Q: E! A7 _ 9 p "f' _ $ L7 t space is written as \ space in the command. For example, to enter my documents, command: CD my \ documents0} % Q & @ + A # J % K1 K5 C/A % {/m2 C: A + \ 'B' _ 1 X # '$ A4 B6 m' G: Y view the Detailed Help of the command 3 P + T: I-[, L. \ G $ Eman command name! B) F7 H * ^ # E7 u8 B $ N & Z. For example, you need to check the detailed usage of the LS command and execute man ls, C1 A8 V & Z $ U + X! {/D4 R % C

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.