Jump to content

How to figure out which Kernel is installed?


13 posts in this topic

Recommended Posts


is there a possibility to find out which kernel is installed?

i´m not sure whether i installed the sleepkernel (by mistake) or speedstep kernel (which i want to run if not installed).

could i postinstall the speedstep kernel if missing?


thanks for your help!

Link to comment
Share on other sites

Haven't fiddled around with kernels but I would think that a 'uname -a' in a terminal could provide you with some relevant kernel info. Now, if you have another kernel that you would like to try, I would also think that replacing the existing in / would be enough. In this case, all that is to be done would be to rename your new kernel mach_kernel (mv or cp testkernel mach_kernel but be sure to back up your old kernel). Maybe you would have to delete /System/Library/Extensions.mkext but again, I don't know for sure.

Link to comment
Share on other sites

open the Terminal in your Applications>Utilities folder. Type "uname -a" without the quotes.


This won't tell you much but the version unless the person who made the kernel added identification.

Link to comment
Share on other sites

sorry, I am an old time linux / unix user and I tend to forget that not all ppl interested in OS-X have the same background ...


So, if you browse your Application directory (with the PathFinder or whatever they call it), there's a subdir called Utilities.

In there, youshould have something called 'Terminal'. Just double click on the icon and a terminal window should open.

It will open a 'bash shell' in the unix console terminology. BASH is a shell environment, very useful for all sorts of things since it does not depend on any GUI. You can administrate entire complex systems from a single shell :)


Anyway, in the shell, just type the unix like command I mentioned earlier (uname -a) and examine the screen output .

Then, if you have a test kernel somewhere, you can access it and move it around from the shell.

So let's say you have a file called testkernel in your Desktop screen. The unix path it corresponds to is


/Users/yourself/Desktop/testkernel (replace 'yourself' by your login name)


In the shell, you do this :


cd /

sudo mv mach_kernel kernel_backup

sudo cp /Users/yourself/Desktop/testkernel mach_kernel

sudo chown root:wheel mach_kernel

sudo chmod +x mach_kernel

sudo rm /System/Library/Extensions.mkext

sudo shutdown -r now


I explain in human language :

* go to root directory

* move your existing current kernel to another file (you actually change the filename to kernel_backup). sudo is used because you need to do this as the administrator user. If you are the 1st user created during the installation, you are by default the admin. You need to type your password the 1st time, then you don't need it during the current session.

* copy your testkernel that sits in your Desktop area to the root directory

* change the user ownership of the copy (it needs to belong to the root superuser, under the group wheel)

* add the executable bit so that it becomes executable

* remove the cached kext file so that it is recreated during the next boot (kext means 'kernel extension' by the way)

* trigger a reboot now (the -r option means reboot. If you just want to power off, use -h which stands for 'halt')


Good luck :)


PS: by the way, it is a bit risky to change the current kernel while the OS is booted and running. But if the stuff is loaded in RAM, I don't think it should pose any problem.

Link to comment
Share on other sites

you're all welcome. I don't garanty the outcome though ... but this is what I would do if I had an extra kernel lying around. Be aware that I could miss some more configuration and you need to be a bit paranoied when fiddling around with kernels. In the linux world, there is a very strict versioning scheme so it wouldn't be possible to do this like that, unless you trick your kernel environment.Regarding a list of command lines and what they mean, I suggest you get one of those very neat "unix in a nutshell" books. If you are obstinate and want to know and work more with shells in the future, this will greatly increase your understanding of your computer :) and you will be able to find your way around other unix based distro. But there are occasional variations between unix flavors and IIRC, OS-X derives from BSD (OS-X is roughly = BSD + Aqua). So if you study BSD, that's a go :) Know as well that there are different shell families : sh / bash but also csh / tcsh, or ksh, zsh, etc ... they have their own shell script syntax (the sh/bash family differs from csh, etc). But anyway, I can only recommend you get fluent with a shell (bash is the default one in OS-X).


Actually, I do insist that changing the kernel of a running OS is very risky.What I would do is what I said above but from another OS from which I would have mounted the filesystem containing OS-X (e.g. boot the DVD in single user mode and mount the filesystem you want to modify in /Volumes since this is the OS-X equivalent of the unix /mnt where you can mount whatever temporarily. Then instead of doing things in / you would do things in /Volumes/name-of-your-mounted-fs). OK, maybe it sounds a bit chinese if you are not familiar with this kind of process, just be sure you take a risk by applying my recipe as is.

Link to comment
Share on other sites

thanks for the PM :)


i´m using macdrive right now which gives me read/write permissions on my osx partition.

perhaps could i do these changes within windows and undo the changes if osx does not boot?

Link to comment
Share on other sites

yes, that's an option. Or you can do that from a USB key that is bootable. I have a minimal linux-debian system on a 1G USB key, very useful to carry around for debugging other systems, especially when they don't boot. Or maybe your OS-X sits on a partition of a bigger HD which contains another OS ? My HD is triple boot and I can access the HFS+ partition from linux with read-write access. It is more convenient than windows I think because OS-X's root user and group IDs are the same as in linux.

Link to comment
Share on other sites

thanks for your very detailed answer! :)

i´ll give this a try and report back in later.

btw, is there a list somewhere including prompts and explainatations?

My favorite is the alphabetical index at the HMUG. The style of the "help" for command line tools and utilities is the Unix "man" style, where "man" stands for "manual". It's very dry and terse. It's also very complete. No links or fancy graphics, no GUI at all. Many commands have dozens of options so it might help you to have paper and pencil standing by so you can jot down little notes to yourself. I still do this and I've been using Linux for over a decade. It's just the way it is.

Link to comment
Share on other sites

yeah, 'man' ... or 'info', which sometimes provides a menu (console mode, nothing fancy) and more description :)

google is your friend in this as well, just try e.g. 'man mount' in the google research field. Of course, you may end up with a manual valid in unix but not in os-x :P

exemple : 'ls -G' in OS-X and 'ls --color=tty' in linux (there are other ways as well) ... or 'ps xa' in linux and 'ps -ae' in solaris ... pffff, can't they all agree ?? :)

Link to comment
Share on other sites


  • Create New...