Gentoo Xen DomU Problems with /proc

Posted by Tres Mon, 15 Oct 2007 13:40:00 GMT

Setting up a Gentoo Xen DomU is pretty straight-forward. The only gotcha that you may run into is when Gentoo tries to mount /proc and dies with a message that includes:

The "mount" command failed with error: proc already mounted

Fixing this is just a matter of commenting out the section of /sbin/rc that attempts to mount /proc begining at around line 217 like this:

#       check_statedir /proc
#
#       ebegin "Mounting proc at /proc"
#       if [[ ${RC_USE_FSTAB} = "yes" ]] ; then
#               mntcmd=$(get_mount_fstab /proc)
#       else
#               unset mntcmd
#       fi
#       try mount -n ${mntcmd:--t proc proc /proc -o noexec,nosuid,nodev}
#       eend $?

You’ll also need to comment the section attempting to mount /sys as well, or the next time you boot, you’ll get the same error with a different mount point failing.

#       if [ "$(get_KV)" -ge "$(KV_to_int '2.6.0')" ] ; then
#               if [[ -d /sys ]] ; then
#                       ebegin "Mounting sysfs at /sys"
#                       if [[ ${RC_USE_FSTAB} = "yes" ]] ; then
#                               mntcmd=$(get_mount_fstab /sys)
#                       else
#                               unset mntcmd
#                       fi
#                       try mount -n ${mntcmd:--t sysfs sysfs /sys -o noexec,nosuid,nodev}
#                       eend $?
#               else
#                       ewarn "No /sys to mount sysfs needed in 2.6 and later kernels!"
#               fi
#       fi

Posted in , ,  | Tags , ,