Small Homeserver - What to do?

that was something that I read on several pages/documents and forums (yes, I do google before asking questions ;-)) and it simply confused me!

sry
 
Ah.. I had to read up that bit, I never use freebsd-update, I always source update :e

But it looks like you skipped reading an important bit:
If a custom kernel is in use, the upgrade process is slightly more involved. A copy of the GENERIC kernel is needed, and it should be placed in /boot/GENERIC. If the GENERIC kernel is not already present in the system, it may be obtained using one of the following methods:

  • If a custom kernel has only been built once, the kernel in /boot/kernel.old is actually the GENERIC one. Simply rename this directory to /boot/GENERIC.
  • Assuming physical access to the machine is possible, a copy of the GENERIC kernel can be installed from the CD-ROM media. Insert your installation disc and use the following commands:

    # mount /cdrom
    # cd /cdrom/X.Y-RELEASE/kernels
    # ./install.sh GENERIC

    Replace X.Y-RELEASE with the actual version of the release you are using. The GENERIC kernel will be installed in /boot/GENERIC by default.
  • Failing all the above, the GENERIC kernel may be rebuilt and installed from the sources:

    # cd /usr/src
    # env DESTDIR=/boot/GENERIC make kernel
    # mv /boot/GENERIC/boot/kernel/* /boot/GENERIC
    # rm -rf /boot/GENERIC/boot
For this kernel to be picked up as GENERIC by freebsd-update, the GENERIC configuration file must not have been modified in any way. It is also suggested that it is built without any other special options (preferably with an empty /etc/make.conf).
 
SirDice said:
Ah.. I had to read up that bit, I never use freebsd-update, I always source update :e

But it looks like you skipped reading an important bit:

there it is again
simply rename it to /boot/GENERIC
.

;-)

and: as of now I did not build my own kernel. I did not configure anything kernelwise, I just installed the system.

And ran freebsd-update, which is supposed to do a binary update, so I really thought there should be /boot/GENERIC
 
also, I think I did not install the sources?! Because /usr/src is in fact empty on my system.
 
twilight said:
there it is again .

;-)

and: as of now I did not build my own kernel. I did not configure anything kernelwise, I just installed the system.

And ran freebsd-update, which is supposed to do a binary update, so I really thought there should be /boot/GENERIC

SirDice quoted information from the Handbook just says that to better identify your old kernel and associated modules you should the kernel.old directory to GENERIC.

The generic kernel configuration file is /usr/src/sys/i386/conf/GENERIC and should not be edited but copied instead.
 
twilight said:
also, I think I did not install the sources?! Because /usr/src is in fact empty on my system.

Upon installation there was a question regarding which distribution to install. You probably didn't install the one that mentioned kernel/system source code.

You can install it from CD or use csup(1).
 
twilight said:

That is odd
Code:
> ls
GENERIC		boot2		gptboot		loader.conf	pxeboot
beastie.4th	cdboot		gptzfsboot	loader.help	screen.4th
boot		defaults	kernel		loader.rc support.4th
boot0		device.hints	kernel.old	mbr		zfs
boot0sio	firmware	loader		modules		zfsboot
boot1		frames.4th	loader.4th	pmbr
> pwd
/boot
>
I do have a directory called that and my kernel is installed there.

As for the p1 in the release I believe it just stands for patchset 1.
 
Hello and a happy 3rd advent :)

As of Friday evening I have everything up and running:
- All patches are applied
- sshd is compiled, installed and running
- mySQL is compiled, installed and running
- Apache22 is compiled, installed and running
- PHP is compiled, installed and running
- Mediawiki is compiled, installed and running.

During my trial to get everything working I had the experience, that, say, sshd would not start at bootup.

I thought that might have been because I added apache to the rc.conf, but replaced the apache1.3 port (which mediawiki installs by default) with the apache22-version, but did not change the value in rc.conf from enable_apache to enable_apache22.

At friday evening I had every service recompiled and configured and everything worked as it should. So I told my users to start registering in the wiki and using it :)

On Saturday morning everything worked fine and I took of to visit my family. On Saturday Noon I showed the wiki to my cousin and it worked fine.

When I tried to show the wiki to my father on Saturday Evening, nothing worked. I'd just get timeouts on both ports/pages, http:80 and https:443.

sshd stopped working, too.

Now, seeing that had problem that some services would not get started at bootup (although set correctly in the rc.conf) but the system otherwise works fine, and after a reboot every service gets started correctly, I am beginning to wonder if maybe the services just died and did not reload.

As I am using rc.conf, what happens when a service dies? Is it just dead or does some daemon watch over it and restart it? As I see it, that is, what inetd is for, right? And why do daemons die after all?

As I don't have any access to the server, I just can speculate, but maybe somebody could tell me, which logfiles to look at to maybe get an answer? I will get my hands on the server tonight as I am going back "home".
 
twilight said:
As I am using rc.conf, what happens when a service dies?

Services are not normally supposed to die off.

twilight said:
As I see it, that is, what inetd is for, right?

Not really. inetd is conceived as a 'super-server' for a larger number of small services like ftp, telnet, daytime, chargen, etc, which historically used to run on most *nix machines. This way only one process has to listen on a number of ports and start the server processes on demand, instead of having lots of processes sitting idle, waiting for connections.

inetd is absolutely not meant to drive high-volume services like http, and will likewise deliver poor performance, when used for such services.

twilight said:
As I don't have any access to the server, I just can speculate, but maybe somebody could tell me, which logfiles to look at to maybe get an answer? I will get my hands on the server tonight as I am going back "home".

/var/log/messages would be a good start to look at. And of course the specific logfiles of the services that have died.
 
thanks man, from MacOS and Linux I thought of something like /var/log/system.log or so. But messages was my first point to look at.

Since I had the same sympthoms before (i.e. sshd did not come up e.g.) I thought it died. But it did not.

Something happend, because when I came back the server was power-less. Somebody turned off the power switch OR we had a power outage. Anyhow, when it booted up, I looked into /var/log/messages, and it really seems like just somebody switched off the power or so. When pressing the power button, it shuts down properly, but the log did not say anything about a shutdown, instead saying today around the time I turned it back on: unclean unmounted volumes.

So... not FreeBSDs (or my configs) fault here ;-)

Gotta talk to all the people that could have done this ;-)

Thanks guys, you are awesome and with your help and the handbook and my knowledge from Gentoo and MacOS it seems I am finally a happy FreeBSD-User ;-)
 
chalbersma said:
Q2) Jails are nice but I would suggest not using them. Not because the security isn't there but just because the jails seem like it would be too much of a hassle to warrants the added security. Esp if you're just running a web server / print server. I gen use jails to test out software that doesn't yet have a port like monkey web server. It has a port but the latest and greatest is still in devel so when I wanted to test that out I used a jail.

Our opinions vary, but IMHO running a web server is a good reason to use jail.
 
Back
Top