How to boot with the new world and old kernel?

My problem is silly and my bad I've got in such a situation. I was trying to update my server from 7.2-RELEASE to 8.0-RELEASE. Cvsuped sources (fine), built the world (fine), then tried to build the kernel. My root partition is 512MB. Fresh installed kernel gets half of it (about 250MB). When I tried to build a new kernel it compiled without errors but the free space of the root partition has ended (it was fulled to 102% or so). Since there were no errors I've decided that there are still few MB there and that should be enough to start the system.

After rebooting I've got kernel error (I can't reproduce it now, something about "page fault" or like that). Booting the old kernel was still fine. And here I've made a big-big mistake... I've installed the world :( I don't know why. The world was installed and after rebooting it gave me "login: Could not determine audit condition" error on login attempt. I'm able to boot in single user mode only.

So the situation... I have old 7.2 kernel and new 8.0 world. I've tried to cvsup my system back to 7.2 and rebuilt the world but rebuilding failed (Bad system call: ERROR 140). Is it possible to make the system work now? Should I kill myself? Do I still have a permission to come to any servers closer than 100 yards?
 
You have a 7.2 kernel, an 8.0 world, and 7.2 sources? I think it should be possible to build the 7.2 world and kernel, provided you clear /usr/obj before you start compiling (run # make cleanworld && make cleandir before starting the buildworld step). Make sure (in 7.2 and 8.0) that you turn off debugging in the kernel configs, because that's what's eating up the space in /.

And yes, I'd fire you over this ;)
 
Unfortunately he went back to 7.2 sources and he is now without network connectivity, so he'll have to go to 7.2 first, and then on to 8.0 later. Would have been better if he'd kept the 8.0 sources around, so he would only have needed to clear the / partition and build the kernel ....
 
Yes, 8.0 was installed but it gave errors on start. I'm trying DutchDaemon's suggestion. Hope /usr/obj cleaning would help to rebuild the world for 7.2.

UPD: I have network connection. I've already tried to rebuild the 8.0 kernel but it gave me the same errors on start. So I think it's better to revert back to 7.2 and try upgrading again.
 
You should try figuring what those errors are about (booting with ACPI disabled, etc.). Chances are you'll end up with "bad system call" from one of the binaries used in buildworld process otherwise.
 
Rebuilding the world with cleaning /usr/obj didn't make any difference. Still the same error (it stops on /usr/src/usr.bin/makewhatis with 140 error code). Is it possible to update sources to 8.0, build kernel and try to build the world again? Can it work?

UPD: The situation is the same. The 8.0 error is "Fatal trap 12: page fault while in kernel mode" (safe mode and no ACPI mode doesn't make difference). So I can't rebuild the world to revert it back to 7.2 and can't make 8.0 kernel running with the existing 8.0 world.

UPD: Found some clues about Fatal trap 12 on 8.0-RELEASE... I'll post if anything changed. Don't switch the channel :)))

UPD: I was reading handbook and some threads related to building world process. There is a question. Is it possible to copy bin files and libs from distro 7.2-RELEASE DVD to the system? Will it be equal to rebuilding the world or build world process is much more complicated and copying files would completely ruin the system?
 
At this point, where you have an 8.0 world running on top of a 7.2 kernel, you're best bet is to grab an 8.0 CD and do an upgrade install from there.

You will not be able to build a 7.2 world on the out-of-sync system that you have.

Be sure to backup /etc and /home, if possible. Just in case.
 
