You are not logged in.

#1 2015-05-29 22:17:06

shaunsingh14
Member
Registered: 2012-01-07
Posts: 97

32-bit chroot failed to start

I was going about the process to set up the 32-bit chroot so I could use Adobe Acrobat on my system, but systemctl failed to start the service. Output of "systemctl status arch32.service" is as follows:

   Loaded: loaded (/etc/systemd/system/arch32.service; disabled; vendor preset: disabled)
   Active: failed (Result: exit-code) since Fri 2015-05-29 18:10:29 EDT; 11s ago
  Process: 1295 ExecStart=/usr/local/bin/arch32 start (code=exited, status=1/FAILURE)
 Main PID: 1295 (code=exited, status=1/FAILURE)

May 29 18:10:29 the-enforcer systemd[1]: Starting 32-bit chroot...
May 29 18:10:29 the-enforcer systemd[1]: arch32.service: main process exited, code=exited, status=1/FAILURE
May 29 18:10:29 the-enforcer systemd[1]: Failed to start 32-bit chroot.
May 29 18:10:29 the-enforcer systemd[1]: Unit arch32.service entered failed state.
May 29 18:10:29 the-enforcer systemd[1]: arch32.service failed.

output of "journalctl -xe" is as follows

-- Subject: Unit arch32.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit arch32.service has failed.
-- 
-- The result is failed.
May 29 18:09:07 the-enforcer systemd[1]: Unit arch32.service entered failed state.
May 29 18:09:07 the-enforcer systemd[1]: arch32.service failed.
May 29 18:09:07 the-enforcer polkitd[309]: Unregistered Authentication Agent for unix-process:1242:62178 (system bus name :1.65, object path /org/freedesktop/PolicyKit1/Authen
May 29 18:09:07 the-enforcer sudo[1241]: pam_unix(sudo:session): session closed for user root
May 29 18:09:25 the-enforcer sudo[1258]: shaun : TTY=pts/0 ; PWD=/home/shaun ; USER=root ; COMMAND=/usr/local/bin/arch32 start
May 29 18:09:25 the-enforcer sudo[1258]: pam_unix(sudo:session): session opened for user root by shaun(uid=0)
May 29 18:09:25 the-enforcer sudo[1258]: pam_unix(sudo:session): session closed for user root
May 29 18:09:51 the-enforcer /usr/lib/gdm/gdm-x-session[517]: Activating service name='org.gnome.Terminal'
May 29 18:09:51 the-enforcer /usr/lib/gdm/gdm-x-session[517]: Successfully activated service 'org.gnome.Terminal'
May 29 18:10:02 the-enforcer sudo[1281]: shaun : TTY=pts/0 ; PWD=/home/shaun ; USER=root ; COMMAND=/usr/local/bin/arch32 stop
May 29 18:10:02 the-enforcer sudo[1281]: pam_unix(sudo:session): session opened for user root by shaun(uid=0)
May 29 18:10:03 the-enforcer sudo[1281]: pam_unix(sudo:session): session closed for user root
May 29 18:10:29 the-enforcer sudo[1289]: shaun : TTY=pts/0 ; PWD=/home/shaun ; USER=root ; COMMAND=/usr/bin/systemctl start arch32.service
May 29 18:10:29 the-enforcer sudo[1289]: pam_unix(sudo:session): session opened for user root by shaun(uid=0)
May 29 18:10:29 the-enforcer polkitd[309]: Registered Authentication Agent for unix-process:1290:70456 (system bus name :1.66 [/usr/bin/pkttyagent --notify-fd 5 --fallback], o
May 29 18:10:29 the-enforcer systemd[1]: Starting 32-bit chroot...
-- Subject: Unit arch32.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit arch32.service has begun starting up.
May 29 18:10:29 the-enforcer systemd[1]: arch32.service: main process exited, code=exited, status=1/FAILURE
May 29 18:10:29 the-enforcer systemd[1]: Failed to start 32-bit chroot.
-- Subject: Unit arch32.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit arch32.service has failed.
-- 
-- The result is failed.
May 29 18:10:29 the-enforcer systemd[1]: Unit arch32.service entered failed state.
May 29 18:10:29 the-enforcer systemd[1]: arch32.service failed.
May 29 18:10:29 the-enforcer sudo[1289]: pam_unix(sudo:session): session closed for user root
May 29 18:10:29 the-enforcer polkitd[309]: Unregistered Authentication Agent for unix-process:1290:70456 (system bus name :1.66, object path /org/freedesktop/PolicyKit1/Authen
lines 1322-1364/1364 (END)

Here's what my arch32.service file looks like:

[Unit]
Description=32-bit chroot

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/local/bin/arch32 start
ExecStop=/usr/local/bin/arch32 stop

[Install]
WantedBy=multi-user.target

Here's what my /usr/local/bin/arch32 file looks like

#!/bin/bash

## User variables.
MOUNTPOINT=/opt/arch32

## Set MANAGEPARTITION to any value if /opt/arch32 resides on a separate
## partition and not mounted by /etc/fstab or some other means.
## If /opt/arch32 is part of your rootfs, leave this empty.
MANAGEPARTITION=

## Leave USEDISTCC empty unless you wish to use distccd from within the chroot.
USEDISTCC=
DISTCC_SUBNET='10.9.8.0/24'

## PIDFILE shouldn't need to ba changed from this default.
PIDFILE=/run/arch32

start_distccd() {
	[[ ! -L "$MOUNTPOINT"/usr/bin/distccd-chroot ]] &&
		ln -s /usr/bin/distccd "$MOUNTPOINT"/usr/bin/distccd-chroot 
	DISTCC_ARGS="--user nobody --allow $DISTCC_SUBNET --port 3692 --log-level warning --log-file /tmp/distccd-i686.log"

	[[ -z "$(pgrep distccd-chroot)" ]] &&
		linux32 chroot "$MOUNTPOINT" /bin/bash -c "/usr/bin/distccd-chroot --daemon $DISTCC_ARGS"
}

stop_distccd() {
	[[ -n "$(pgrep distccd-chroot)" ]] &&
		linux32 chroot "$MOUNTPOINT" /bin/bash -c "pkill -SIGTERM distccd-chroot"
}

case $1 in
	start)
		[[ -f "$PIDFILE" ]] && exit 1

		if [[ -n "$MANAGEPARTITION" ]]; then
			mountpoint -q $MOUNTPOINT || mount LABEL="arch32" $MOUNTPOINT
		fi

		dirs=(/tmp /dev /dev/pts /home)
		for d in "${dirs[@]}"; do
			mount -o bind $d "$MOUNTPOINT"$d
		done

		mount -t proc none "$MOUNTPOINT/proc"
		mount -t sysfs none "$MOUNTPOINT/sys"
		touch "$PIDFILE"
		[[ -n "$USEDISTCC" ]] && start_distccd
		;;

	stop)
		[[ ! -f "$PIDFILE" ]] && exit 1
		[[ -n "$USEDISTCC" ]] && stop_distccd

		if [[ -n "$MANAGEPARTITION" ]]; then
			umount -R -A -l "$MOUNTPOINT"
		else
			dirs=(/home /dev/pts /dev /tmp)
			[[ -n "$USEDISTCC" ]] && stop_distccd
			umount "$MOUNTPOINT"/{sys,proc}
			for d in "${dirs[@]}"; do
				umount -l "$MOUNTPOINT$d"
			done
		fi
		
		rm -f "$PIDFILE"
		;;
	*)
		echo "usage: $0 (start|stop)"
		exit 1
esac

Any ideas as to what's going on?


I made this account 10 years ago when I was an ignorant and insufferable teenager.
I apologise to all the people I annoyed with my cringe in the past.

Offline

Board footer

Powered by FluxBB