when creating a partition of type fat, don't specify label

Bug #1703063 reported by Amrith Kumar
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
diskimage-builder
Fix Released
Undecided
Amrith Kumar

Bug Description

When making an ext[234] partition, you can specify a volume label on the command line to mkfs with the -L option. This is however not a part of the options of mkfs; only of mke2fs [see man 8 mke2fs].

mkfs.fat provides no such thing [see man 8 mkfs.fat]

As a result, when creating a partition of type fat, I get the following failure in dib (see attach.txt, attached).

Here's the quick test of the failing command

$ sudo mkfs -t fat -L mkfs_boot /dev/mapper/loop0p5
mkfs.fat 3.0.28 (2015-05-16)
mkfs.fat: invalid option -- 'L'
Unknown option: ?
Usage: mkfs.fat [-a][-A][-c][-C][-v][-I][-l bad-block-file][-b backup-boot-sector]
       [-m boot-msg-file][-n volume-name][-i volume-id]
       [-s sectors-per-cluster][-S logical-sector-size][-f number-of-FATs]
       [-h hidden-sectors][-F fat-size][-r root-dir-entries][-R reserved-sectors]
       [-M FAT-media-byte][-D drive_number]
       [--invariant]
       [--help]
       /dev/name [blocks]

Revision history for this message
Amrith Kumar (amrith) wrote :
Changed in diskimage-builder:
assignee: nobody → Amrith Kumar (amrith)
Revision history for this message
Amrith Kumar (amrith) wrote :

the correct option for fat and vfat is -n, the fix is trivial, I'll push it up shortly.

Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix proposed to diskimage-builder (master)

Fix proposed to branch: master
Review: https://review.openstack.org/481787

Changed in diskimage-builder:
status: New → In Progress
Revision history for this message
OpenStack Infra (hudson-openstack) wrote : Fix merged to diskimage-builder (master)

Reviewed: https://review.openstack.org/481787
Committed: https://git.openstack.org/cgit/openstack/diskimage-builder/commit/?id=59f416ae2082b026497d3b46cc805e3906553cec
Submitter: Jenkins
Branch: master

commit 59f416ae2082b026497d3b46cc805e3906553cec
Author: Amrith Kumar <email address hidden>
Date: Fri Jul 7 22:26:48 2017 -0400

    The correct option for label name in fat and vfat is '-n'

    The code in mkfs correctly extends the command line with a '-n' for
    vfat but does not currently do it for fat. This means that mkfs for
    fat ends up with a '-L' which is what you'd do for everything like
    ext[234].

    The change just treats fat like vfat in the one place where this check
    is required.

    Change-Id: If65dfd949acdadff33a564640fb42ea73026a786
    Closes-Bug: #1703063

Changed in diskimage-builder:
status: In Progress → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

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