dnschneid / crouton

Chromium OS Universal Chroot Environment
https://goo.gl/fd3zc?si=1
BSD 3-Clause "New" or "Revised" License
8.57k stars 1.24k forks source link

-su: 31: export: : bad variabe name #413

Closed rufai closed 11 years ago

rufai commented 11 years ago

I was trying to installing android developer plugins on eclipse, then all windows that I opened closed and the ubuntu 12.04 logged out into chrome os on my acer c7 chromebook. Then I tried to enter chroot back using " sudo startunity" as always, but I get the error above. I don't know what happend and I also got this "crosh> shell chronos@localhost / $ sudo startunity Entering /usr/local/chroots/precise... -su: 31: export: : bad variable name Unmounting /usr/local/chroots/precise... "

rufai commented 11 years ago

I tried following the link at #151, and I got this.

Welcome to crosh, the ChromeOS developer shell.

If you got here by mistake, don't panic!  Just close this tab and carry on.

Type 'help' for a list of commands.

crosh> shell
chronos@localhost / $ sudo startunity
Entering /usr/local/chroots/precise...
-su: 31: export: : bad variable name
Unmounting /usr/local/chroots/precise...
chronos@localhost / $ sudo sh -ex/usr/local/bin/enter-chroot exec startunity
sh: Illegal option -/
chronos@localhost / $ sudo sh -ex /usr/local/bin/enter-chroot exec startunity
+ APPLICATION=enter-chroot
+ BACKGROUND=
+ readlink -f /usr/local/bin/enter-chroot
+ dirname /usr/local/bin/enter-chroot
+ BINDIR=/usr/local/bin
+ readlink -f /usr/local/bin/../chroots
+ CHROOTS=/usr/local/chroots
+ KEYFILE=
+ LOGIN=
+ NAME=
+ TARGET=
+ USERNAME=1000
+ NOLOGIN=
+ SETUPSCRIPT=/prepare.sh
+ USAGE=enter-chroot [options] [command [args...]]

Enters an installed Debian-based chroot for running alongside Chromium OS.

By default, it will log into the primary user on the first chroot found.
You can specify a command and parameters to run instead of an interactive shell.

Options:
    -b          Fork and run the specified command silently in the background.
    -c CHROOTS  Directory the chroots are in. Default: /usr/local/chroots
    -l          Make the command part of a login. Parameters are passed directly
                to the chroot command, and a call to su is appended.
    -k KEYFILE  Override the auto-detected encryption key location.
    -n NAME     Name of the chroot to enter. Default: first one found in CHROOTS
    -t TARGET   Only enter the chroot if it contains the specified TARGET.
    -u USERNAME Username (or UID) to log into. Default: 1000 (the primary user)
    -x          Does not log in, but directly executes the command instead.
                Note that the environment will be empty (sans TERM).
                Specify -x a second time to run the /prepare.sh script.
