Interrupted installworld: "Failed to write core file for process login"

Ah, fun times. I ran make buildworld and make buildkernel before going to bed last night, made a backup of my base system (the root partition) this morning, installed the new kernel with make installkernel and then moved ahead with installworld. I followed the instructions in the handbook to the letter; this is actually the third time I've done this, and the prior two went smoothly.

About three seconds into the installworld process, the power went out. After booting back up I keep receiving the quoted message in the thread title, and can't log in. I tried booting into single user mode and finishing the installworld process, but receive this error:
Code:
Required auditdistd user is missing, see /usr/src/UPDATING.
The thing is, this remains true now, even after formatting the root partition and restoring the backup. That would seem to indicate that there's some data left over somewhere that the restore process didn't overwrite, though I'm not sure if that's the case. I have two system paritions: one mounted at / and one mounted at /usr. There's a third partition---the EFI partition---but that's never mounted while the system's running, so I can't imagine it being involved. Any pointers would be most welcome; the machine wasn't vital, so I can reinstall if worse comes to worst, but where's the fun in that? :p I'd rather take on the learning process of recovering the system if possible. Thanks in advance.
 
Boot single user and do a fsck -tufs -y to make sure everything is fixed.

Deleting /usr/obj will remove the code that has been built, then you can start over with buildworld.
 
Thanks, wblock@. I'm away from the machine right now; I've already gotten rid of /usr/obj anticipating the need for another build, but I'll run the fsck when I next get a chance.
 
So I went ahead and ran the fsck, and everything checked out. I then proceeded to:
  1. Boot into single-user mode from the installation image, mount the / and /usr partitions, and check out the source
  2. Reboot into single-user mode from the native system and mount / and /usr as usual
  3. cd into /usr/src
  4. Execute make buildworld && make buildkernel
The result was a series of messages similar to that in the thread title: the system being unable to "write file for process [grep, zcat and others]." The build process then just fails. One interesting thing is that all the error messages are followed by "(Error 14)," like a single process is gumming things up. Search engines haven't given me much to go on, sadly.

It's odd---the partition is mounted read-write, all the file permissions are set correctly... I don't know how to proceed from here. Maybe chroot from the LiveCD? If the files themselves are messed up though, I can't see that working either.
 
The easiest way to recover it would be to install FreeBSD to a new drive, boot from that, then copy data from the existing drive onto the new drive. More advanced would be to back up the old drive, then do a buildworld/kernel on the new drive and install it to the old drive with the DESTDIR variable. Ugly hack level is to copy binaries and libraries from another drive onto the old drive, but it's ugly.
 
On a hunch I booted the system without /usr mounted; turns out the problem was on that filesystem, as without it everything worked fine. The filesystem itself checked out clean, so it seems some files themselves were probably corrupted, and like a sucker I didn't think to back up the full system (both / and /usr) before running the update. Since all vital data was on separate filesystems and thus spared, I just used pkg info > pkglist to get a list of installed packages and reinstalled. I'd figured that installing the base system wouldn't alter anything in /usr, and maybe it didn't---maybe ungraceful mounting was entirely to blame, since I didn't have journaling enabled. In any case, lesson learned: I'm setting up a more comprehensive backup routine before mucking around with buildworld again.

EDIT---Noob question: Is "Solved" the only title prefix available? I mean, I didn't actually find a solution. Is something like "Resolved" available?
 
Back
Top