# One kernel with different world



## sniper007 (Feb 9, 2010)

Hi!

Suppose we have this sittuation: 

Fresh installed freebsd 6. Then update source tree to freebsd 7 and only build new kernel ?

what would happen ? sytem failure ?


----------



## SirDice (Feb 9, 2010)

Don't.. It won't work. 

Both the base OS (userland utilities) and the kernel need to be in sync. You will get all sorts of problems if you don't. Especially when you have different major versions.


----------



## brainiac (Feb 9, 2010)

Hope that i can join to this thread and add my question, it's kinda related.

If i'm on stable tree and then building world, so i dont have to create new world every time i'm compiling new kernel, but i've to create new world if i, let say, changing tree for current on release one. Is that corect?


----------



## SirDice (Feb 9, 2010)

Switching back (X-stable to X-release) is never a good idea, it can be done of course but it could get messy. You could also get away with having a release world but a stable kernel. This does depend on the things that have changed. Sometimes certain key data structures change, when that happens you really must make sure kernel and world are in sync. Trick is to keep an eye on /usr/src/UPDATING. If such changes occur it will be noted. 

All I can say is to prevent yourself a lot of headaches and loss of hair (if you still have it that is) just keep your kernel and world in sync. And by in sync I mean the same version of your source tree.

When both are in sync and you're only changing your kernel (adding/removing devices or options) you don't have to (re)install world.

For multiple machines I simply NFS export /usr/src/ and /usr/obj/ (both can be read-only). Mount both when needed on the machine I'm working on and do the [cmd=]make install(world|kernel)[/cmd] there.


----------

