curtin is unable to create whole disk fat/vfat formats

Bug #1597923 reported by Wesley Wiedenmeier
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
curtin
Fix Released
Undecided
Wesley Wiedenmeier
curtin (Ubuntu)
Fix Released
Undecided
Unassigned
Xenial
Fix Released
Undecided
Unassigned

Bug Description

[Impact]

 * Curtin is unable to create FAT/VFAT filesystems on whole disks. The FAT
   filesystem creation utilities do not, by default, support creating a
   FAT filesystem against an unpartitioned device.

   Curtin has been updated to support passing a force flag to the
   utilities to allow custom storage configurations to use FAT/VFAT
   filesystems against such a device.

[Test Case]

 * Install proposed curtin package and deploy Ubuntu to target system
   specifying a VFAT filesystem on top of a whole block device.

  PASS: Ubuntu installation succeeds

  FAIL: Ubuntu installation fails when attempting to format the block
        device on which the VFAT filesystem would reside.

[Regression Potential]

 * Other OSes which may attempt to mount and read a VFAT filesystem
   created in so-called 'superfloppy' format might not recognize the
   filesystem.

[Original Description]
The mkfs.fat and mkfs.vfat tools do not by default permit the creation of a filesystem on a disk that has not been partitioned. This is not really a limitation of the filesystems themselves; it is just a safety feature to keep people from accidentally overwriting data.

Since some curtin users may have a need for whole disk fat/vfat filesystems, it makes sense to use the '-I' flag for mkfs.vfat commands, which forces the tools to work on whole disks. It appears that this flag does not interfere with any of the other options in mkfs, and so is essentially a force flag, and can just be added to family_flag_mappings in block.mkfs

Related branches

Changed in curtin:
status: New → In Progress
assignee: nobody → Wesley Wiedenmeier (wesley-wiedenmeier)
Changed in curtin:
status: In Progress → Fix Committed
Ryan Harper (raharper)
description: updated
Revision history for this message
Andy Whitcroft (apw) wrote : Please test proposed package

Hello Wesley, or anyone else affected,

Accepted curtin into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/curtin/0.1.0~bzr425-0ubuntu1~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

tags: added: verification-needed
Andy Whitcroft (apw)
Changed in curtin (Ubuntu):
status: New → Fix Released
Changed in curtin (Ubuntu Xenial):
status: New → Fix Committed
Revision history for this message
Wesley Wiedenmeier (wesley-wiedenmeier) wrote :

I'm marking verification-done, as curtin successfully creates whole disk fat partitions using the version in proposed. An example config file is attached.

On system used for curtin pack:

  # apt-cache policy curtin
     curtin:
       Installed: 0.1.0~bzr425-0ubuntu1~16.04.1
       Candidate: 0.1.0~bzr425-0ubuntu1~16.04.1

Note that the failure that this bug was reported for seems to only affect trusty and precise, and the mkfs.vfat tool on xenial seems to write whole disk partitions without the -I flag. However, it is still more correct to use the flag as the expected behavior of mkfs.vfat is to refuse to partition without the flag. This fix should also be SRU'ed to trusty

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

This bug was fixed in the package curtin - 0.1.0~bzr425-0ubuntu1~16.04.1

---------------
curtin (0.1.0~bzr425-0ubuntu1~16.04.1) xenial-proposed; urgency=medium

  [ Scott Moser ]
  * debian/new-upstream-snapshot: add writing of debian changelog entries.

  [ Ryan Harper ]
  * New upstream snapshot.
    - unittest,tox.ini: catch and fix issue with trusty-level mock of open
    - block/mdadm: add option to ignore mdadm_assemble errors (LP: #1618429)
    - curtin/doc: overhaul curtin documentation for readthedocs.org
      (LP: #1351085)
    - curtin.util: re-add support for RunInChroot (LP: #1617375)
    - curtin/net: overhaul of eni rendering to handle mixed ipv4/ipv6 configs
    - curtin.block: refactor clear_holders logic into block.clear_holders and
      cli cmd
    - curtin.apply_net should exit non-zero upon exception. (LP: #1615780)
    - apt: fix bug in disable_suites if sources.list line is blank.
    - vmtests: disable Wily in vmtests
    - Fix the unittests for test_apt_source.
    - get CURTIN_VMTEST_PARALLEL shown correctly in jenkins-runner output
    - fix vmtest check_file_strippedline to strip lines before comparing
    - fix whitespace damage in tests/vmtests/__init__.py
    - fix dpkg-reconfigure when debconf_selections was provided.
      (LP: #1609614)
    - fix apt tests on non-intel arch
    - Add apt features to curtin. (LP: #1574113)
    - vmtest: easier use of parallel and controlling timeouts
    - mkfs.vfat: add force flag for formating whole disks (LP: #1597923)
    - block.mkfs: fix sectorsize flag (LP: #1597522)
    - block_meta: cleanup use of sys_block_path and handle cciss knames
      (LP: #1562249)
    - block.get_blockdev_sector_size: handle _lsblock multi result return
      (LP: #1598310)
    - util: add target (chroot) support to subp, add target_path helper.
    - block_meta: fallback to parted if blkid does not produce output
      (LP: #1524031)
    - commands.block_wipe: correct default wipe mode to 'superblock'
    - tox.ini: run coverage normally rather than separately
    - move uefi boot knowledge from launch and vmtest to xkvm

 -- Ryan Harper <email address hidden> Mon, 03 Oct 2016 13:43:54 -0500

Changed in curtin (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Martin Pitt (pitti) wrote : Update Released

The verification of the Stable Release Update for curtin has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Scott Moser (smoser) wrote : Fixed in Curtin 17.1

This bug is believed to be fixed in curtin in 17.1. If this is still a problem for you, please make a comment and set the state back to New

Thank you.

Changed in curtin:
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

Bug attachments

Remote bug watches

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