Ubuntu Open Week - usb-creator - Evan Dandrea - Thu, Nov 6th, 2008
19:02 jcastro And now we have Evan Dandrea, who will be discussing usb-creator 19:02 jcastro a new feature in 8.10! 19:03 jcastro take it away evand! 19:03 evand My name is Evan Dandrea, and I work on the Installer Team for Canonical. I am the primary author of usb-creator. 19:03 evand Is there a volunteer to field questions from -chat? 19:04 jcastro evand: looks like you're on your own. :D 19:04 evand hooray :) 19:04 evand ok 19:04 evand I'm going to (hopefully) briefly speak about what usb-creator is, where it stands, and where it's going, as well as how you can help make it awesome, and then field questions. Though if you have a question about a specific point I make, please feel free to interrupt. 19:05 evand usb-creator was started out of the need to provide an installation medium for systems without a CD-ROM drive and as a way of providing a much faster installation. 19:05 evand It was decided to create a desktop program that writes a CD or ISO file to a USB disk rather than autogenerate images on http://cdimage.ubuntu.com because space and bandwidth on cdimage are already maxed out, and because a tool would still be needed to write the generated image to a disk. 19:05 evand Incidentally, this is part of the reason why hybrid CDs do not solve the fundamental problem that usb-creator was created for. A tool is still needed to write the image to disk and to create a persistence file, if requested. 19:06 evand For more details on this, the original specification for usb-creator can be found here: 19:06 evand https://wiki.ubuntu.com/USBInstallationImages 19:06 evand There was much more work than just writing usb-creator, as proper support for USB disk installs has been a long standing series of bugs. 19:07 evand Briefly, this included making sure that the installer did not let you install to a USB disk if it was also the installation source media, adding root-by-uuid support to GRUB and grub-installer so that disk ordering issues, such as when you remove a USB disk after install, should no longer break the bootloader configuration, and making sure the installer selected a reasonable default when installing from a USB disk (e.g. not hd0). 19:08 evand jcastro: can you +v homy ? 19:08 evand Right, so that's briefly why we have the tool. 19:09 evand thanks 19:09 evand If you have 8.10 installed, you should have a "Create a USB disk" entry in System -> Administration 19:10 evand If you run this and insert a CD and USB disk, or select an ISO file from your desktop, it will write the contents of that CD image to the USB disk, making some modifications to the bootloader configuration 19:11 evand these are just to add things like persistence support, removing the "remove the CD and press enter to continue" message, and a hint to the alternate installer that you're using a USB disk as an install source 19:11 evand It also, if you elect to specify a persistence size, writes a persistence file to the USB disk 19:11 homy QUESTION: <weboide> does it support any cdimage of ubuntu and any distro? 19:11 evand this will allow you to make changes to the booted usb disk and have them save even after you've rebooted 19:12 evand It supports any Ubuntu derived distribution 19:12 evand It *might* work with Debian CDs, but I honestly haven't tested that 19:13 evand It will work with both desktop and alternate Ubuntu, Kubuntu, Mythbuntu, and Xubuntu CDs for both i386 and amd64 archs. 19:13 homy QUESTION: <janitux> the persistence is only for files inside the user's home, or it can save changes like apps or changes in the theme? 19:14 evand It's the entire filesystem, so you can install programs, change the wallpaper, write documents, etc 19:14 evand casper (the live CD initramfs) supports making only home persistent, but usb-creator only supports making all of / persistent at the moment 19:15 evand Continuing, once usb-creator finishes, you can reboot your computer with the USB disk inserted and boot from it 19:16 evand you may have to enter your boot menu to access it 19:16 evand it operates much like a regular Ubuntu CD does 19:16 evand except, as mentioned, your changes are saved, assuming you enabled persistence 19:17 evand Onto future plans... 19:17 evand It has always been the plan to support usb-creator on GNOME, KDE, and Windows, but it was only feasible to develop the initial GNOME frontend in the 8.10 cycle. 19:17 evand That said, KDE and Windows frontends are planned for 9.04, with a branch already created by a contributor to start work on the former. 19:18 evand I have not planned a Mac frontend and backend at this time as it is my understanding that Apple's firmware is broken and does not properly support booting "legacy" operating systems from USB devices. 19:19 evand However I cannot test this beyond my somewhat aging 2006 iMac and have been unable to dig up much information on the problem. If anyone has experience in this area or knows more about the issue, please let me know. 19:19 evand In addition to new frontends and backends, after discussions with probono and the ubuntu-devel mailing list, it was decided that we should embed gnome-app-install into usb-creator to allow the user to select additional software to include on the USB disk: 19:20 evand The full thread on that can be found here: https://lists.ubuntu.com/archives/ubuntu-devel/2008-October/026698.html 19:22 evand Obviously, bug fixing is going to be a major focus in further development. 19:22 evand A number of early users ran into problems when using usb-creator because it only wrote a bootloader to the partition it was being installed on, rather than the MBR of the device. 19:23 evand This was decided as part of the goal as being as unintrusive as possible (it also only formats the device if it really has to and will happily coexist with other files on a vfat partition). 19:23 evand Unfortunately, many scenarios require that a bootloader be written to the MBR, and during the final release candidate freeze, I changed usb-creator to always write a bootloader to the MBR, but it was unfortuantely too late to get the change in the 8.10 final release. 19:24 evand However, you can expect it and additional bug fixes in a Stable Release Update of usb-creator soon, as well as a backport of that update to 8.04.1. 19:24 evand Some thoughts on getting involved... 19:25 evand There has already been a few new branches of usb-creator created to fix bugs, add new functionality, and even provide new frontends. I encourage anyone interested in helping to develop usb-creator to branch off of trunk and start poking around the source code: 19:25 evand bzr branch lp:usb-creator usb-creator.trunk 19:25 evand I lurk in #ubuntu-installer and can answer any usb-creator development questions you have there, or via private message. 19:26 evand If you encounter any bugs in usb-creator, please file them here: 19:26 evand http://launchpad.net/ubuntu/+source/usb-creator/+bugs 19:27 evand Please look to see if your bug has already been filed though. 19:27 evand At a minimum I will need a detailed description of the problem in order to fix it. 19:28 evand The output of hal-device as an attachment and sudo parted /dev/sdb print (where sdb is your usb disk) often helps 19:29 evand One final note... 19:29 evand I suspect many of you are not aware that Canonical is selling USB disks with Ubuntu (and 3GB of persistent storage) on them via its international shop (http://shop.canonical.com) and very soon on its US shop (http://usshop.ubuntu.com). 19:30 evand Having been tasked with generating the images for these disks using usb-creator, I've spent a fair amount of time using them and can attest to their build quality. I've never owned a usb disk (and I've had a fair number of them) that felt as solid as these do. 19:30 evand It makes no difference to me if you buy one, but I figured I'd mention them as I was thoroughly impressed with the design and would pick up one myself if I didn't already have a test copy :) 19:31 evand Apologies for kind of speeding through this, but I wanted to leave plenty of time for questions as this is a very new project and I suspect there may be quite a few. 19:31 evand So, any questions? 19:33 evand QUESTION: < Inteysedut> "starting up" followed by freeze what can I do? 19:33 evand (turning that into a question myself ;) 19:34 evand Please file a bug. Attach the output of `ps auxf` and strace -p $PID -o strace.log where pid is the process ID of install.py 19:35 evand the strace command will run as long as usb-creator is running, so just let it run for about a minute or so and then Ctrl-C it 19:36 evand jcastro: can you +v homy again? 19:36 evand QUESTION: Is it working in kubuntu now? 19:37 evand There is no Kubuntu frontend yet. 19:37 evand It's in development for 9.04 19:37 evand There was an issue running usb-creator from Kubuntu (it was missing dependencies) 19:37 evand That should have been fixed in usb-creator 0.1.10 19:39 evand If it still doesn't work in Kubuntu, please attach ~/.usb-creator and /var/crash/*usb-creator* to a new bug report. 19:40 homy QUESTION: <johnsgruber> How new does a computer need to be to be able to boot from USB? 19:40 evand It just needs to be able to boot from USB disks 19:40 evand you can usually find this out by entering the boot menu on your computer 19:41 evand and if it has an option like "USB device" then you should be able to use usb-creator just fine 19:42 evand I suspect any computer made within the past 3-4 years will be ok, but I could be horribly, horrbily wrong :) 19:42 evand horribly* 19:42 homy QUESTION: <knome> Even if I couldn't boot from USB stick, I can create a CD with a boot menu, right? 19:43 evand Not using usb-creator, but yes, there are instructions on the wiki for customizing Ubuntu CDs... 19:43 evand https://help.ubuntu.com/community/LiveCDCustomization 19:44 evand oh 19:44 evand I think I misread the question 19:44 evand It depends on what your BIOS supports 19:44 evand But yes, you might be able to get away with chainloading to the usb disk 19:44 homy QUESTION: <ilia> Can I somehow use this project results to install from locally downloaded iso image, booting from locally installed grub, i.e. I can't boot from CD/USB but already have some ext3 partition to put iso on 19:45 evand usb-creator only looks for USB disks (and SD cards soon) 19:46 evand but, you could dump the contents of an Ubuntu CD to an ext3 partition 19:46 homy QUESTION: <janitux> Can i create an iso based on the usb stick? 19:46 evand and install a bootloader to that, assuming you point the bootloader to the kernel and initrd 19:46 evand you'd be better off with a vfat partition as then you could use syslinux 19:48 evand janitux: I'm not sure I understand your question, but the wiki page I posted above will let you create a custom CD and you should be able to use a USB disk that usb-creator made as a source for that. 19:48 homy Question: <sudobash> For a USB Live Virus Scanning Tool what distro would you recommend and if there is a specific tool like the ClamAV Live CD/USB I would be interested... 19:49 evand Of course I would recommend Ubuntu ;), but I am biased. In future versions of usb-creator you'll be able to add the clamav packages from the archive, but if you're looking for a solution now, or something more tightly integrated to the USB disk (such as having a clamav scan in the boot menu) I'd suggest looking at one of the existing options 19:50 evand I'm not very familiar with whats out there, otherwise I'd suggest one 19:50 jcastro (10 minute warning!) 19:50 evand thanks jcastro 19:50 evand Any last questions? 19:51 homy SEMI-QUESTION: <knome> I was mostly referring to http://www.gnu.org/software/grub/manual/html_node/Making-a-GRUB-bootable-CD_002dROM.html , because I've been recently working with a laptop which can't boot from USB, but the user wants a USB-based Ubuntu installation 19:52 homy QUESTION: <komputes> Creating a persistent install on USB key - Can I make an installation on Ubuntu on a HDD, boot from live cd afterwards and create a disk image of the installation using dd, take the outputted ISO and pass it onto a key using usb-creator. 19:53 evand knome: Could work, but I have not tried it myself. The image usb-creator makes is like any other live CD produced by Ubuntu, so any bootloader should work, provided you point it at your kernel and initrd off the USB disk 19:54 homy QUESTION: <Inteysedut> Can i create a usb stick with two or more distros to boot from, given the space on my drive is big enough? ..lets say id like xubuntu for old PCs at work, and my plain ubuntu for faster machines on the other end of hte office? 19:54 evand komputes: sort of. You will need to prepare an initramfs, but you could take an existing system as the source for the squashfs 19:55 evand See the wiki link I posted above on live CD customization 19:55 evand Inteysedut: This would be something you would have to do yourself, usb-creator does not support this, but I believe there's at least one project to put multiple distros on a single medium 19:56 evand I'd look into them as a starting point 19:57 evand Ok, I'm going to wrap it up here as we're almost out of time. If you have any additional questions, feel free to email the Installer Team mailing list email@example.com, or ask in #ubuntu-installer. 19:57 jcastro ok thanks evan! 19:57 evand Thanks for your time and good luck with all of your USB disk projects!