Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm playing with Ubuntu 11.10 launched in a chroot environment under Android 3.2.1. Most of the software works fine except PostgreSQL. When installed or initdb launched it's saying:

FATAL: could not create shared memory segment: Function not implemented.
DETAIL: Failed Failed system call was shmget(key=1, size=1908736, 03600).

Is there any specific tuning of shared memory/PostgreSQL in a chroot? Perhaps some kind of mount the android ashmem to chrooted shm? I'm a novice in Linux.

share|improve this question

1 Answer 1

ashmem uses the /dev/ashmem device node. You need to create it in the chroot's /dev, either by using mknod with the apropriate numbers, or by doing a bind mount:

touch chroot/dev/ashmem
mount --bind /dev/ashmem chroot/dev/ashmem

(You might need Busybox or Ubuntu's mount for this.)

share|improve this answer
    
Thanks. Mount failed with error "Not a directory". Have tried ln /dev/ashmem $chroot/dev/ashmem - failed cross-device link. Tried mknod, but still same error. Have also experimented with creating $chroot/dev/shm device with no success. –  Stan Oct 25 '11 at 16:55
    
@Stan: 1) apparently the Linux version used by Android does not yet support file bindmounts; 2) obvious; 3) impossible, as mknod does not create links -- but a different error message might occur; 4) ashmem, not shm. –  grawity Oct 25 '11 at 19:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.