+ getopts bc:k:ln:t:u:x f
+ shift 0
+ [ ! root = root -a !  = 0 ]
+ [ -n  -a 2 = 0 ]
+ [  = 2 ]
+ [ -z  ]
+ haschroots=
+ [ ! -d /usr/local/chroots/precise/etc -a ! -f /usr/local/chroots/precise/.ecryptfs ]
+ haschroots=y
+ [ -n  ]
+ NAME=precise
+ break
+ [ -z y ]
+ [ -z precise ]
+ disablehungtask
+ echo 0
+ addtrap stty echo 2>/dev/null || true
+ OLDTRAP=
+ TRAP=stty echo 2>/dev/null || true;
+ settrap stty echo 2>/dev/null || true;
+ trap trap - INT HUP 0; stty echo 2>/dev/null || true; exit 2 INT HUP
+ trap trap - INT HUP 0; stty echo 2>/dev/null || true; 0
+ [ -n  ]
+ sh -e /usr/local/bin/mount-chroot -p -c /usr/local/chroots precise
+ CHROOT=/usr/local/chroots/precise
+ [ !  = 2 ]
+ echo Entering /usr/local/chroots/precise...
Entering /usr/local/chroots/precise...
+ [ -z /usr/local/chroots/precise ]
+ [ -f /usr/local/bin/crash_reporter_wrapper ]
+ sh -e /usr/local/bin/crash_reporter_wrapper register
+ [ -z  ]
+ addtrap sh -e '/usr/local/bin/unmount-chroot' -yc '/usr/local/chroots' 'precise' || true
+ OLDTRAP=stty echo 2>/dev/null || true;
+ TRAP=sh -e '/usr/local/bin/unmount-chroot' -yc '/usr/local/chroots' 'precise' || true;stty echo 2>/dev/null || true;
+ settrap sh -e '/usr/local/bin/unmount-chroot' -yc '/usr/local/chroots' 'precise' || true;stty echo 2>/dev/null || true;
+ trap trap - INT HUP 0; sh -e '/usr/local/bin/unmount-chroot' -yc '/usr/local/chroots' 'precise' || true;stty echo 2>/dev/null || true; exit 2 INT HU
P
+ trap trap - INT HUP 0; sh -e '/usr/local/bin/unmount-chroot' -yc '/usr/local/chroots' 'precise' || true;stty echo 2>/dev/null || true; 0
+ [ ! /usr/local/chroots/precise = /usr/local/chroots/precise ]
+ [ -z  -a -f /usr/local/chroots/precise/prepare.sh ]
+ passwd=/usr/local/chroots/precise/etc/passwd
+ [ -z  ]
+ [ ! -r /usr/local/chroots/precise/etc/passwd ]
+ uid=1000
+ awk -F: $3==1000{print $1; exit} /usr/local/chroots/precise/etc/passwd
+ USERNAME=rufai
+ [ -z rufai ]
+ awk -F: $1=="rufai"{print $6; exit} /usr/local/chroots/precise/etc/passwd
+ CHROOTHOME=/home/rufai
+ awk -F: $1=="rufai"{print $NF; exit} /usr/local/chroots/precise/etc/passwd
+ CHROOTSHELL=/bin/bash
+ gfile=/usr/local/chroots/precise/etc/group
+ [ -f /usr/local/chroots/precise/etc/group ]
+ hostgroup=audio
+ chrootgroup=hwaudio
+ awk -F: $1=="audio"{print $3; exit} /etc/group
+ gid=18
+ [ -z 18 ]
+ awk -F: $1=="hwaudio"{print $3; exit} /usr/local/chroots/precise/etc/group
+ curgid=18
+ [ 18 = 18 ]
+ continue
+ hostgroup=cras
+ chrootgroup=audio
+ awk -F: $1=="cras"{print $3; exit} /etc/group
+ gid=220
+ [ -z 220 ]
+ awk -F: $1=="audio"{print $3; exit} /usr/local/chroots/precise/etc/group
+ curgid=220
+ [ 220 = 220 ]
+ continue
+ hostgroup=video
+ chrootgroup=video
+ awk -F: $1=="video"{print $3; exit} /etc/group
+ gid=27
+ [ -z 27 ]
+ awk -F: $1=="video"{print $3; exit} /usr/local/chroots/precise/etc/group
+ curgid=27
+ [ 27 = 27 ]
+ continue
+ hostgroup=usb
+ chrootgroup=plugdev
+ awk -F: $1=="usb"{print $3; exit} /etc/group
+ gid=85
+ [ -z 85 ]
+ awk -F: $1=="plugdev"{print $3; exit} /usr/local/chroots/precise/etc/group
+ curgid=85
+ [ 85 = 85 ]
+ continue
+ echo precise
+ mkdir -p /usr/local/chroots/precise/var/host
+ cp -f /etc/lsb-release /usr/local/chroots/precise/var/host/
+ cp -f /home/chronos/.Xauthority /usr/local/chroots/precise/var/host/Xauthority
+ chmod 444 /usr/local/chroots/precise/var/host/Xauthority
+ [ -f /usr/local/chroots/precise/etc/X11/host-Xauthority ]
+ ln -sf /var/host/shill/resolv.conf /usr/local/chroots/precise/etc/resolv.conf
+ localtime=/usr/local/chroots/precise/etc/localtime
+ hostlocaltime=/var/host/timezone/localtime
+ [ -h /usr/local/chroots/precise/etc/localtime ]
+ readlink /usr/local/chroots/precise/etc/localtime
+ [ /var/host/timezone/localtime = /var/host/timezone/localtime ]
+ readlink -m /var/lib/timezone/localtime
+ timezone=/usr/share/zoneinfo/Africa/Lagos
+ [ -z /usr/share/zoneinfo/Africa/Lagos -o ! -e /usr/local/chroots/precise ]
+ echo Africa/Lagos
+ fixabslinks /var/run
+ local p=/usr/local/chroots/precise//var/run c
+ readlink -m /usr/local/chroots/precise//var/run
+ c=/run
+ [ ! /run = /usr/local/chroots/precise//var/run ]
+ p=/usr/local/chroots/precise/run
+ readlink -m /usr/local/chroots/precise/run
+ c=/usr/local/chroots/precise/run
+ [ ! /usr/local/chroots/precise/run = /usr/local/chroots/precise/run ]
+ echo /usr/local/chroots/precise/run
+ mountpoint -q /usr/local/chroots/precise/run
+ firstrun=y
+ bindmount /usr/local/chroots/precise / rw,dev,exec,suid --make-unbindable
+ bindopts=
+ [ ! /usr/local/chroots/precise = /usr/local/chroots/precise ]
+ fixabslinks /
+ local p=/usr/local/chroots/precise// c
+ readlink -m /usr/local/chroots/precise//
+ c=/usr/local/chroots/precise
+ [ ! /usr/local/chroots/precise = /usr/local/chroots/precise// ]
+ p=/usr/local/chroots/precise
+ readlink -m /usr/local/chroots/precise
+ c=/usr/local/chroots/precise
+ [ ! /usr/local/chroots/precise = /usr/local/chroots/precise ]
+ echo /usr/local/chroots/precise
+ local target=/usr/local/chroots/precise
+ mountpoint -q /usr/local/chroots/precise
+ mkdir -p /usr/local/chroots/precise
+ mount --bind /usr/local/chroots/precise /usr/local/chroots/precise
+ [ -n rw,dev,exec,suid ]
+ mount -i -o remount,rw,dev,exec,suid /usr/local/chroots/precise
+ [ -n --make-unbindable ]
+ mount --make-unbindable /usr/local/chroots/precise
+ bindmount /dev
+ bindopts=
+ [ ! /dev = /dev ]
+ fixabslinks /dev
+ local p=/usr/local/chroots/precise//dev c
+ readlink -m /usr/local/chroots/precise//dev
+ c=/usr/local/chroots/precise/dev
+ [ ! /usr/local/chroots/precise/dev = /usr/local/chroots/precise//dev ]
+ p=/usr/local/chroots/precise/dev
+ readlink -m /usr/local/chroots/precise/dev
+ c=/usr/local/chroots/precise/dev
+ [ ! /usr/local/chroots/precise/dev = /usr/local/chroots/precise/dev ]
+ echo /usr/local/chroots/precise/dev
+ local target=/usr/local/chroots/precise/dev
+ mountpoint -q /usr/local/chroots/precise/dev
+ mkdir -p /usr/local/chroots/precise/dev
+ mount --bind /dev /usr/local/chroots/precise/dev
+ [ -n  ]
+ bindmount /dev/pts
+ bindopts=
+ [ ! /dev/pts = /dev/pts ]
+ fixabslinks /dev/pts
+ local p=/usr/local/chroots/precise//dev/pts c
+ readlink -m /usr/local/chroots/precise//dev/pts
+ c=/usr/local/chroots/precise/dev/pts
+ [ ! /usr/local/chroots/precise/dev/pts = /usr/local/chroots/precise//dev/pts ]
+ p=/usr/local/chroots/precise/dev/pts
+ readlink -m /usr/local/chroots/precise/dev/pts
+ c=/usr/local/chroots/precise/dev/pts
+ [ ! /usr/local/chroots/precise/dev/pts = /usr/local/chroots/precise/dev/pts ]
+ echo /usr/local/chroots/precise/dev/pts
+ local target=/usr/local/chroots/precise/dev/pts
+ mountpoint -q /usr/local/chroots/precise/dev/pts
+ mkdir -p /usr/local/chroots/precise/dev/pts
+ mount --bind /dev/pts /usr/local/chroots/precise/dev/pts
+ [ -n  ]
+ bindmount /dev/shm
+ bindopts=
+ [ ! /dev/shm = /dev/shm ]
+ fixabslinks /dev/shm
+ local p=/usr/local/chroots/precise//dev/shm c
+ readlink -m /usr/local/chroots/precise//dev/shm
+ c=/usr/local/chroots/precise/dev/shm
+ [ ! /usr/local/chroots/precise/dev/shm = /usr/local/chroots/precise//dev/shm ]
+ p=/usr/local/chroots/precise/dev/shm
+ readlink -m /usr/local/chroots/precise/dev/shm
+ c=/usr/local/chroots/precise/dev/shm
+ [ ! /usr/local/chroots/precise/dev/shm = /usr/local/chroots/precise/dev/shm ]
+ echo /usr/local/chroots/precise/dev/shm
+ local target=/usr/local/chroots/precise/dev/shm
+ mountpoint -q /usr/local/chroots/precise/dev/shm
+ mkdir -p /usr/local/chroots/precise/dev/shm
+ mount --bind /dev/shm /usr/local/chroots/precise/dev/shm
+ [ -n  ]
+ bindmount /sys
+ bindopts=
+ [ ! /sys = /sys ]
+ fixabslinks /sys
+ local p=/usr/local/chroots/precise//sys c
+ readlink -m /usr/local/chroots/precise//sys
+ c=/usr/local/chroots/precise/sys
+ [ ! /usr/local/chroots/precise/sys = /usr/local/chroots/precise//sys ]
+ p=/usr/local/chroots/precise/sys
+ readlink -m /usr/local/chroots/precise/sys
+ c=/usr/local/chroots/precise/sys
+ [ ! /usr/local/chroots/precise/sys = /usr/local/chroots/precise/sys ]
+ echo /usr/local/chroots/precise/sys
+ local target=/usr/local/chroots/precise/sys
+ mountpoint -q /usr/local/chroots/precise/sys
+ mkdir -p /usr/local/chroots/precise/sys
+ mount --bind /sys /usr/local/chroots/precise/sys
+ [ -n  ]
+ bindmount /sys/fs/fuse/connections
+ bindopts=
+ [ ! /sys/fs/fuse/connections = /sys/fs/fuse/connections ]
+ fixabslinks /sys/fs/fuse/connections
+ local p=/usr/local/chroots/precise//sys/fs/fuse/connections c
+ readlink -m /usr/local/chroots/precise//sys/fs/fuse/connections
+ c=/usr/local/chroots/precise/sys/fs/fuse/connections
+ [ ! /usr/local/chroots/precise/sys/fs/fuse/connections = /usr/local/chroots/precise//sys/fs/fuse/connections ]
+ p=/usr/local/chroots/precise/sys/fs/fuse/connections
+ readlink -m /usr/local/chroots/precise/sys/fs/fuse/connections
+ c=/usr/local/chroots/precise/sys/fs/fuse/connections
+ [ ! /usr/local/chroots/precise/sys/fs/fuse/connections = /usr/local/chroots/precise/sys/fs/fuse/connections ]
+ echo /usr/local/chroots/precise/sys/fs/fuse/connections
+ local target=/usr/local/chroots/precise/sys/fs/fuse/connections
+ mountpoint -q /usr/local/chroots/precise/sys/fs/fuse/connections
+ mkdir -p /usr/local/chroots/precise/sys/fs/fuse/connections
+ mount --bind /sys/fs/fuse/connections /usr/local/chroots/precise/sys/fs/fuse/connections
+ [ -n  ]
+ bindmount /tmp /tmp exec
+ bindopts=
+ [ ! /tmp = /tmp ]
+ fixabslinks /tmp
+ local p=/usr/local/chroots/precise//tmp c
+ readlink -m /usr/local/chroots/precise//tmp
+ c=/usr/local/chroots/precise/tmp
+ [ ! /usr/local/chroots/precise/tmp = /usr/local/chroots/precise//tmp ]
+ p=/usr/local/chroots/precise/tmp
+ readlink -m /usr/local/chroots/precise/tmp
+ c=/usr/local/chroots/precise/tmp
+ [ ! /usr/local/chroots/precise/tmp = /usr/local/chroots/precise/tmp ]
+ echo /usr/local/chroots/precise/tmp
+ local target=/usr/local/chroots/precise/tmp
+ mountpoint -q /usr/local/chroots/precise/tmp
+ mkdir -p /usr/local/chroots/precise/tmp
+ mount --bind /tmp /usr/local/chroots/precise/tmp
+ [ -n exec ]
+ mount -i -o remount,exec /usr/local/chroots/precise/tmp
+ [ -n  ]
+ bindmount /proc
+ bindopts=
+ [ ! /proc = /proc ]
+ fixabslinks /proc
+ local p=/usr/local/chroots/precise//proc c
+ readlink -m /usr/local/chroots/precise//proc
+ c=/usr/local/chroots/precise/proc
+ [ ! /usr/local/chroots/precise/proc = /usr/local/chroots/precise//proc ]
+ p=/usr/local/chroots/precise/proc
+ readlink -m /usr/local/chroots/precise/proc
+ c=/usr/local/chroots/precise/proc
+ [ ! /usr/local/chroots/precise/proc = /usr/local/chroots/precise/proc ]
+ echo /usr/local/chroots/precise/proc
+ local target=/usr/local/chroots/precise/proc
+ mountpoint -q /usr/local/chroots/precise/proc
+ mkdir -p /usr/local/chroots/precise/proc
+ mount --bind /proc /usr/local/chroots/precise/proc
+ [ -n  ]
+ tmpfsmount /var/run noexec,nosuid,mode=0755,size=10%
+ fixabslinks /var/run
+ local p=/usr/local/chroots/precise//var/run c
+ readlink -m /usr/local/chroots/precise//var/run
+ c=/run
+ [ ! /run = /usr/local/chroots/precise//var/run ]
+ p=/usr/local/chroots/precise/run
+ readlink -m /usr/local/chroots/precise/run
+ c=/usr/local/chroots/precise/run
+ [ ! /usr/local/chroots/precise/run = /usr/local/chroots/precise/run ]
+ echo /usr/local/chroots/precise/run
+ local target=/usr/local/chroots/precise/run
+ mountpoint -q /usr/local/chroots/precise/run
+ mkdir -p /usr/local/chroots/precise/run
+ mount -i -t tmpfs -o rw,noexec,nosuid,mode=0755,size=10% tmpfs /usr/local/chroots/precise/run
+ tmpfsmount /var/run/lock noexec,nosuid,nodev,size=5120k
+ fixabslinks /var/run/lock
+ local p=/usr/local/chroots/precise//var/run/lock c
+ readlink -m /usr/local/chroots/precise//var/run/lock
+ c=/run/lock
+ [ ! /run/lock = /usr/local/chroots/precise//var/run/lock ]
+ p=/usr/local/chroots/precise/run/lock
+ readlink -m /usr/local/chroots/precise/run/lock
+ c=/usr/local/chroots/precise/run/lock
+ [ ! /usr/local/chroots/precise/run/lock = /usr/local/chroots/precise/run/lock ]
+ echo /usr/local/chroots/precise/run/lock
+ local target=/usr/local/chroots/precise/run/lock
+ mountpoint -q /usr/local/chroots/precise/run/lock
+ mkdir -p /usr/local/chroots/precise/run/lock
+ mount -i -t tmpfs -o rw,noexec,nosuid,nodev,size=5120k tmpfs /usr/local/chroots/precise/run/lock
+ bindmount /var/run/dbus /var/host/dbus
+ bindopts=
+ [ ! /var/run/dbus = /var/run/dbus ]
+ fixabslinks /var/host/dbus
+ local p=/usr/local/chroots/precise//var/host/dbus c
+ readlink -m /usr/local/chroots/precise//var/host/dbus
+ c=/usr/local/chroots/precise/var/host/dbus
+ [ ! /usr/local/chroots/precise/var/host/dbus = /usr/local/chroots/precise//var/host/dbus ]
+ p=/usr/local/chroots/precise/var/host/dbus
+ readlink -m /usr/local/chroots/precise/var/host/dbus
+ c=/usr/local/chroots/precise/var/host/dbus
+ [ ! /usr/local/chroots/precise/var/host/dbus = /usr/local/chroots/precise/var/host/dbus ]
+ echo /usr/local/chroots/precise/var/host/dbus
+ local target=/usr/local/chroots/precise/var/host/dbus
+ mountpoint -q /usr/local/chroots/precise/var/host/dbus
+ mkdir -p /usr/local/chroots/precise/var/host/dbus
+ mount --bind /var/run/dbus /usr/local/chroots/precise/var/host/dbus
+ [ -n  ]
+ bindmount /var/run/shill /var/host/shill
+ bindopts=
+ [ ! /var/run/shill = /var/run/shill ]
+ fixabslinks /var/host/shill
+ local p=/usr/local/chroots/precise//var/host/shill c
+ readlink -m /usr/local/chroots/precise//var/host/shill
+ c=/usr/local/chroots/precise/var/host/shill
+ [ ! /usr/local/chroots/precise/var/host/shill = /usr/local/chroots/precise//var/host/shill ]
+ p=/usr/local/chroots/precise/var/host/shill
+ readlink -m /usr/local/chroots/precise/var/host/shill
+ c=/usr/local/chroots/precise/var/host/shill
+ [ ! /usr/local/chroots/precise/var/host/shill = /usr/local/chroots/precise/var/host/shill ]
+ echo /usr/local/chroots/precise/var/host/shill
+ local target=/usr/local/chroots/precise/var/host/shill
+ mountpoint -q /usr/local/chroots/precise/var/host/shill
+ mkdir -p /usr/local/chroots/precise/var/host/shill
+ mount --bind /var/run/shill /usr/local/chroots/precise/var/host/shill
+ [ -n  ]
+ bindmount /var/run/cras /var/host/cras
+ bindopts=
+ [ ! /var/run/cras = /var/run/cras ]
+ fixabslinks /var/host/cras
+ local p=/usr/local/chroots/precise//var/host/cras c
+ readlink -m /usr/local/chroots/precise//var/host/cras
+ c=/usr/local/chroots/precise/var/host/cras
+ [ ! /usr/local/chroots/precise/var/host/cras = /usr/local/chroots/precise//var/host/cras ]
+ p=/usr/local/chroots/precise/var/host/cras
+ readlink -m /usr/local/chroots/precise/var/host/cras
+ c=/usr/local/chroots/precise/var/host/cras
+ [ ! /usr/local/chroots/precise/var/host/cras = /usr/local/chroots/precise/var/host/cras ]
+ echo /usr/local/chroots/precise/var/host/cras
+ local target=/usr/local/chroots/precise/var/host/cras
+ mountpoint -q /usr/local/chroots/precise/var/host/cras
+ mkdir -p /usr/local/chroots/precise/var/host/cras
+ mount --bind /var/run/cras /usr/local/chroots/precise/var/host/cras
+ [ -n  ]
+ bindmount /var/lib/timezone /var/host/timezone
+ bindopts=
+ [ ! /var/lib/timezone = /var/lib/timezone ]
+ fixabslinks /var/host/timezone
+ local p=/usr/local/chroots/precise//var/host/timezone c
+ readlink -m /usr/local/chroots/precise//var/host/timezone
+ c=/usr/local/chroots/precise/var/host/timezone
+ [ ! /usr/local/chroots/precise/var/host/timezone = /usr/local/chroots/precise//var/host/timezone ]
+ p=/usr/local/chroots/precise/var/host/timezone
+ readlink -m /usr/local/chroots/precise/var/host/timezone
+ c=/usr/local/chroots/precise/var/host/timezone
+ [ ! /usr/local/chroots/precise/var/host/timezone = /usr/local/chroots/precise/var/host/timezone ]
+ echo /usr/local/chroots/precise/var/host/timezone
+ local target=/usr/local/chroots/precise/var/host/timezone
+ mountpoint -q /usr/local/chroots/precise/var/host/timezone
+ mkdir -p /usr/local/chroots/precise/var/host/timezone
+ mount --bind /var/lib/timezone /usr/local/chroots/precise/var/host/timezone
+ [ -n  ]
+ [ -d /lib/modules/3.4.0 ]
+ bindmount -o ro /lib/modules/3.4.0
+ bindopts=
+ [ ! o ro = -o ro ]
+ bindopts=-o ro
+ shift
+ fixabslinks /lib/modules/3.4.0
+ local p=/usr/local/chroots/precise//lib/modules/3.4.0 c
+ readlink -m /usr/local/chroots/precise//lib/modules/3.4.0
+ c=/usr/local/chroots/precise/lib/modules/3.4.0
+ [ ! /usr/local/chroots/precise/lib/modules/3.4.0 = /usr/local/chroots/precise//lib/modules/3.4.0 ]
+ p=/usr/local/chroots/precise/lib/modules/3.4.0
+ readlink -m /usr/local/chroots/precise/lib/modules/3.4.0
+ c=/usr/local/chroots/precise/lib/modules/3.4.0
+ [ ! /usr/local/chroots/precise/lib/modules/3.4.0 = /usr/local/chroots/precise/lib/modules/3.4.0 ]
+ echo /usr/local/chroots/precise/lib/modules/3.4.0
+ local target=/usr/local/chroots/precise/lib/modules/3.4.0
+ mountpoint -q /usr/local/chroots/precise/lib/modules/3.4.0
+ mkdir -p /usr/local/chroots/precise/lib/modules/3.4.0
+ mount --bind -o ro /lib/modules/3.4.0 /usr/local/chroots/precise/lib/modules/3.4.0
+ [ -n  ]
+ fixabslinks /var/run
+ local p=/usr/local/chroots/precise//var/run c
+ readlink -m /usr/local/chroots/precise//var/run
+ c=/run
+ [ ! /run = /usr/local/chroots/precise//var/run ]
+ p=/usr/local/chroots/precise/run
+ readlink -m /usr/local/chroots/precise/run
+ c=/usr/local/chroots/precise/run
+ [ ! /usr/local/chroots/precise/run = /usr/local/chroots/precise/run ]
+ echo /usr/local/chroots/precise/run
+ ln -sfT /dev/shm /usr/local/chroots/precise/run/shm
+ fixabslinks /var/run
+ local p=/usr/local/chroots/precise//var/run c
+ readlink -m /usr/local/chroots/precise//var/run
+ c=/run
+ [ ! /run = /usr/local/chroots/precise//var/run ]
+ p=/usr/local/chroots/precise/run
+ readlink -m /usr/local/chroots/precise/run
+ c=/usr/local/chroots/precise/run
+ [ ! /usr/local/chroots/precise/run = /usr/local/chroots/precise/run ]
+ echo /usr/local/chroots/precise/run
+ ln -sfT /dev/.udev /usr/local/chroots/precise/run/udev
+ fixabslinks /var/run
+ local p=/usr/local/chroots/precise//var/run c
+ readlink -m /usr/local/chroots/precise//var/run
+ c=/run
+ [ ! /run = /usr/local/chroots/precise//var/run ]
+ p=/usr/local/chroots/precise/run
+ readlink -m /usr/local/chroots/precise/run
+ c=/usr/local/chroots/precise/run
+ [ ! /usr/local/chroots/precise/run = /usr/local/chroots/precise/run ]
+ echo /usr/local/chroots/precise/run
+ ln -sfT /var/host/cras /usr/local/chroots/precise/run/cras
+ fixabslinks /var/host/media
+ local p=/usr/local/chroots/precise//var/host/media c
+ readlink -m /usr/local/chroots/precise//var/host/media
+ c=/usr/local/chroots/precise/var/host/media
+ [ ! /usr/local/chroots/precise/var/host/media = /usr/local/chroots/precise//var/host/media ]
+ p=/usr/local/chroots/precise/var/host/media
+ readlink -m /usr/local/chroots/precise/var/host/media
+ c=/usr/local/chroots/precise/var/host/media
+ [ ! /usr/local/chroots/precise/var/host/media = /usr/local/chroots/precise/var/host/media ]
+ echo /usr/local/chroots/precise/var/host/media
+ destmedia=/usr/local/chroots/precise/var/host/media
+ [ -d /usr/local/chroots/precise/media ]
+ mountpoint -q /usr/local/chroots/precise/var/host/media
+ mount --make-shared /media
+ mkdir -p /usr/local/chroots/precise/var/host/media
+ ln -sf /var/host/media/removable /usr/local/chroots/precise/media/
+ mount --rbind /media /usr/local/chroots/precise/var/host/media
+ localdownloads=/home/chronos/user/Downloads
+ [ -z  -a -n /home/rufai -a -d /home/chronos/user/Downloads ]
+ bindmount /home/chronos/user/Downloads /home/rufai/Downloads exec
+ bindopts=
+ [ ! /home/chronos/user/Downloads = /home/chronos/user/Downloads ]
+ fixabslinks /home/rufai/Downloads
+ local p=/usr/local/chroots/precise//home/rufai/Downloads c
+ readlink -m /usr/local/chroots/precise//home/rufai/Downloads
+ c=/usr/local/chroots/precise/home/rufai/Downloads
+ [ ! /usr/local/chroots/precise/home/rufai/Downloads = /usr/local/chroots/precise//home/rufai/Downloads ]
+ p=/usr/local/chroots/precise/home/rufai/Downloads
+ readlink -m /usr/local/chroots/precise/home/rufai/Downloads
+ c=/usr/local/chroots/precise/home/rufai/Downloads
+ [ ! /usr/local/chroots/precise/home/rufai/Downloads = /usr/local/chroots/precise/home/rufai/Downloads ]
+ echo /usr/local/chroots/precise/home/rufai/Downloads
+ local target=/usr/local/chroots/precise/home/rufai/Downloads
+ mountpoint -q /usr/local/chroots/precise/home/rufai/Downloads
+ mkdir -p /usr/local/chroots/precise/home/rufai/Downloads
+ mount --bind /home/chronos/user/Downloads /usr/local/chroots/precise/home/rufai/Downloads
+ [ -n exec ]
+ mount -i -o remount,exec /usr/local/chroots/precise/home/rufai/Downloads
+ [ -n  ]
+ [ -n  ]
+ [ !  = 1 ]
+ grep -q ^root: /usr/local/chroots/precise/etc/passwd
+ + grep ^[a-z][-a-z0-9_]*$
echo cat /busconfig/user/text()
+ xmllint --shell /usr/local/chroots/precise/etc/dbus-1/system.conf
+ dbususer=messagebus
+ chrootcmd 
        if ! hash dbus-daemon 2>/dev/null; then
            exit 0
        fi
        dbususer='messagebus'
        pidfile="/var/run/dbus/pid"
        if [ -f "$pidfile" ]; then
            if grep -q "^dbus-daemon" "/proc/`cat "$pidfile"`/cmdline" \
    -n NAME     Name of the chroot to enter. Default: first one found in CHROOTS
                    2>/dev/null; then
                exit 0
            fi
            rm -f "$pidfile"
        fi
        mkdir -p /var/run/dbus
        dbususer="`id -un "$dbususer" 2>/dev/null || echo "messagebus"`"
        dbusgrp="`id -gn "$dbususer" 2>/dev/null || echo "messagebus"`"
        chown "$dbususer:$dbusgrp" /var/run/dbus
        dbus-daemon --system --fork
+ env -i chroot /usr/local/chroots/precise su -s /bin/sh -c 
        if ! hash dbus-daemon 2>/dev/null; then
            exit 0
        fi
        dbususer='messagebus'
        pidfile="/var/run/dbus/pid"
        if [ -f "$pidfile" ]; then
            if grep -q "^dbus-daemon" "/proc/`cat "$pidfile"`/cmdline" \
                    2>/dev/null; then
                exit 0
            fi
            rm -f "$pidfile"
        fi
        mkdir -p /var/run/dbus
        dbususer="`id -un "$dbususer" 2>/dev/null || echo "messagebus"`"
        dbusgrp="`id -gn "$dbususer" 2>/dev/null || echo "messagebus"`"
        chown "$dbususer:$dbusgrp" /var/run/dbus
        dbus-daemon --system --fork - root
-su: 31: export: : bad variable name
+ trap - INT HUP 0
+ sh -e /usr/local/bin/unmount-chroot -yc /usr/local/chroots precise
Unmounting /usr/local/chroots/precise...
+ stty echo
chronos@localhost / $ sudo enter-chroot -x su -
Entering /usr/local/chroots/precise...
-su: export: `=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk-linux/tools': not a valid identifier
-su: eport: command not found
(precise)root@localhost:~# ls /usr/local/chroots/precise/bin
ls: cannot access /usr/local/chroots/precise/bin: No such file or directory
(precise)root@localhost:~# mkdir -p /var/run/dbus && chown messagebus:messagebus /var/run/dbus && dbus-daemon --system
Failed to start message bus: The pid file "/var/run/dbus/pid" exists, if the message bus is not running, remove this file
rufai commented 11 years ago

chronos@localhost / $ ls -l /usr/local/chroots/precise/bin total 6816 -rwxr-xr-x 1 root root 920788 Mar 28 2013 bash -rwxr-xr-x 3 root root 30216 Dec 15 2011 bunzip2 -rwxr-xr-x 3 root root 30216 Dec 15 2011 bzcat lrwxrwxrwx 1 root root 6 Dec 15 2011 bzcmp -> bzdiff -rwxr-xr-x 1 root root 2140 Dec 15 2011 bzdiff lrwxrwxrwx 1 root root 6 Dec 15 2011 bzegrep -> bzgrep -rwxr-xr-x 1 root root 4877 Dec 15 2011 bzexe lrwxrwxrwx 1 root root 6 Dec 15 2011 bzfgrep -> bzgrep -rwxr-xr-x 1 root root 3642 Dec 15 2011 bzgrep -rwxr-xr-x 3 root root 30216 Dec 15 2011 bzip2 -rwxr-xr-x 1 root root 9596 Dec 15 2011 bzip2recover lrwxrwxrwx 1 root root 6 Dec 15 2011 bzless -> bzmore -rwxr-xr-x 1 root root 1297 Dec 15 2011 bzmore -rwxr-xr-x 1 root root 46764 Nov 19 2012 cat -rwxr-xr-x 1 root root 13800 Dec 18 2011 chacl -rwxr-xr-x 1 root root 54928 Nov 19 2012 chgrp -rwxr-xr-x 1 root root 50804 Nov 19 2012 chmod -rwxr-xr-x 1 root root 54936 Nov 19 2012 chown -rwsr-xr-x 1 root root 9648 Mar 31 2012 chvt -rwxr-xr-x 1 root root 120708 Nov 19 2012 cp -rwxr-xr-x 1 root root 138888 Apr 1 2012 cpio -rwxr-xr-x 1 root root 100284 Mar 29 2012 dash -rwxr-xr-x 1 root root 54916 Nov 19 2012 date -rwxr-xr-x 1 root root 9544 Jun 13 15:47 dbus-cleanup-sockets -rwxr-xr-x 1 root root 439704 Jun 13 15:47 dbus-daemon -rwxr-xr-x 1 root root 9536 Jun 13 15:47 dbus-uuidgen -rwxr-xr-x 1 root root 54984 Nov 19 2012 dd -rwxr-xr-x 1 root root 79632 Nov 19 2012 df -rwxr-xr-x 1 root root 104508 Nov 19 2012 dir -rwxr-xr-x 1 root root 22020 Mar 30 2012 dmesg -rwxr-xr-x 4 root root 13852 May 26 2011 dnsdomainname -rwxr-xr-x 4 root root 13852 May 26 2011 domainname -rwxr-xr-x 1 root root 57968 Mar 31 2012 dumpkeys -rwxr-xr-x 1 root root 26152 Nov 19 2012 echo -rwxr-xr-x 1 root root 149596 Dec 16 2011 egrep -rwxr-xr-x 1 root root 22044 Nov 19 2012 false -rwxr-xr-x 1 root root 9656 Mar 31 2012 fgconsole -rwxr-xr-x 1 root root 108500 Dec 16 2011 fgrep -rwxr-xr-x 1 root root 34848 Mar 30 2012 findmnt -rwxr-xr-x 1 root root 30832 Jul 17 2012 fuser -rwsr-xr-x 1 root root 26252 Mar 2 2012 fusermount -rwxr-xr-x 1 root root 22500 Dec 18 2011 getfacl -rwxr-xr-x 1 root root 153692 Dec 16 2011 grep -rwxr-xr-x 2 root root 2251 Feb 9 2012 gunzip -rwxr-xr-x 1 root root 5937 Feb 9 2012 gzexe -rwxr-xr-x 1 root root 86040 Feb 9 2012 gzip -rwxr-xr-x 1 root root 13848 May 26 2011 hostname -rwxr-xr-x 1 root root 5935 Jan 18 2013 init-checkconf -rwxr-xr-x 1 root root 16005 Jan 18 2013 initctl2dot -rwxr-xr-x 1 root root 253984 Apr 10 2012 ip -rwxr-xr-x 1 root root 9652 Mar 31 2012 kbd_mode -rwxr-xr-x 1 root root 17968 Dec 12 2011 kill -rwxr-xr-x 1 root root 141240 Aug 10 2011 less -rwxr-xr-x 1 root root 9640 Aug 10 2011 lessecho lrwxrwxrwx 1 root root 8 Aug 10 2011 lessfile -> lesspipe -rwxr-xr-x 1 root root 14460 Aug 10 2011 lesskey -rwxr-xr-x 1 root root 7506 Aug 10 2011 lesspipe -rwxr-xr-x 1 root root 46720 Nov 19 2012 ln -rwxr-xr-x 1 root root 86856 Mar 31 2012 loadkeys -rwxr-xr-x 1 root root 43312 Sep 12 2012 login -rwxr-xr-x 1 root root 63068 Sep 11 2012 lowntfs-3g -rwxr-xr-x 1 root root 104508 Nov 19 2012 ls -rwxr-xr-x 1 root root 43312 Mar 30 2012 lsblk -rwxr-xr-x 1 root root 5540 Nov 20 2011 lsmod -rwxr-xr-x 1 root root 42624 Nov 19 2012 mkdir -rwxr-xr-x 1 root root 30272 Nov 19 2012 mknod -rwxr-xr-x 1 root root 34436 Nov 19 2012 mktemp -rwxr-xr-x 1 root root 34492 Mar 30 2012 more -rwsr-xr-x 1 root root 88760 Mar 30 2012 mount -rwxr-xr-x 1 root root 5544 Jul 26 2012 mountpoint lrwxrwxrwx 1 root root 20 Oct 7 12:29 mt -> /etc/alternatives/mt -rwxr-xr-x 1 root root 67624 Apr 1 2012 mt-gnu -rwxr-xr-x 1 root root 112488 Nov 19 2012 mv lrwxrwxrwx 1 root root 20 Oct 7 12:30 nc -> /etc/alternatives/nc -rwxr-xr-x 1 root root 26152 Jul 1 2011 nc.openbsd lrwxrwxrwx 1 root root 24 Oct 7 12:30 netcat -> /etc/alternatives/netcat -rwxr-xr-x 1 root root 113920 Mar 31 2012 netstat -rwxr-xr-x 4 root root 13852 May 26 2011 nisdomainname -rwxr-xr-x 1 root root 58992 Sep 11 2012 ntfs-3g -rwxr-xr-x 1 root root 9620 Sep 11 2012 ntfs-3g.probe -rwxr-xr-x 1 root root 66940 Sep 11 2012 ntfs-3g.secaudit -rwxr-xr-x 1 root root 17760 Sep 11 2012 ntfs-3g.usermap -rwxr-xr-x 1 root root 26028 Sep 11 2012 ntfscat -rwxr-xr-x 1 root root 30072 Sep 11 2012 ntfsck -rwxr-xr-x 1 root root 34220 Sep 11 2012 ntfscluster -rwxr-xr-x 1 root root 34220 Sep 11 2012 ntfscmp -rwxr-xr-x 1 root root 42484 Sep 11 2012 ntfsdecrypt -rwxr-xr-x 1 root root 21856 Sep 11 2012 ntfsdump_logfile -rwxr-xr-x 1 root root 42420 Sep 11 2012 ntfsfix -rwxr-xr-x 1 root root 58812 Sep 11 2012 ntfsinfo -rwxr-xr-x 1 root root 31204 Sep 11 2012 ntfsls -rwxr-xr-x 1 root root 25992 Sep 11 2012 ntfsmftalloc -rwxr-xr-x 1 root root 30124 Sep 11 2012 ntfsmove -rwxr-xr-x 1 root root 34176 Sep 11 2012 ntfstruncate -rwxr-xr-x 1 root root 42656 Sep 11 2012 ntfswipe lrwxrwxrwx 1 root root 6 Mar 31 2012 open -> openvt -rwxr-xr-x 1 root root 13844 Mar 31 2012 openvt lrwxrwxrwx 1 root root 14 Jul 26 2012 pidof -> /sbin/killall5 -rwsr-xr-x 1 root root 34740 Nov 8 2011 ping -rwsr-xr-x 1 root root 39116 Nov 8 2011 ping6 -rwxr-xr-x 1 root root 34420 May 16 23:13 plymouth -rwxr-xr-x 1 root root 30480 May 16 23:13 plymouth-upstart-bridge -rwxr-xr-x 1 root root 87900 Dec 12 2011 ps -rwxr-xr-x 1 root root 26220 Nov 19 2012 pwd lrwxrwxrwx 1 root root 4 Mar 28 2013 rbash -> bash -rwxr-xr-x 1 root root 34404 Nov 19 2012 readlink -rwxr-xr-x 1 root root 54912 Nov 19 2012 rm -rwxr-xr-x 1 root root 34376 Nov 19 2012 rmdir -rwxr-xr-x 1 root root 254 Jan 18 2013 running-in-container -rwxr-xr-x 1 root root 14044 Mar 29 2012 run-parts -rwxr-xr-x 1 root root 59472 Apr 30 2011 sed -rwxr-xr-x 1 root root 30788 Dec 18 2011 setfacl -rwxr-xr-x 1 root root 38612 Mar 31 2012 setfont -rwxr-xr-x 1 root root 12052 Apr 19 2012 setupcon lrwxrwxrwx 1 root root 4 Mar 29 2012 sh -> dash lrwxrwxrwx 1 root root 4 Mar 29 2012 sh.distrib -> dash -rwxr-xr-x 1 root root 26156 Nov 19 2012 sleep -rwxr-xr-x 1 root root 71412 Apr 10 2012 ss -rwxr-xr-x 1 root root 58992 Nov 19 2012 stty -rwsr-xr-x 1 root root 31116 Sep 12 2012 su -rwxr-xr-x 1 root root 22052 Nov 19 2012 sync -rwxr-xr-x 1 root root 13836 Mar 30 2012 tailf -rwxr-xr-x 1 root root 305968 Mar 31 2012 tar -rwxr-xr-x 1 root root 9580 Mar 29 2012 tempfile -rwxr-xr-x 1 root root 54980 Nov 19 2012 touch -rwxr-xr-x 1 root root 22044 Nov 19 2012 true -rwxr-xr-x 1 root root 9732 Mar 2 2012 ulockmgr_server -rwsr-xr-x 1 root root 67720 Mar 30 2012 umount -rwxr-xr-x 1 root root 26180 Nov 19 2012 uname -rwxr-xr-x 2 root root 2251 Feb 9 2012 uncompress -rwxr-xr-x 1 root root 2762 Mar 31 2012 unicode_start -rwxr-xr-x 1 root root 104512 Nov 19 2012 vdir -rwxr-xr-x 1 root root 5508 Jun 14 2012 vmmouse_detect -rwxr-xr-x 1 root root 946 Mar 29 2012 which -rwxr-xr-x 1 root root 22120 Feb 9 2012 whiptail -rwxr-xr-x 4 root root 13852 May 26 2011 ypdomainname -rwxr-xr-x 1 root root 1939 Feb 9 2012 zcat -rwxr-xr-x 1 root root 1721 Feb 9 2012 zcmp -rwxr-xr-x 1 root root 4534 Feb 9 2012 zdiff -rwxr-xr-x 1 root root 121 Feb 9 2012 zegrep -rwxr-xr-x 1 root root 121 Feb 9 2012 zfgrep -rwxr-xr-x 1 root root 2078 Feb 9 2012 zforce -rwxr-xr-x 1 root root 5986 Feb 9 2012 zgrep -rwxr-xr-x 1 root root 1797 Feb 9 2012 zless -rwxr-xr-x 1 root root 2502 Feb 9 2012 zmore -rwxr-xr-x 1 root root 5015 Feb 9 2012 znew chronos@localhost / $

rufai commented 11 years ago

I also tried this line above and got the posted result, please help.

rufai commented 11 years ago

I think i know the problem now but I don't know how to solve it, please see below:

Welcome to crosh, the ChromeOS developer shell. If you got here by mistake, don't panic! Just close this tab and carry on. Type 'help' for a list of commands. crosh> shell chronos@localhost / $ sudo startunity Entering /usr/local/chroots/precise... -su: 31: export: : bad variable name Unmounting /usr/local/chroots/precise... chronos@localhost / $ sudo enter-chroot -x su - Entering /usr/local/chroots/precise... -su: export: `=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/android-sdk-linux/tools': not a valid identifier -su: eport: command not found (precise)root@localhost:~#

I think it involves some lines of code I put into the /etc/prolife directory, when I was trying to install eclipse java kepler. How do I remove the lines of code from the directory in chromeos.

dnschneid commented 11 years ago

Nice sleuthing! sudo enter-chroot -x should get you into a bare shell that you can use to run a text editor (vi) to fix your profile. If your chroot is unencrypted, you can even edit it straight from a root shell in crosh by cd'ing into /usr/local/chroots/precise.