Skip to main content

Ubuntu: schroot cannot bind the home directory

Hey everyone,

Several weeks ago I had to compile gdb and strace to a target device that runs on ARM (EBI). 
This time, instead of cross compile it, I decided to use my favorite way - schroot environment.


I had the pleasure of using schroot on my old system - an Ubuntu 12.04 desktop, and this was the first time I needed to use it on my current Ubuntu 14.04 system.


The problem started after creating the schroot environment and trying to use it.

As you will see in the following lines, I tried getting into the environment and got an error:

root@ubuntu:/home/talkain# schroot -c ubuntu-armel -u talkain
W: line 11 [ubuntu-i386] union-type: Configuration key name ‘union-type’ is not a permitted name.
W: line 11 [ubuntu-armel] union-type: Configuration key name ‘union-type’ is not a permitted name.
W: Failed to change to directory ‘/home/talkain’: No such file or directoryI: 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 ‘/’
(ubuntu-armel)talkain@ubuntu:/$

This was weird, since the directory exist, I had permissions to this directory (this is my home directory) and this was a fresh installation of this environment.

After digging a little bit, I found an excellent start point here:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=675189

So I looked at the schroot's config file:

/etc/schroot/chroot.d/sbuild-ubuntu-armel:
[ubuntu-armel] description=ubuntu-armel groups=sbuild,root root-groups=sbuild,root # Uncomment these lines to allow members of these groups to access # the -source chroots directly (useful for automated updates, etc). #source-root-users=sbuild,root #source-root-groups=sbuild,root type=file profile=sbuild union-type=overlayfs file=/var/lib/schroot/tarballs/ubuntu-armel.tgz
So in order to solve this error, I changed the schroot configuration file's parameter called "profile" from sbuild to default as follows:
profile=sbuild
to
profile=default
and now I can get into the schroot environment with no issues.


Hope this helps,
- Tal Kain

Comments

Popular posts from this blog

BinDiff error: "Can't start disassembler. Please set correct path in the main settings first"

After installing  BinDiff  and running the application for the first time on my Windows 7 x64 machine, I tried comparing two different binaries but got an error in the middle of the process: Can't start disassembler. Please set correct path in the main settings first The solution for this error is very simple: While installing BinDiff, the installation process asks for the installation path of IDA. The default path (on x64 machine) would be C:\Program Files (x86)\IDA\. This is not always correct. At my case the installation was at C:\Program Files (x86)\IDA 6.3\. Moving the path inside BinDiff will not be sufficient since part of BinDiff's files are still on the old directory. Easiest way to fix it (or by doing it in advance): Uninstall BinDiff and install it while pointing to the correct IDA's path. -Tal

Ubuntu: Installing a missing ath3k firmware

While trying to prepare a new Ubuntu box to use a new card based on the Atheros chipset, I encounter the following error: Bluetooth: Firmware file "ath3k-1.fw" not found According to  http://wireless.kernel.org/en/users/Drivers/ath3k : ath3k is the Linux Bluetooth driver for Atheros AR3011/AR3012 Bluetooth chipsets. I saw this blog post: http://hexwave.blogspot.com/2011/04/debian-6-with-atheros-3011-ath3k-usb.html So I decided to try installing the package linux-firmware which contains the relevant file (I used  dlocate  to $ dlocate linux-firmware | grep -i ath3 linux-firmware: /lib/firmware/ath3k-1.fw or you can find it by searching for ath3k: $ dlocate ath3k-1.fw linux-firmware: /lib/firmware/ath3k-1.fw I just ran: # apt-get install linux-firmware and it fixed it by installing the missing firmware file. Good luck! Tal Kain

Compiling lsof for iOS device on Mac OSX

I started making a small research on my jailbroken iOS device and I was wondering which files does a specific process touches while I was using it. In order to do so, I wanted to use the famous lsof , so I downloaded the package from saurik's packages using Cydia, only to find out that the given lsof is not working on my device: lsof: PID 40 information error: Cannot allocate memory lsof: PID 39 information error: Cannot allocate memory lsof: PID 38 information error: Cannot allocate memory lsof: PID 37 information error: Cannot allocate memory lsof: PID 36 information error: Cannot allocate memory lsof: PID 35 information error: Cannot allocate memory lsof: PID 33 information error: Cannot allocate memory lsof: PID 31 information error: Cannot allocate memory After trying to figure it out, I decided that it would be the best to just try compiling my own lsof and use it on the device (I also liked the challenge :-) ) So my journey begins with downloading lsof from Apple'