Mon, 11 Feb 2008

Creating live Fedora USB sticks, in Windows!

Last weekend I sat down and developed the liveusb-creator, a tool for creating live Fedora USB sticks from Windows. It will automatically detect all removable drives, find your ISO, extract it to your USB key, modify the syslinux.cfg, and install the bootloader. Technical details aside for a moment, the end-user workflow turns out to be something like this:

At the moment it is a simple a console application that asks the user if it has any questions (by default it won't), and then gets the job done. So shortly after announcing this tool, I started throwing together a graphical interface using PyGTK. While I was doing this, Kushal Das was on the other side of the planet working on a PyQT version :) It turns out his code is much cleaner than my gtk implementation, so I went ahead and committed it. Furthermore, I'm pretty excited to get a chance to play with The Other widget toolkit for once ;)

So, detecting removable devices and such is *trivial* in Windows using the powerfully-undocumented win32api Python module (after playing a few rounds of "match the return code to the enum", of course). Ideally, I want this tool to work in both Linux and Windows, so I redesigned the code quite a bit, broke it out into various modules, and recently started working on the Linux side of things. At this point in time, there is now code that detects removable drives using dbus and HAL. I still have a bunch of sanity checking and other bits to write, but progress is definitely being made. In the mean time for Linux users, see the USBHowTo for creating a live USB stick using the livecd-iso-to-disk tool.

If you're interested in helping out with the liveusb-creator, you can get ahold of the source code using git:

git clone git://git.fedorahosted.org/git/liveusb-creator.git
If you encounter any problems, please create a new ticket at the liveusb-creator trac.


posted at: 14:38 | link | Tags: , , , | 134 comments