linaro-media-create fails "umount: <dir>/binary/proc: not found"

Bug #660196 reported by John Stultz
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
Wishlist
Unassigned
linaro-image-tools (Ubuntu)
Fix Released
Undecided
Unassigned
Maverick
Fix Released
Undecided
Unassigned
Natty
Fix Released
Undecided
Unassigned

Bug Description

While following the qemu instructions here: https://wiki.linaro.org/Source/ImageInstallation I found linaro-media-create was failing with:

# linaro-media-create --image_file beagle_sd.img --image_size 4G --swap_file 200 --dev beagle --binary linaro-images/linaro-m-headless-tar-20101013-0.tar.gz
....
  cp: cannot stat `binary/usr/lib/u-boot/omap3_beagle/u-boot.bin': No such file or directory

Guessing that the hwpack was required, I copied the latest linaro-hwpack-install script to ~/bin/ and tried again. This time I got:

# linaro-media-create --image_file beagle_sd.img --image_size 4G --swap_file 200 --dev beagle --binary linaro-images/linaro-m-headless-tar-20101013-0.tar.gz --hwpack linaro-images/hwpack_linaro-omap3_20101013-49_armel_supported.tar.gz
...
[lots of "Unsupported ioctl: cmd=0xc020660b" messages]
...
  umount: /home/jstultz/linux/arm/binary/proc: not found

If I commenting out the line in install_hwpack(), it seems to complete successfully:
   trap "sudo umount ${chroot}/proc || true" EXIT

Related branches

Revision history for this message
Guilherme Salgado (salgado) wrote : Re: [Bug 660196] [NEW] linaro-media-create failes "umount: <dir>/binary/proc: not found"

On Wed, 2010-10-13 at 21:12 +0000, John Stultz wrote:
> Guessing that the hwpack was required, I copied the latest linaro-
> hwpack-install script to ~/bin/ and tried again. This time I got:
>
> # linaro-media-create --image_file beagle_sd.img --image_size 4G --swap_file 200 --dev beagle --binary linaro-images/linaro-m-headless-tar-20101013-0.tar.gz --hwpack linaro-images/hwpack_linaro-omap3_20101013-49_armel_supported.tar.gz
> ...
> [lots of "Unsupported ioctl: cmd=0xc020660b" messages]
> ...
> umount: /home/jstultz/linux/arm/binary/proc: not found
>
>
> If I commenting out the line in install_hwpack(), it seems to complete successfully:
> trap "sudo umount ${chroot}/proc || true" EXIT

This line is there just to make sure we umount the chroot's /proc in
case anything causes the script to exit earlier. It won't, by itself,
cause the script to fail thanks to the "|| true" at the end, so I
suspect there was something else that failed earlier. Can you try and
reproduce the error?

 subscribe

Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote : Re: linaro-media-create failes "umount: <dir>/binary/proc: not found"

This report doesn't quite make sense.

The umount in the trap failing cannot possibly make the whole script fail -- by the time it's run, all the other work that the script does has been done! So if it failed before, it failed before that point. and it's hard to see how removing it could make something that failed before succeed. No idea what, of course :/

Revision history for this message
John Stultz (jstultz) wrote :

Bah. Apologies.

So it ends up the stray unmount error message that shows up right as the script completes threw me off. Even though the error message shows up, the image is created and can almost boot (hits the qemu nand bug, but that's a separate issue).

I had confused this earlier when I had forgotten to copy over the linaro-hwpack-install script to my ~/bin/ and the script error-ed out without creating a proper image, but again printing the umount error message. After installing the linaro-hwpack-install script, I saw the message again and assumed it failed in the same way.

Maybe just to avoid confusion the line could be changed to:
   trap "sudo umount ${chroot}/proc &> /dev/null || true" EXIT

?

John Stultz (jstultz)
summary: - linaro-media-create failes "umount: <dir>/binary/proc: not found"
+ linaro-media-create fails "umount: <dir>/binary/proc: not found"
Changed in linaro-image-tools:
status: New → Triaged
importance: Undecided → Wishlist
Steve Langasek (vorlon)
Changed in linaro-image-tools (Ubuntu Natty):
status: New → Fix Committed
Changed in linaro-image-tools (Ubuntu Maverick):
status: New → Fix Committed
Changed in linaro-image-tools:
status: Triaged → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Please test proposed package

Accepted linaro-image-tools into maverick-proposed, the package will build now and be available in a few hours. Please test and give feedback here. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Thank you in advance!

tags: added: verification-needed
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linaro-image-tools - 0.3

---------------
linaro-image-tools (0.3) maverick-proposed; urgency=low

  [ Steve Langasek ]
  * no longer using the 'omap' uboot flavor support in live-helper; instead,
    run the mkimage commands directly for omap.
  * fix the paths used for looking up x-loader and u-boot binaries in the
    tarball; these don't belong in /boot at all, pull them from /usr/lib.
  * only enforce the presence of commands we're actually using; this lets
    us automatically pull in btrfs-tools when btrfs is specified.
  * add sudo to a couple more commands in linaro-media-create, so the script
    itself can run as non-root as intended.

  [ James Westby ]
  * Add a linaro-hwpack-create script for the creation of hardware packs.

  [ Steve Langasek ]
  * Fix lookup of linaro-hwpack-install to work correctly when l-m-c is on
    the path. Closes: #652669.

  [ Loïc Minier ]
  * Drop spurious single quote character in boot_args_options for beagle|igep;
    thanks Peter Maydell; LP: #667400.
  * Set LC_ALL=C when entering the chroot as it has no locales. LP: #651905.

  [ Tom Gall ]
  * Use --numeric-owner argument to tar when unpacking, so that files get
    the right owner on boot of the image. LP: #652121.

  [ Dave Martin ]
  * Implement proper cleanup handling on signal / exit, so that we don't
    leave clutter behind on error. This also fixes the message at the end of
    a successful install about being unable to unmount proc. LP: #616385,
    #660196, #667394, #643601, #627383.
 -- Steve Langasek <email address hidden> Tue, 09 Nov 2010 12:50:26 -0800

Changed in linaro-image-tools (Ubuntu Maverick):
status: Fix Committed → Fix Released
Steve Langasek (vorlon)
Changed in linaro-image-tools (Ubuntu Maverick):
status: Fix Released → Fix Committed
Changed in linaro-image-tools (Ubuntu Natty):
status: Fix Committed → Fix Released
Changed in linaro-image-tools (Ubuntu Maverick):
status: Fix Committed → Fix Released
Revision history for this message
Guilherme Salgado (salgado) wrote :

The changelog mentions this bug as being fixed but that's actually wrong -- the bug was fixed on 2011-02-01: http://bazaar.launchpad.net/~linaro-maintainers/linaro-image-tools/trunk/revision/281

Changed in linaro-image-tools:
status: Fix Released → Fix Committed
Loïc Minier (lool)
Changed in linaro-image-tools (Ubuntu Natty):
status: Fix Released → Fix Committed
Changed in linaro-image-tools (Ubuntu Maverick):
status: Fix Released → Fix Committed
Loïc Minier (lool)
Changed in linaro-image-tools:
status: Fix Committed → Fix Released
Loïc Minier (lool)
Changed in linaro-image-tools (Ubuntu):
status: Fix Committed → Fix Released
Changed in linaro-image-tools (Ubuntu Maverick):
status: Fix Committed → Fix Released
Changed in linaro-image-tools (Ubuntu Natty):
status: Fix Committed → Fix Released
Revision history for this message
Adrien Ferré (ferre-adrien) wrote :

Still having this bug with:

sudo linaro-media-create --rootfs ext3 --mmc /dev/sdb --binary linaro-n-ubuntu-desktop-tar-20110824-1.tar.gz --hwpack hwpack_linaro-igep_20110823-0_armel.tar.gz --dev beagle

Bug:
cp: cannot stat `/tmp/tmpizVz9G/binary/usr/lib/u-boot/omap3_beagle/u-boot.bin': No such file or directory
Traceback (most recent call last):
  File "/usr/bin/linaro-media-create", line 161, in <module>
    args.is_live, args.is_lowmem, args.consoles)
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/media_create/boards.py", line 480, in populate_boot
    proc.wait()
  File "/usr/lib/pymodules/python2.7/linaro_image_tools/cmd_runner.py", line 100, in wait
    raise SubcommandNonZeroReturnValue(self._my_args, returncode)
