安装了oracle11g的ubuntu升级到12.04启动是报错误ORA-00845: MEMORY_TARGET not supported on this system。 
原因12.04中将/dev/shm目录改成了/run/shm,虽然已经有符号链接但是仍然报错。 
解决: 
1、编辑oracle-shm 
sundoctor@sundoctor-ThinkPad-W510:~$ sudo gedit /etc/init.d/oracle-shm 

#! /bin/sh 
# /etc/init.d/oracle-shm 


case $1 in 
start) 
echo "Starting script /etc/init.d/oracle-shm" 
# Run only once at system startup 
if [ -e /dev/shm/.oracle-shm ]; then 
echo "/dev/shm is already mounted, nothing to do" 
else 
rm -f /dev/shm 
mkdir /dev/shm 
#mount -B /run/shm /dev/shm 
mount --move /run/shm /dev/shm 
mount -B /dev/shm /run/shm 
touch /dev/shm/.oracle-shm 
fi 
;; 
stop) 
echo "Stopping script /etc/init.d/oracle-shm" 
echo "Nothing to do" 
;; 
*) 
echo "Usage:/etc/init.d/oracle-shm {start|stop}" 
exit 1 
;;  
esac 

### BEGIN INIT INFO 
# Provides:         oracle-shm 
# Required-Start:   $remote_fs $syslog 
# Required-Stop:    $remote_fs $syslog 
# Default-Start:    2 3 4 5 
# Default-Stop:     0 1 6 
# Short-Description:Bind /run/shm to /dev/shm at system startup. 
# Description:      Fix to allow Oracle 11g use AMM. 
### END INIT INFO 
2、安装oracle-shm 

sundoctor@sundoctor-ThinkPad-W510:~$sudo chmod 755 /etc/init.d/oracle-shm 
sundoctor@sundoctor-ThinkPad-W510:~$sudo update-rc.d oracle-shm defaults 01 99 

3、重启系统 
sundoctor@sundoctor-ThinkPad-W510:~$sudo shutdown -r now 

4、验证修改成功 
sundoctor@sundoctor-ThinkPad-W510:~$sudo cat /etc/mtab |grep shm 
none /dev/shm tmpfs rw,nosuid,nodev 0 0 
/dev/shm /run/shm none rw,bind 0 0 

5、启动数据库 

sundoctor@sundoctor-ThinkPad-W510:~$su – oracle 
sundoctor@sundoctor-ThinkPad-W510:~$dbstart 

成功!!!
01-16 05:07