l-m-c with --rootfs btrfs fails because of unsupported -U option

Bug #705454 reported by Alexander Sack
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Linaro Image Tools
Fix Released
High
Loïc Minier

Bug Description

trying btrfs with 0.4.1 l-m-c fails like (using mkfs.btrfs from maverick):

Formating root partition

mkfs.btrfs: invalid option -- 'U'
usage: mkfs.btrfs [options] dev [ dev ... ]
options:
  -A --alloc-start the offset to start the FS
  -b --byte-count total number of bytes in the FS
  -d --data data profile, raid0, raid1, raid10 or single
  -l --leafsize size of btree leaves
  -L --label set a label
  -m --metadata metadata profile, values like data profile
  -n --nodesize size of btree nodes
  -s --sectorsize min block allocation
Btrfs Btrfs v0.19
Traceback (most recent call last):
  File "./linaro-media-create", line 99, in <module>
    args.should_format_bootfs, args.should_format_rootfs)
  File "/home/asac/Development/linaro/imaging/linaro-image-tools/linaro_media_create/partitions.py", line 77, in setup_partitions
    proc.wait()
  File "/home/asac/Development/linaro/imaging/linaro-image-tools/linaro_media_create/cmd_runner.py", line 46, in wait
    raise SubcommandNonZeroReturnValue(self._my_args, returncode)
linaro_media_create.cmd_runner.SubcommandNonZeroReturnValue: Sub process "['sudo', 'mkfs.btrfs', '-U', '7d9887a4-98af-4a5e-a69a-757d9da45a3c', '/dev/mmcblk0p2', '-L', 'rootfs']" returned a non-zero value: 1

Related branches

Alexander Sack (asac)
Changed in linaro-image-tools:
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Guilherme Salgado (salgado) wrote :

AIUI, l-m-c specifies the UUID when creating the filesystem so that it knows what to use on /etc/fstab later on. I can't seem to find a way to set the UUID of a btrfs; does anybody know how to do so?

If that's not possible maybe we'll have to let mkfs.btrfs generate the UUID itself (which I assume it does) and then query that later to use on /etc/fstab.

Loïc Minier (lool)
Changed in linaro-image-tools:
milestone: none → 0.4.2
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 705454] Re: l-m-c with --rootfs btrfs fails because of unsupported -U option

On Mon, 24 Jan 2011 13:04:18 -0000, Guilherme Salgado <email address hidden> wrote:
> AIUI, l-m-c specifies the UUID when creating the filesystem so that it
> knows what to use on /etc/fstab later on. I can't seem to find a way to
> set the UUID of a btrfs; does anybody know how to do so?
>
> If that's not possible maybe we'll have to let mkfs.btrfs generate the
> UUID itself (which I assume it does) and then query that later to use on
> /etc/fstab.

About how the Ubuntu installer does it:

<ogra> it likely calls blkid <device>
<cjwatson> yes, we just use blkid
<cjwatson> we have no need to force the UUID to a specific value in d-i
<cjwatson> partman-btrfs just lets mkfs.btrfs pick something

Thanks,

James

Revision history for this message
Loïc Minier (lool) wrote :

I think we should just generate the fs and read it's UUID, no matter what the fs

Loïc Minier (lool)
Changed in linaro-image-tools:
status: Confirmed → In Progress
assignee: nobody → Loïc Minier (lool)
Revision history for this message
Guilherme Salgado (salgado) wrote :

FWIW, this was not a regression introduced during the port to python.

Revision history for this message
Loïc Minier (lool) wrote :

With latest l-i-t, it should be possible to create btrfs images; they didn't boot for me in qemu as I was using an older hwpack, and that caused btrfs to fail to insmod.

Changed in linaro-image-tools:
status: In Progress → Fix Committed
Loïc Minier (lool)
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.