Comment 7 for bug 1549603

In a discussion I suggested that it would be a good alternative to supply a tool to do it, to repartition and reformat the pendrive.

We think the best method would be to build that tool into the SDC, and to access it via a button in the main window. The button can have the text 'Restore a USB drive for data storage', and the target, the USB drive is simply selected by the same box as is selectíng the target when flashing the content of the iso file. It would be possible (but not necessary) to let the user select a label.

So I took the bash script function mk_msdos from mkusb:

- modified it for this purpose
- wrapped it into a main program to make a verbose command line demo program, 'restore-pendrive'

The intention was to let some people test it. Four people have tested this demo program, and it does what we expect it should do.

- One alternative is to use the function mk_msdos with a minimal main program around it (not the verbose demo program we have now), and to call it via a system call from the SDC.

- Another and maybe better alternative is to build it into the SDC. I guess it means that it should be translated to python, and the echo command lines should be removed or replaced.

- Of course it is still an alternative to provide information via that button (or another button), but if the tool is there, we need no detailed information.

-----
$ md5sum restore-pendrive
78f8727194210ab633eaff1b4fd1f5a7 restore-pendrive
-----

Grab the attached file and run it in a bash shell :-) See the screenshots at the following link (post #13)

http://ubuntuforums.org/showthread.php?t=2314875&p=13446485#post13446485