Jump to content

Simple Terminal Commands in case of problems..


spanakorizo
 Share

7 posts in this topic

Recommended Posts

if i search in my .rtf's and bookmarks i will find all my notes but plz help me and everybody to have this thread

as an emergency thread

it would be wise to collect all the basics here in case somebody must go -s mode and repair kexts etc

i know less than the basics but i will begin ,plz continue to post some commands

 

lets start with what i know: (im gonna edit A LOT this post later)

 

SOME BASBASICS ...

sudo -s IS THE 1st THING WE TYPE IN TERMINAL (ROOT MODE SO WE CAN EDIT THINGS)

cp -R IS COPY

rm -rf IS DELETE

cd IS LIKE THE NORMAL CD IN MSDOS (ONE PATH BACK)

diskutil repairpermissions / IS THE NORMAL REPAIRPERMISSIONS YOU CAN DO IN OSX GUI

 

lets start with a normal problem now ..

 

YOU REPLACED A KEXT/FILE INSIDE MACOS AND YOU CANT BOOT

 

before the darwin loader we hit F8 key and write : -s at boot mode

this will get us in OSX in single-user mode but with no gui.ONLY COMMAND LINE (MS-DOS LIKE)

after the single-user mode loads we are in command line

 

Now Type : mount -uw /

lets say that we must delete a file cause this file cause a kernel panic and cant boot

we remember where we paste the file (usually at /extensions)

so we type

rm -rf /System/Library/Extensions/OURFILE.kext

lets say that we want to replace this file with the normal file it was before

we remember where we have the backup and we type:

cp -R /backups/OURFILE.kext /System/Library/Extensions/OURFILE.kext

this will replace the bad file with the one we backuped before so we can boot again

before we reboot it is good to repair permissions.

we type:

rm -rf Extensions.mkext Extensions.kextcache

then we type:

diskutil repairPermissions /

the we type:

reboot

 

WHAT IS THE CORRECT WAY TO OVERWRITE 2,3 KEXTS AND REPAIRPEMISSIONS(INSIDE MACOSX)

 

....what is ? :D

 

 

 

 

 

 

 

 

 

 

 

also tell me what to add about

chown -R root:wheel /System/Library/Extensions/*******.kext

chmod -R 755 /System/Library/Extensions/********.kext

i cant understand why those commands/switches also needed

 

TELL ME WHAT DO I NEED TO EDIT/ADD

PLZ TRY NOT TO DO THIS A UNIX GURU THREAD..WE NEED JUST THE BASICS COLLECTED

 

EDITED :1

Link to comment
Share on other sites

YOU REPLACED A KEXT/FILE INSIDE MACOS AND YOU CANT BOOT

 

before the darwin loader we hit F8 key and write : -s at boot mode

this will get us in OSX in safe single-user mode but with no gui. ONLY COMMAND LINE (MS-DOS LIKE...its unix?)

after the safe single-user mode loads we are in command line

Type : sudo -s (type your password then) (there is no sudo in single-user mode)

Now Type : mount -a mount -uw /

Link to comment
Share on other sites

Personally i wouldn't advice on sudo -s, given the cli knowledge overhere thats pretty dangerous. OSX remembers your pass for sometime anyway.

 

But, commands that i think are handy:

 

dmesg|more -> tells you what happened when you where staring at the white screen with the grey apple

 

tail -f /var/log/system.log -> sorta like console, but real time (ctrl+c to quit)

Link to comment
Share on other sites

Can you tell me what is a correct syntax and switches for "ioreg", and what does it mean. I need it to solve some hardware problems.

Standard usage is:

 

ioreg -l

 

Just type: man ioreg

to get the details of "switches" for the command.

Link to comment
Share on other sites

  • 2 years later...

Hello newbie here with a ?

Updated OSX86 10.5.7 iAtkos v7 install and got the wheel of death. backedup boot kexts on hardisk

tried to acess hardrive from iatkos v7 startup disk but I do not know the proper cd sequence to access the hardrive.

Any assistance in this matter would be greatly appreciated.

thank you

Link to comment
Share on other sites

 Share

×
×
  • Create New...