← Back to team overview

usb-creator-hackers team mailing list archive

hacking a CLI frontend, running into issues

 

Hello,

I've been hacking on usb-creator with the goal of adding a CLI
frontend to it. I'd be happy to explain why I think I need this
in a separate thread, but right now, I'd just like to get some
technical advice. :)

I have something roughly working, but fails in the "installing
bootloader" phase.

I think I have two issues going on:

	1) install.py thinks it should be using grub, but when I
	use the gtk UI, we seem to go down the syslinux path. In
	other words, using the cli UI, a debug print in
	install_bootloader() says:

		grub is /media/2B9E-1D52/boot/grub/i386-pc

	I find that odd since looking at my ISO, I don't see a
	/boot/grub anywhere. You can see for yourself later on in
	the log file.

	2) I don't think I'm tall enough to use threads. I
	cargo-culted as much as I could from the existing gtk
	stuff, but I must have missed something crucial. I
	sometimes see that we're trying to install the bootloader
	before all the files are finished copying.

I've been running it like this:

	achiang@aspen:~/Projects/natty/usb-creator/trunk$ sudo ./bin/usb-creator-cli -i ~/Downloads/binary.iso -t /dev/sdb1
	Destructively wiping out /dev/sdb1 in 5 seconds...
	Press control-c to abort!
	Removing files...
	Copying files...
	0% complete
	68% complete (0m0s remaining)
	90% complete (0m0s remaining)
	Installing the bootloader...
	Segmentation fault

And then you can see that I experience a segfault. Occasionally,
I actually get something useful on the command line:

	*** glibc detected *** /usr/bin/python: malloc(): memory corruption: 0x000000000236edb0 ***
	Segmentation fault

Here is a representative log:

	http://pastebin.ubuntu.com/532787/

My branch can be found below. It's clearly a work-in-progress...

	lp:~achiang/usb-creator/usb-creator-cli

Any help would be greatly appreciated.

Thanks!
/ac



Follow ups