Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 477254 - sys-apps/systemd-205: various mounts fail before doing chroot
Summary: sys-apps/systemd-205: various mounts fail before doing chroot
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords:
Depends on: 477498
Blocks:
  Show dependency tree
 
Reported: 2013-07-17 22:01 UTC by Pacho Ramos
Modified: 2013-10-18 17:13 UTC (History)
0 users

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pacho Ramos gentoo-dev 2013-07-17 22:01:12 UTC
I am using this script to enter the chroot to generate emul set packages for ages:
mkdir /mastercd/usr/portage
mkdir /mastercd/usr/portage/distfiles
mkdir /mastercd/usr/src/linux
#mount -o noatime,defaults,user_xattr,notail /dev/sda9 /mastercd
mount -o bind /usr/portage /mastercd/usr/portage
mount -t proc none /mastercd/proc
mount --rbind /dev /mastercd/dev
#mount -o bind /usr/src/linux /mastercd/usr/src/linux
#mount -o bind /lib/modules /mastercd/lib/modules
mount -o bind /sys /mastercd/sys
#mount -o bind /tmp /mastercd/tmp
mount -o bind /usr/distfiles /mastercd/usr/portage/distfiles
cp /etc/resolv.conf /mastercd/etc/resolv.conf

linux32 chroot /mastercd /bin/bash --login
#chroot /mastercd /bin/bash


______

It was working fine until moving to systemd, now, I get the following (after a long delay):
# LC_ALL=C sh /home/pacho/emul/mount_and_chroot.sh
mkdir: cannot create directory '/mastercd/usr/portage': File exists
mkdir: cannot create directory '/mastercd/usr/portage/distfiles': File exists
mkdir: cannot create directory '/mastercd/usr/src/linux': File exists
mount: /mastercd/usr/portage: filesystem mounted, but mount(8) failed: Connection timed out
mount: none is already mounted or /mastercd/proc busy
       none is already mounted on /proc
mount: /mastercd/dev: filesystem mounted, but mount(8) failed: Connection timed out
mount: /mastercd/sys: filesystem mounted, but mount(8) failed: Connection timed out
mount: /mastercd/usr/portage/distfiles: filesystem mounted, but mount(8) failed: Connection timed out



Reproducible: Always




Portage 2.1.11.50 (default/linux/x86/13.0, gcc-4.6.3, glibc-2.15-r3, 3.9.9-gentoo i686)
=================================================================
System uname: Linux-3.9.9-gentoo-i686-Intel-R-_Core-TM-_i5-2410M_CPU_@_2.30GHz-with-gentoo-2.1
KiB Mem:     6007620 total,    206420 free
KiB Swap:    5140476 total,   5140316 free
Timestamp of tree: Sun, 14 Jul 2013 20:30:01 +0000
ld GNU ld (GNU Binutils) 2.22
app-shells/bash:          4.2_p37
dev-java/java-config:     2.1.12-r1
dev-lang/python:          2.7.3-r2, 3.2.3
dev-util/cmake:           2.8.9
dev-util/pkgconfig:       0.28
sys-apps/baselayout:      2.1-r1
sys-apps/openrc:          0.11.8
sys-apps/sandbox:         2.5
sys-devel/autoconf:       2.13, 2.69
sys-devel/automake:       1.9.6-r3, 1.11.6
sys-devel/binutils:       2.22-r1
sys-devel/gcc:            4.6.3
sys-devel/gcc-config:     1.7.3
sys-devel/libtool:        2.4-r1
sys-devel/make:           3.82-r4
sys-kernel/linux-headers: 3.6 (virtual/os-headers)
sys-libs/glibc:           2.15-r3
Repositories: gentoo x-portage
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="* -@EULA"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -mtune=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt /usr/share/openvpn/easy-rsa /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -mtune=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--buildpkg"
FCFLAGS="-O2 -march=i686 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles merge-sync news parallel-fetch protect-owned sandbox sfperms split-log strict unknown-features-warn unmerge-logs unmerge-orphans userfetch"
FFLAGS="-O2 -march=i686 -pipe"
GENTOO_MIRRORS="http://mirrors.sfo1.gni.com/Gentoo/ http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LANG="es_ES.UTF-8"
LC_ALL="C"
LDFLAGS="-Wl,-O1,--as-needed,--hash-style=gnu"
MAKEOPTS="-j3"
PKGDIR="/packages/"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="accessibility acl acpi berkdb bindist bzip2 cli cpudetection cracklib crypt cxx dri fortran gdbm gif gpm iconv ipv6 jpeg kerberos ldap mmx modules mudflap ncurses nls nptl nptlonly openmp pam pcre png readline session sse sse2 ssl sysfs tiff unicode vdpau x86 xinerama zlib" ABI_X86="32" ALSA_CARDS="*" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ubx" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php5-4" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2" RUBY_TARGETS="ruby19 ruby18" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i810 intel mga nv nouveau r128 radeon radeonhd rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware i915 i965 r100 r200 r300 r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CPPFLAGS, CTARGET, INSTALL_MASK, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Mike Gilbert gentoo-dev 2013-07-17 23:12:40 UTC
This could be related to your stale mtab entries from bug 477240.
Comment 2 Harris Landgarten 2013-07-18 02:48:16 UTC
try putting the mounts is fstab with noauto

Then in your script mount by using

systemctl start mastercd-usr-portage.mount

etc.


See if that works.
Comment 3 Pacho Ramos gentoo-dev 2013-07-20 09:40:40 UTC
Yes, this is caused by missing symlink. Where is the doc about that supposed problems that appear with the symlink? I would suggest people to make the symlink (as opposite to current docs that looks to suggest it's optional and causes less problems)

Thanks
Comment 4 Pacho Ramos gentoo-dev 2013-10-18 17:13:31 UTC
I think we cannot do much more  in systemd side -> we show warnings from ebuild, also the guide explains the issues...