pgsql-bugs(at)postgresql(dot)org writes:
> Creating template1 database in /usr/local/pgsql/data/base/1
> Bad system call (core dumped)
> initdb failed.
FAQ item 3.2 says:
3.2) When I start the postmaster, I get a Bad System Call or core dumped
message. Why?
It could be a variety of problems, but first check to see that you
have System V extensions installed in your kernel. PostgreSQL requires
kernel support for shared memory and semaphores.
If that's not it, you could probe further by building with debug support
and then using a debugger to see where the initdb run dumps core.
regards, tom lane