Const said:
My root partition is 512MB. Fresh installed kernel gets half of it (about 250MB).
You must have done something seriously wrong. My root filesystem is 496MB and only 94MB is used (and that's with 2 kernels in there).



After rebooting I've got kernel error (I can't reproduce it now, something about "page fault" or like that). Booting the old kernel was still fine. And here I've made a big-big mistake... I've installed the world :( I don't know why. The world was installed and after rebooting it gave me "login: Could not determine audit condition" error on login attempt. I'm able to boot in single user mode only.
I had a similar issue. Was able to fix it in single user mode.

So the situation... I have old 7.2 kernel and new 8.0 world. I've tried to cvsup my system back to 7.2 and rebuilt the world but rebuilding failed (Bad system call: ERROR 140).
Bad idea. You should have stuck to 8.0. You did installworld and installkernel the wrong way around. You should have installed the kernel first, reboot, then install world.

Is it possible to make the system work now?
Not sure if this is fixable but if you can boot to single user mode you can get the 8.0 sources again. Rebuild world and kernel.

Do I still have a permission to come to any servers closer than 100 yards?
As long as they're not mine :e
 
Thanks for your answers, support is very important for me at this very-very hard time :D So I spent all this day running from my computer to my server, recompiling cores (I've tried 8-STABLE, 8.0-RELEASE and the only working but not synchronized with the world 7.2-RELEASE core), rebuilding worlds (all attempts have failed, I guess it's because of world and core mismatch), googling, googling, googling ... coffee ... googling and googling again. Finally I've came to this. There are two ways:

1) Make my server works with 8.0-RELEASE core. I need to fix that Fatal trap 12 issue for that. The most close and maybe the only clue I've got here. But suggested solution
Code:
Put into /boot/loader.conf:
debug.acpi.disabled="ec"
didn't work. Loading in safe mode or in no ACPI mode didn't work either. I think it's not a hardware problem as 7.2 core loads fine (I mean hardware isn't broken, but it still can be kind of hardware conflict between hardware and new core). Tomorrow I'm going to try analyze core dumps, logs and maybe get some clues there. It is Intel Xeon motherboard, if anyone had some troubles with it your experience could be very useful :stud

2) Revert the world back to 7.2. I don't know any ways of doing it except "make *world" commands that seems to be broken and helpless in my case. Googling I've found a post on one of sysadmins forums. Man copied /usr /bin /sbin /lib and some other folders from distro DVD to his system and told it was equal to rebuilding world. That's why I've asked if these 2 ways equal or even close to each other. If this is a completely bullshit then the first way is the only way of restoring the system.

SirDice, the cores were compiled with debug mode (it's turned on by default). That's why they weight that much. Compiling without it gives me the core weighted ~20MB. So it's fine I think :)
 
If you have access to the release cd you could try to mount it and navigate to the install files (most likely the src directory). From there run the install.sh script:
# ./install.sh base bin sbin ubin usbin lib libexec sys tools include
This should install only those parts of the base. Not sure if it contains everything you need to rebuild world though.
 
This command extracts sources to my /usr/src folder. They still need to be compiled with "make *world" if I'm not mistaken... So it doesn't work :(

Another mad idea :) Is it possible to build world on another 7.2 server, get it and install it on my sick server? Though they have different hardware configuration if it matters...

UPD: I've found this in handbook
Secondly, it allows you to use NFS mounts to upgrade multiple machines on your network. If you have three machines, A, B and C that you want to upgrade, run make buildworld and make installworld on A. B and C should then NFS mount /usr/src and /usr/obj from A, and you can then run make installworld to install the results of the build on B and C.
/me crossing the fingers
 
Const said:
Another mad idea :) Is it possible to build world on another 7.2 server, get it and install it on my sick server? Though they have different hardware configuration if it matters...
That's how I update my machines. All you need is /usr/src and /usr/obj NFS exported (can be read-only). You can pre-build different kernels (I have about 4 of them). Once all the build(kernel|world) is done just mount /usr/src and /usr/obj on the destination and run install(kernel|world) there.
 
Installing the world built on another server failed with compile error and at this moment "ls" command stoped to work (it gives error in on of .ko modules, something about "fts_open" function). I'm bit tired for this week and better just reinstall the system. Thank you for your help guys, I've learnt a lot of things for these few days.

Morale: Think before doing anything.
 
You cannot use your current system to fix itself, since it is running a FreeBSD 7.2 kernel with a FreeBSD 8.0 world. Pretty much anything you try to run will fail, due to incompatibilities between the kernel and the world.

You can run new kernels with old worlds, but you cannot run the reverse (which is what you have).

The only way to fix this is to re-install, or to boot using a LiveCD and mount the existing partitions and do an installworld/installkernel in there.

However, since you have tried multiple times to install different worlds, so you probably have a mix of 7.2 and 8.0 installed at the same time, the best bet, the best solution, is to just reinstall.
 
Back
Top