buildworld and installworld shell script

You need to run (there are other ways but this is probably the easiest) vipw(8) after restoring /etc/master.passwd. Don't change anything in the editor, just exit. This re-creates the binary database file /etc/master.passwd.db and the plain text /etc/passwd file. You don't have to do anything with /etc/group after restoring it from backup, it is used directly in its plain text form.

To make sure your mail aliases are up to date run newaliases(1) after restoring /etc/mail/aliases.
 
You could be right. You can make a trivial change and save it and revert the change after the database is restored by running vipw(8) again.

Ok, the simplified way to restore the accounts is this:

(I thought the vipw(8) tool would recreate the database unconditionally but that's not the case necessarily)


cp /var/backups/master.passwd.bak /etc/master.passwd
cp /var/backups/group.bak /etc/group
pwd_mkdb /etc/master.passwd

You have to restore the user accounts to have any hope of getting your web service or your database services back. They usually run under special unprivileged users and your system is now missing those users.
 
ShelLuser said:
fred974 said:
Originally it was set as public/private keyr. When i type the password it is not recognised..


My guess is that you used some wrong options with mergemaster. It will also go over files such as /etc/passwd and /etc/group to update the version "tag" (the first line). If you told it to replace those files, and at the end allowed it to run pwd_mkdb then you effectively reset your environment to the default account settings.

Depending on your settings and used options you might be able to recover from this through local backups (check /var/backups) but you may want to keep your regular backups safe as well "just in case".
This is exactly what I did I did allowed it to run pwd_mkdb.

Now.. have I lost everything or is there hope to save at least the jails
jail 1 = web server
jail 2 - database

I can get the files back from jail 1 with no bother.. but to how can I get the bata back from the DB is the jail won't start?
 
Hi guys,

Could you please tell me what the mergemaster.mtree.70xnpZ81 file located in /tmp after runing mergemaster -Ui is for?
Is that the list of all the files that was changed?
 
Thank you all for your help here...
I managed to get everything back up and running by restoring various files in /etc.
The reason why the jail stopped working in something to do with the make kernel.
I have restored my kernel.old file and the jails are now working.

Can I leave it as that or do I need to sort out the kernel issue?
 
You need to keep your world and kernel in sync with each other. So I'd advise to sort it out. Keep the same source tree and do a make buildkernel and if that doesn't produce errors a make installkernel. Reboot to load the new kernel. Nothing else would be needed.
 
SirDice said:
You need to keep your world and kernel in sync with each other. So I'd advise to sort it out. Keep the same source tree and do a make buildkernel and if that doesn't produce errors a make installkernel. Reboot to load the new kernel. Nothing else would be needed.

Thank you I'll tr that. My only concern is that last time the new kernel stopped my jails from starting up
 
If you had a custom kernel, specifying that config file is required. Otherwise, you end up with just the default GENERIC kernel.
 
wblock@ said:
If you had a custom kernel, specifying that config file is required. Otherwise, you end up with just the default GENERIC kernel.

I don't have a customer kernel.
Btw, all my users are also back :)
 
SirDice said:
You need to keep your world and kernel in sync with each other. So I'd advise to sort it out. Keep the same source tree and do a make buildkernel and if that doesn't produce errors a make installkernel. Reboot to load the new kernel. Nothing else would be needed.

Hi did make buildkernel and no error was displaued, so I did make installkernel. Reboot to load kernel.


I am now back to the original problem.. The jails are not sarting.
I have no customer kernel.

Any Idea why this is happening?
 
Even without a custom kernel, there are differences between various versions of GENERIC. Compare the one from whatever release you had to the current one in 10-STABLE.

Or it could just be an incomplete upgrade of the jails. Without seeing the errors shown by the jails, it's really hard to say what problems they are having.
 
wblock@ said:
Even without a custom kernel, there are differences between various versions of GENERIC. Compare the one from whatever release you had to the current one in 10-STABLE.

Or it could just be an incomplete upgrade of the jails. Without seeing the errors shown by the jails, it's really hard to say what problems they are having.

Looked at the GENERIC file from my /usr/src/sys/amd64/conf/GENERIC and /usr/src.old/sys/amd64/conf/GENERIC and they are an exact match. no difference between the files.

Is it possible to port the jails to another server? What files are to be copied over.

That's the curent solution that I have.
Transfer the jails on a new FreeBSD host

will that work?
 
What if I want to add all process to the cron()? Is there silent way to upgrade jail?

After these steps:
Code:
# make buildworld       
# make installworld DESTDIR=/jails/somejail

It comes time to:
Code:
# mergemaster -Ui -D /jails/somejail
How to automate this process as asking so many questions during this operation (mean mergemaster) ? I want all my config files to stay untouched.

Greetz,
 
Back
Top