linaro-media-create stops bluetooth during while building SD card

Bug #912782 reported by Angus Ainslie
14
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
High
Fathi Boudra

Bug Description

While creating an SD card the bluetooth gets stopped. This also stops bluetooth in the host.

Related branches

Revision history for this message
Ricardo Salveti (rsalveti) wrote : Re: [Bug 912782] [NEW] linaro-media-create stops bluetooth during while building SD card

On Fri, Jan 6, 2012 at 12:50 PM, Angus Ainslie <email address hidden> wrote:
> Public bug reported:
>
> While creating an SD card the bluetooth gets stopped. This also stops
> bluetooth in the host.

Guess this happens because the bluez service is restarted while
creating the SD card.

We could fix this at the package side, but I believe the proper fix
would be at linaro-image-tools, in a way it could avoid services to
run while installing/upgrading the packages (like linking upstart to
/bin/true and such).

Revision history for this message
Mattias Backman (mabac) wrote :

Do you mean that we should do
    ln -s /bin/true /sbin/start
on the host system before we start installing packages to the chroot?

Is it a good idea for l-m-c to try to change the behaviour of the packages? I do agree that it shouldn't restart services on the host though since we target a chroot.

Revision history for this message
Fathi Boudra (fboudra) wrote : Re: [Bug 912782] Re: linaro-media-create stops bluetooth during while building SD card

On 10 January 2012 11:29, Mattias Backman <email address hidden> wrote:
> Do you mean that we should do
>    ln -s /bin/true /sbin/start
> on the host system before we start installing packages to the chroot?

we should prevent daemons to start in the chroot:
echo "exit 101" > usr/sbin/policy-rc.d
chmod a+x usr/sbin/policy-rc.d

> Is it a good idea for l-m-c to try to change the behaviour of the
> packages? I do agree that it shouldn't restart services on the host
> though since we target a chroot.

it's usually done like that when you bootstrap a debian/ubuntu chroot.
All rc.d operations are disabled by a policy-rc.d script.
i.e. man cdebootstrap

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

On Tue, Jan 10, 2012 at 11:57 AM, Fathi Boudra <email address hidden> wrote:
> On 10 January 2012 11:29, Mattias Backman <email address hidden> wrote:
>> Do you mean that we should do
>>    ln -s /bin/true /sbin/start
>> on the host system before we start installing packages to the chroot?
>
> we should prevent daemons to start in the chroot:
> echo "exit 101" > usr/sbin/policy-rc.d
> chmod a+x usr/sbin/policy-rc.d
>
>> Is it a good idea for l-m-c to try to change the behaviour of the
>> packages? I do agree that it shouldn't restart services on the host
>> though since we target a chroot.
>
> it's usually done like that when you bootstrap a debian/ubuntu chroot.
> All rc.d operations are  disabled by a  policy-rc.d  script.
> i.e. man cdebootstrap

Yes, the less we interfere at the host, the better.

Guess we should just do it in a similar way as done by cdebootstrap.
Just be sure to revert all of that as the last step.

Changed in linaro-image-tools:
status: New → Confirmed
Revision history for this message
Avik Sil (aviksil) wrote :

I'm getting another error while writing image to sd card with l-m-c: http://paste.ubuntu.com/815093/. My host is lucid.

Revision history for this message
Mattias Backman (mabac) wrote :

On Tue, Jan 24, 2012 at 7:20 AM, Avik Sil <email address hidden> wrote:
> I'm getting another error while writing image to sd card with l-m-c:
> http://paste.ubuntu.com/815093/. My host is lucid.

That looks like a problem with the ubuntu-omap4-extras-config package:

Setting up ubuntu-omap4-extras-config (1.30) ...
start: Unknown job: ubuntu-omap4-extras-config
invoke-rc.d: initscript ubuntu-omap4-extras-config, action "start" failed.
dpkg: error processing ubuntu-omap4-extras-config (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of
hwpack-linaro-lt-panda-x11-base:
 hwpack-linaro-lt-panda-x11-base depends on ubuntu-omap4-extras-config; however:
  Package ubuntu-omap4-extras-config is not configured yet.
dpkg: error processing hwpack-linaro-lt-panda-x11-base (--configure):
 dependency problems - leaving unconfigured

>
> --
> You received this bug notification because you are subscribed to Linaro
> Image Tools.
> https://bugs.launchpad.net/bugs/912782
>
> Title:
>  linaro-media-create stops bluetooth during while building SD card
>
> Status in Linaro Image Tools:
>  Confirmed
>
> Bug description:
>  While creating an SD card the bluetooth gets stopped. This also stops
>  bluetooth in the host.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/linaro-image-tools/+bug/912782/+subscriptions

Revision history for this message
Ricardo Salveti (rsalveti) wrote :

On Tue, Jan 24, 2012 at 5:23 AM, Mattias Backman
<email address hidden> wrote:
> On Tue, Jan 24, 2012 at 7:20 AM, Avik Sil <email address hidden> wrote:
>> I'm getting another error while writing image to sd card with l-m-c:
>> http://paste.ubuntu.com/815093/. My host is lucid.
>
> That looks like a problem with the ubuntu-omap4-extras-config package:
>
> Setting up ubuntu-omap4-extras-config (1.30) ...
> start: Unknown job: ubuntu-omap4-extras-config
> invoke-rc.d: initscript ubuntu-omap4-extras-config, action "start" failed.
> dpkg: error processing ubuntu-omap4-extras-config (--configure):
>  subprocess installed post-installation script returned error exit status 1
> dpkg: dependency problems prevent configuration of
> hwpack-linaro-lt-panda-x11-base:
>  hwpack-linaro-lt-panda-x11-base depends on ubuntu-omap4-extras-config; however:
>  Package ubuntu-omap4-extras-config is not configured yet.
> dpkg: error processing hwpack-linaro-lt-panda-x11-base (--configure):
>  dependency problems - leaving unconfigured

It's basically the same issue as described initially by this bug, but
as the host system didn't have the same job available for upstart, it
failed when trying to start it at the chroot.

Revision history for this message
Miguel Angel Cabrera (mad-aluche) wrote :

I just tested the solution in comment #3 and it works fine. The SD is generated and then it boots. I don't know if there is any negative side effect with this solution.

For the record i uncompressed the tar.gz file system, created a policy-rc.d and compressed it again.

Revision history for this message
Miguel Angel Cabrera (mad-aluche) wrote :

By the way my problem was the same that the one in comment #5

Revision history for this message
Miguel Angel Cabrera (mad-aluche) wrote :

I just installed openssh-server and i noticed that is necessary to remove policy-rc.d from the installed filesystem because it is not necessary anymore.

Revision history for this message
Julien Dehaese (jeseahed) wrote :

I had the same issue as posted in comment #5 on a debian amd64 host and followed the same path as Miguel's (comment #8) and I confirm it works.

Fathi Boudra (fboudra)
Changed in linaro-image-tools:
assignee: nobody → Fathi Boudra (fboudra)
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
importance: Undecided → High
milestone: none → 2012.03
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
status: Confirmed → Fix Committed
Fathi Boudra (fboudra)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.