linaro_image_tools.cmd_runner.SubcommandNonZeroReturnValue: Sub process "['cp', '-v', '/tmp/tmpizVz9G/binary/usr/lib/u-boot/omap3_beagle/u-boot.bin', '/tmp/tmpizVz9G/boot-disc']" returned a non-zero value: 1

Revision history for this message
James Westby (james-w) wrote : Re: [Bug 660196] Re: linaro-media-create fails "umount: <dir>/binary/proc: not found"

On Tue, 13 Sep 2011 13:43:59 -0000, Adrien Ferré <email address hidden> wrote:
> Still having this bug with:
>
> sudo linaro-media-create --rootfs ext3 --mmc /dev/sdb --binary linaro-n
> -ubuntu-desktop-tar-20110824-1.tar.gz --hwpack hwpack_linaro-
> igep_20110823-0_armel.tar.gz --dev beagle
>
> Bug:
> cp: cannot stat `/tmp/tmpizVz9G/binary/usr/lib/u-boot/omap3_beagle/u-boot.bin': No such file or directory
> Traceback (most recent call last):
> File "/usr/bin/linaro-media-create", line 161, in <module>
> args.is_live, args.is_lowmem, args.consoles)
> File "/usr/lib/pymodules/python2.7/linaro_image_tools/media_create/boards.py", line 480, in populate_boot
> proc.wait()
> File "/usr/lib/pymodules/python2.7/linaro_image_tools/cmd_runner.py", line 100, in wait
> raise SubcommandNonZeroReturnValue(self._my_args, returncode)
> linaro_image_tools.cmd_runner.SubcommandNonZeroReturnValue: Sub process "['cp', '-v', '/tmp/tmpizVz9G/binary/usr/lib/u-boot/omap3_beagle/u-boot.bin', '/tmp/tmpizVz9G/boot-disc']" returned a non-zero value: 1

Hi,

What version of linaro-media-create is this? I think this might have
been fixed recently.

Thanks,

James

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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