USBCreatorMaverick

Differences between revisions 1 and 9 (spanning 8 versions)
Revision 1 as of 2010-05-18 10:03:57
Size: 3947
Editor: eth0
Comment:
Revision 9 as of 2010-05-24 17:56:06
Size: 4797
Editor: eth0
Comment:
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
##(see the SpecSpec for an explanation)

* '''Launchpad Entry''': UbuntuSpec:foo
 * '''Launchpad Entry''': UbuntuSpec:foundations-m-usb-creator-bugfixer
Line 5: Line 3:
 * '''Contributors''':
 * '''Packages affected''':
 * '''Contributors''': EvanDandrea,
 * '''Packages affected''': usb-creator-gtk, usb-creator-kde
Line 10: Line 8:
This should provide an overview of the issue/functionality/change proposed here. Focus here on what will actually be DONE, summarising that so that other people don't have to read the whole spec. See also CategorySpec for examples. usb-creator will be modified to use GRUB2 as the default bootloader. Care will be taken to fall back to syslinux on pre-Maverick Ubuntu CDs.

The interface will be streamlined for the common case of putting an Ubuntu ISO on a partition.
Line 14: Line 14:
This section should include a paragraph describing the end-user impact of this change. It is meant to be included in the release notes of the first release in which it is implemented. (Not all of these will actually be included in the release notes, at the release manager's discretion; but writing them is a useful exercise.)

It is mandatory.
The Startup Disk Creator application now creates a single directory ("boot") to store all of its files on your USB disk. Its interface has also been improved to streamline the common use case.
Line 20: Line 18:
This should cover the _why_: why is this change being proposed, what justifies it, where we see this justified.  * Using GRUB2 allows us to reduce the contents needed on the USB disk for usb-creator to a directory (/boot) and two files (grub.cfg and the ISO file).
 * The interface for selecting the target device is currently very confusing. The user must understand the difference between a disk device and a partition device. They must also understand that clicking on "Wipe Disk" will in fact clear the contents of the entire disk device, regardless of whether they selected the disk or one of its partitions.
Line 24: Line 23:
 * Bill wants to use his !SanDisk Cruzer Micro as a startup disk. He starts usb-creator, selects an ISO file he's downloaded, and then selects the only target option, his !SanDisk Cruzer Micro. He presses "Make Startup Disk".
Line 25: Line 25:

UbuntuSpec:foundations-m-cd-boot is implemented.
Line 28: Line 30:
You can have subsections that better describe specific parts of the issue.  * The "Wipe Disk" button will be greyed out and its label changed to "Formatting" for any disk that is currently being formatted.
 * The destination treeview will contain only one item for each set of a disk block device and its partition block devices.
 * The error messages presented by usb-creator will be reviewed to ensure they are clear and descriptive of the error, and do not simply say "Installation failed."
 * A "Test USB disk" button will be added to the "Install Complete" dialog.
Line 32: Line 37:
This section should describe a plan of action (the "how") to implement the changes discussed. Could include subsections like: === Correcting the behavior of the format button ===
Line 34: Line 39:
=== UI Changes === The devices structure will carry an additional boolean flag for each device that designates whether or not the device is being formatted. The frontend will check this flag and, if the device is selected, grey out the format button and change its label to "formatting". Selecting a device that isn't being formatted will return the button state to normal.
Line 36: Line 41:
Should cover changes required to the UI, or specific UI that is required to implement this === Only show the smartest option for each device ===
Line 38: Line 43:
=== Code Changes === The label for the destination device will always be sourced from the vendor and model of the device, as obtained by udisks. This will clear up confusion as to what the "Wipe Disk" button erases, in addition to making the selection understandable to non-technical users.
Line 40: Line 45:
Code changes should include an overview of what needs to change, and in some cases even the specific details. A set of rules will govern what partition will be installed to:
 * If a filesystem is written directly to the disk, use the disk device.
 * If no partition table exists on the device and no filesystem exists on the device, require a format before use.
 * If a partition table exists, but no partitions exist, require a format before use.
 * If several usable partitions exist, use the first.
 * If a disk image is selected in the source treeview, use the disk device.
Line 42: Line 52:
=== Migration === This set of rules will live in the backend, which will simply expose a single device to the frontend.
Line 44: Line 54:
Include:
 * data migration, if any
 * redirects from old URLs to new ones, if any
 * how users will be pointed to the new way of doing things, if necessary.
=== Better error handling ===

When an exception is caught, usb-creator will hand the error to apport, after handling it itself.

=== Only write the ISO to the disk (support GRUB2) ===

Instead of writing the contents of the ISO image, we will leverage grub2's ability to boot straight from an ISO image ({{{iso-scan/filename=}}}). usb-creator will create a {{{boot/}}} directory, and place the ISO image and a grub configuration file in it. When the ISO is finished copying, usb-creator will loop mount it and verify the MD5 checksums.

The supported filesystems will be expanded from VFAT to the set of filesystems that GRUB2 supports booting from (VFAT, NTFS, ext, ...).

If the source CD is older than Maverick, we will fall back to the old functionality of writing the contents of the ISO to a disk.

=== Test USB disk ===

The "Test USB disk" button on the "Installation Complete" dialog will run the USB disk in KVM. The button will only be present if {{{kvm-ok}}} returns 0.
Line 51: Line 72:
It's important that we are able to test new features, and demonstrate them to users. Use this section to describe a short plan that anybody can follow that demonstrates the feature is working. This can then be used during testing, and to show off after release. Please add an entry to http://testcases.qa.ubuntu.com/Coverage/NewFeatures for tracking test coverage.

This need not be added or completed until the specification is nearing beta.

== Unresolved issues ==

This should highlight any issues that should be addressed in further specifications, and not problems with the specification itself; since any specification with problems cannot be approved.

== BoF agenda and discussion ==

{{{
= Bugs =
 * Show Manufactuer name instead of device name (Eg Acme Disk rather than /dev/sdb)
 * do not display /dev/sdb and /dev/sdb1;
  * Only offer the "smartest" choice in the UI.
    - If they don't have a partition table, then behind the scenes only offer the full disk device
    - If they do have a partition table, then behind the scenes only offer the partition device
 * Make startup disk button needs to be greyed out when disk and iso are not selected (no bug reported - file bug)
 * Detect other filesystem quirks and force format (FAT16 or USB key that has no partition table i.e. partition direct on device - unless --whole-disk is used)
 * when formatting show more feedback than just a spinning cursor.
  * target/destination box should show you that it is "Formating..." and allow you to format other disks
 * verify the disk after we write it out - do md5summing by reading back from flash

= If we move to Grub2 for disks =
 * Other file system support
   - Support existing NTFS disk support
   - Support ext3/ext4
 * Only putting a .iso on the disk and use grub's loopback (in conjunction with `iso-scan/filename=`)


= Random Ideas =
 * automated tests?
 * better messages for internal failures
 * allow apport to report crashes?
 * better message if you try to install something that's not an ubuntu iso
 * clone an existing usb stick (allowing for different sizes; might cause ui confusion)
 * We can try kvm-qemu boot to verify ISO
 * look at competition and steal ideas (e.g. Fedora)
}}}
 * We will endeavor to resurrect the test suite for usb-creator to cover the new functionality as well as cover existing code.
 * If time allows, we will investigate integrating usb-creator into the continuous integration system created in UbuntuSpec:foundations-m-upgrade-and-install-testing, using Sikuli as well as usb-creator's existing test harness.

Summary

usb-creator will be modified to use GRUB2 as the default bootloader. Care will be taken to fall back to syslinux on pre-Maverick Ubuntu CDs.

The interface will be streamlined for the common case of putting an Ubuntu ISO on a partition.

Release Note

The Startup Disk Creator application now creates a single directory ("boot") to store all of its files on your USB disk. Its interface has also been improved to streamline the common use case.

Rationale

  • Using GRUB2 allows us to reduce the contents needed on the USB disk for usb-creator to a directory (/boot) and two files (grub.cfg and the ISO file).
  • The interface for selecting the target device is currently very confusing. The user must understand the difference between a disk device and a partition device. They must also understand that clicking on "Wipe Disk" will in fact clear the contents of the entire disk device, regardless of whether they selected the disk or one of its partitions.

User stories

  • Bill wants to use his SanDisk Cruzer Micro as a startup disk. He starts usb-creator, selects an ISO file he's downloaded, and then selects the only target option, his SanDisk Cruzer Micro. He presses "Make Startup Disk".

Assumptions

foundations-m-cd-boot is implemented.

Design

  • The "Wipe Disk" button will be greyed out and its label changed to "Formatting" for any disk that is currently being formatted.
  • The destination treeview will contain only one item for each set of a disk block device and its partition block devices.
  • The error messages presented by usb-creator will be reviewed to ensure they are clear and descriptive of the error, and do not simply say "Installation failed."
  • A "Test USB disk" button will be added to the "Install Complete" dialog.

Implementation

Correcting the behavior of the format button

The devices structure will carry an additional boolean flag for each device that designates whether or not the device is being formatted. The frontend will check this flag and, if the device is selected, grey out the format button and change its label to "formatting". Selecting a device that isn't being formatted will return the button state to normal.

Only show the smartest option for each device

The label for the destination device will always be sourced from the vendor and model of the device, as obtained by udisks. This will clear up confusion as to what the "Wipe Disk" button erases, in addition to making the selection understandable to non-technical users.

A set of rules will govern what partition will be installed to:

  • If a filesystem is written directly to the disk, use the disk device.
  • If no partition table exists on the device and no filesystem exists on the device, require a format before use.
  • If a partition table exists, but no partitions exist, require a format before use.
  • If several usable partitions exist, use the first.
  • If a disk image is selected in the source treeview, use the disk device.

This set of rules will live in the backend, which will simply expose a single device to the frontend.

Better error handling

When an exception is caught, usb-creator will hand the error to apport, after handling it itself.

Only write the ISO to the disk (support GRUB2)

Instead of writing the contents of the ISO image, we will leverage grub2's ability to boot straight from an ISO image (iso-scan/filename=). usb-creator will create a boot/ directory, and place the ISO image and a grub configuration file in it. When the ISO is finished copying, usb-creator will loop mount it and verify the MD5 checksums.

The supported filesystems will be expanded from VFAT to the set of filesystems that GRUB2 supports booting from (VFAT, NTFS, ext, ...).

If the source CD is older than Maverick, we will fall back to the old functionality of writing the contents of the ISO to a disk.

Test USB disk

The "Test USB disk" button on the "Installation Complete" dialog will run the USB disk in KVM. The button will only be present if kvm-ok returns 0.

Test/Demo Plan

  • We will endeavor to resurrect the test suite for usb-creator to cover the new functionality as well as cover existing code.
  • If time allows, we will investigate integrating usb-creator into the continuous integration system created in foundations-m-upgrade-and-install-testing, using Sikuli as well as usb-creator's existing test harness.


CategorySpec

FoundationsTeam/Specs/USBCreatorMaverick (last edited 2010-10-14 18:44:17 by 99-156-85-10)