Chroot on trusty

358 views
Skip to first unread message

Yang Guo

unread,
Sep 17, 2014, 6:53:33 AM9/17/14
to chromi...@chromium.org
I recently upgraded to Ubuntu Trusty. When I tried to install chroot via build/install-chroot.sh, I chose trusty and 32. The install seems to work fine, but entering the chroot doesn't:

I: Base system installed successfully.
sed: can't read /etc/schroot/script-defaults: No such file or directory
sed: can't read /etc/schroot/mount-defaults: No such file or directory
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: 10mount: error: setup_fstab file '/etc/schroot/fstab' does not exist
E: trusty32-acc7b4cb-6aaa-4e75-9d95-83b511b13f9c: Chroot setup failed: stage=setup-start
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: 10mount: error: setup_fstab file '/etc/schroot/fstab' does not exist
E: trusty32-6a7a940e-b888-491b-a242-5edf3d4baf8a: Chroot setup failed: stage=setup-start
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: 10mount: error: setup_fstab file '/etc/schroot/fstab' does not exist
E: trusty32-27236ee5-1209-4cc9-bc77-90e38191afd2: Chroot setup failed: stage=setup-start
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: 10mount: error: setup_fstab file '/etc/schroot/fstab' does not exist
E: trusty32-ad7ba033-29ae-4109-9e26-f529fca7ceb1: Chroot setup failed: stage=setup-start
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found

If I try to run it via trusty32, I get

W: line 92 [precise32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: 10mount: error: setup_fstab file '/etc/schroot/fstab' does not exist
E: trusty32-ef45a876-b811-434b-a9da-edba5f74f292: Chroot setup failed: stage=setup-start
W: line 92 [precise32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 92 [precise32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found
W: line 92 [precise32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
W: line 81 [trusty32]: Deprecated key ‘script-config’ used
I: This option will be removed in the future; please update your configuration
E: : Chroot not found

Did anyone experience anything similar before? Any solution to this?

Yang

Yang Guo

unread,
Sep 17, 2014, 7:22:42 AM9/17/14
to chromi...@chromium.org
Patching build/install-chroot.sh with

diff --git a/build/install-chroot.sh b/build/install-chroot.sh
index c060f60..a9f1457 100755
--- a/build/install-chroot.sh
+++ b/build/install-chroot.sh
@@ -364,7 +364,7 @@ users=root
 groups=${chroot_groups}
 root-groups=${chroot_groups}
 personality=linux$([ "${arch}" != 64bit ] && echo 32)
-script-config=script-${target}
+setup.fstab=script-${target}
 ${priority}
 
 EOF


takes me a bit further. It now fails with

I: Base system installed successfully.
sed: can't read /etc/schroot/script-defaults: No such file or directory
sed: can't read /etc/schroot/mount-defaults: No such file or directory
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.

Failed



But at least I can enter the chroot, though the home directory seems not to be mounted:

yangguo@yangguo:~/chromium/src$ trusty32
W: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
W: Failed to change to directory ‘/usr/local/google/home/yangguo’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.
W: Falling back to directory ‘/’
(trusty32)yangguo@yangguo:/$ cd
bash: cd: /usr/local/google/home/yangguo: No such file or directory
(trusty32)yangguo@yangguo:/$ exit
exit
E: Failed to change to directory ‘/usr/local/google/home/yangguo/chromium/src’: No such file or directory
I: The directory does not exist inside the chroot.  Use the --directory option to run the command in a different directory.

Jakob Kummerow

unread,
Sep 23, 2014, 10:02:02 AM9/23/14
to Yang Guo, chromium-dev
I had success with the following patch:

diff --git a/build/install-chroot.sh b/build/install-chroot.sh
index c060f60..93017df 100755
--- a/build/install-chroot.sh
+++ b/build/install-chroot.sh
@@ -364,7 +364,8 @@ users=root
 groups=${chroot_groups}
 root-groups=${chroot_groups}
 personality=linux$([ "${arch}" != 64bit ] && echo 32)
-script-config=script-${target}
+setup.fstab=mount-${target}
+setup.config=script-${target}
 ${priority}
 
 EOF

I also needed to mess with the mount points to get /proc and /dev mounted:
(host) $ sudo -c "cat /etc/schroot/default/fstab >> /etc/schroot/mount-trusty32bit"
as well as with some :amd64 packages that for some reason got installed in the chroot (just apt-get removed them when they showed up, until apt-get install -f was happy).

When you run build/install-build-deps.sh inside the chroot, it helps to pass --no-nacl, because the nacl dependencies list includes lib32z-dev which doesn't exist for 32bit systems (and pulling in the amd64 version of the package messes up various package dependencies).


--
--
Chromium Developers mailing list: chromi...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-dev

A.Programmer

unread,
Nov 11, 2014, 3:16:42 AM11/11/14
to chromi...@chromium.org, yan...@chromium.org
I tried this patch and install trusty32, but had this message:
Processing triggers for libc-bin (2.19-0ubuntu6.3) ...
ls
: cannot access /proc/self/root/.: No such file or directory

If you plan on building Chrome inside of the new chroot environment,
you now have to install the build dependencies
. Do you want me to
start the script that does
this for you (y/n)? y

sh
: 1: /home/programmer/chromium32/depot_tools/src/build/install-build-deps.sh: not found
ls
: cannot access /proc/self/root/.: No such file or directory

Successfully installed trusty 32bit

Then I tried to follow the instruction and:
~$ trusty32 chromium32/depot_tools/src/build/install-chroot.sh
E
: Failed to execute chromium32/depot_tools/src/build/install-chroot.sh”: No such file or directory
ls
: cannot access /proc/self/root/.: No such file or directory

And after this I added "/etc/schroot/default/fstab" to the end of the file /etc/schroot/mount-trusty32bit.
Now it looks like:
/media /media none rw,rbind 0 0
/dev/shm /dev/shm none rw,bind 0 0
/run/shm /run/shm none rw,bind 0 0
/home/programmer/chroot/.trusty32bit /home/programmer/chroot none rw,bind 0 0
/etc/schroot/default/fstab

So, I've tried to run "~$ trusty32 chromium32/depot_tools/src/build/install-chroot.sh" one more time and got:
E: 10mount: mount: unknown filesystem type ''
E
: trusty32-f76d4c9f-f184-48ae-81b5-43398b55159b: Chroot setup failed: stage=setup-start
E
: : Chroot not found
E
: : Chroot not found
E
: : Chroot not found

I'm not familiar to chroot, meybe I'am doing something wrong.
Could anyone tell me how to fix this?
I just want to build 32bit Chromium via chroot.
Thank you.

вторник, 23 сентября 2014 г., 17:02:02 UTC+3 пользователь Jakob Kummerow написал:
Reply all
Reply to author
Forward
0 new messages