Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 192436 - Gentoo Xen guest fails to boot, /proc and /sys mount errors.
Summary: Gentoo Xen guest fails to boot, /proc and /sys mount errors.
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal with 1 vote (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-13 16:44 UTC by Steven Wagner
Modified: 2009-05-11 08:04 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Check if /sys is mounted (x,1.08 KB, patch)
2007-09-18 15:52 UTC, Roy Marples (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Wagner 2007-09-13 16:44:54 UTC
After setting up a gentoo xen guest properly, this error occurs when trying to boot the guest.

"
Press I to enter interactive boot mode
* Mounting proc at /proc ...[ oops ]
* The "mount" command failed with error:
proc already mounted
* Since this is a critical task, startup cannot continue.
Give root password for maintenance
(or type Control-D to continue): 
"

The fix was to go into  /sbin/rc  and comment out line 225 and 244..these:

#try mount -n ${mntcmd:--t proc proc /proc -o noexec,nosuid,nodev}
#try mount -n ${mntcmd:--t sysfs sysfs /sys -o noexec,nosuid,nodev}

and then the guest system loads like a charm. I dont completely understand the logic to why /proc and /sys should not be mounted by /sbin/rc on a gentoo guest.

This was all done of a fresh system, with a brand new i386 stage3 tarball.


Reproducible: Always

Steps to Reproduce:
Comment 1 SpanKY gentoo-dev 2007-09-13 19:55:02 UTC
when you file bug reports, you need to post `emerge --info` just like the bug reporting page says to
Comment 2 Steven Wagner 2007-09-13 22:23:19 UTC
okay, but like I said..this was a on a fresh stage3 tarball. Since then, I've done a emerge -u world


Portage 2.1.2.12 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r4, 2.6.19-4-server i686)
=================================================================
System uname: 2.6.19-4-server i686 Intel(R) Core(TM)2 Quad CPU    Q6600  @ 2.40GHz
Gentoo Base System release 1.12.9
Timestamp of tree: Thu, 13 Sep 2007 07:31:01 +0000
app-shells/bash:     3.2_p17
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.9-r2
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.61-r1
sys-devel/automake:  1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.24
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
CBUILD="i486-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i486-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="acl berkdb bitmap-fonts cli cracklib crypt cups dri fortran gdbm gpm iconv ipv6 isdnlog midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl pppd python readline reflection session spl ssl tcpd truetype-fonts type1-fonts unicode x86 xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 3 Micheal Marineau (RETIRED) gentoo-dev 2007-09-14 02:18:42 UTC
(In reply to comment #2)
> Portage 2.1.2.12 (default-linux/x86/2007.0, gcc-4.1.2, glibc-2.5-r4,
> 2.6.19-4-server i686)
> =================================================================
> System uname: 2.6.19-4-server i686 Intel(R) Core(TM)2 Quad CPU    Q6600  @
> 2.40GHz

Where did this kernel come from? I take it you are running gentoo as a guest on a different distro? Is that kernel using an initrd/initramfs?
Comment 4 Steven Wagner 2007-09-14 16:19:05 UTC
Correct, the gentoo install is a xen guest hosted on a ubuntu server.

kernel = '/boot/vmlinuz-2.6.19-4-server'
ramdisk = '/boot/initrd.img-2.6.19-4-server'
Comment 5 Micheal Marineau (RETIRED) gentoo-dev 2007-09-14 16:34:08 UTC
Ok, my guess is that the ubuntu initramfs leaves proc mounted when it switches into the new root filesystem. Another workaround would be to just compile your own domU kernel that has everything compiled in that you need and not use an initramfs. It can be pretty minimal since domU doesn't need anything like PCI support.
Comment 6 C. Daelhousen (sapphirecat) 2007-09-18 00:32:32 UTC
I'm also seeing this with Kubuntu 7.04 desktop hosting Gentoo in domU. This is the mount information available after a successful boot of the generic Xen kernel:

/dev/sda3 on / type ext3 (rw)
none on /sys type sysfs (rw,nosuid,nodev,noexec)
none on /proc type proc (rw)
udev on /dev type tmpfs (rw)
/dev/sda3 on /dev/.static/dev type ext3 (rw,data=ordered)
udev on /dev type tmpfs (rw,nosuid)
devpts on /dev/pts type devpts (rw,nosuid,noexec)
none on /dev/shm type tmpfs (rw)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
svcdir on /var/lib/init.d type tmpfs (rw,mode=0755,size=2048k)

Instead of commenting out the lines in /sbin/rc, I put them behind if-statements so that the mounts aren't attempted if /proc/$$ (for /proc) or /sys/hypervisor (for /sys) exist. This should let me boot either normally (as before) or as a Xen guest.
Comment 7 Roy Marples (RETIRED) gentoo-dev 2007-09-18 15:52:24 UTC
Created attachment 131221 [details, diff]
Check if /sys is mounted

This is a patch I've applied to our svn repo (should apply cleanly to baselayout-2-rc4) that should fix the above error.
Comment 8 Micheal Marineau (RETIRED) gentoo-dev 2007-09-18 16:20:06 UTC
(In reply to comment #7)
> Created an attachment (id=131221) [edit]
> Check if /sys is mounted
> 
> This is a patch I've applied to our svn repo (should apply cleanly to
> baselayout-2-rc4) that should fix the above error.
> 

Great! But what about /proc?
Comment 9 Roy Marples (RETIRED) gentoo-dev 2007-09-18 17:01:22 UTC
We already check for /proc being mounted. Sorry for not mentioning that.
Comment 10 Steven Wagner 2007-09-19 19:08:28 UTC
Tried on an older version of gentoo. Getting the same error now, but commenting out the same lines in /sbin/rc  doesn't fix the issue in this case.

Begin: Mounting root file system... ...
Begin: Running /scripts/local-top ...
Done.
Begin: Waiting for root file system... ...
Done.
Begin: Running /scripts/local-premount ...
Done.
[54700.649546] ReiserFS: hda1: found reiserfs format "3.6" with standard journal
[54700.649558] ReiserFS: hda1: using ordered data mode
[54700.656715] ReiserFS: hda1: journal params: device hda1, size 8192, journal first block 18, max trans len 1024, max batch 900, max commit age 30, max trans age 30
[54700.656919] ReiserFS: hda1: checking transaction log (hda1)
[54700.738096] ReiserFS: hda1: Using r5 hash to sort names
Begin: Running /scripts/local-bottom ...
Done.
Done.
Begin: Running /scripts/init-bottom ...
mount: Mounting /root/dev on /dev/.static/dev failed: No such file or directory
Done.
mount: Mounting /sys on /root/sys failed: No such file or directory
mount: Mounting /proc on /root/proc failed: No such file or directory
/init: /init: 172: cannot open /root/dev/console: No such file
[54700.811244] Kernel panic - not syncing: Attempted to kill init!


Portage 2.1-r2 (default-linux/x86/no-nptl, gcc-3.4.5, glibc-2.3.5-r3, 2.6.19-4-server i686)
=================================================================
System uname: 2.6.19-4-server i686 unknown
Gentoo Base System version 1.6.14
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r1
sys-devel/binutils:  2.16.1
sys-devel/gcc-config: 1.3.13-r1
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i386-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i386-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="en_US.UTF-8"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 alsa apache2 apm arts avi berkdb bitmap-fonts cli crypt cups curl dlloader dri eds emboss encode foomaticdb fortran gdbm gif gnome gpm gs gstreamer gtk gtk2 imlib ipv6 isdnlog jbig jpeg kde libg++ libwww logrotate mad mikmod motif mp3 mpeg mysql ncurses nls ogg opengl oss pam pcre pdflib perl png pppd python qt3 qt4 quicktime readline reflection sdl session spell spl ssl tcpd tiff truetype truetype-fonts type1-fonts vchroot vorbis xinetd xml xmms xorg xv zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, LDFLAGS, LINGUAS, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 11 Steven Wagner 2007-09-19 19:12:51 UTC
Okay, scratch my last comment. I had no /dev. Different issue.
Comment 12 Roy Marples (RETIRED) gentoo-dev 2007-10-15 11:27:59 UTC
The error reported is fixed in baselayout-2.0.0_rc5
Comment 13 Ludovic Gasc (GMLudo) 2009-05-11 08:04:56 UTC
This bug still exists in baselayout-1.
It could be good to fix in baselayout-1 too, because baselayout-2 is masked.