17

I'm trying to create a bootable USB stick of ubuntu-11.10-desktop-i386.iso using usb-creator-gtk on my ThinkPad X220. Usb-creator-gtk appears to work OK, but the resulting stick fails to boot either of my laptops. I tried two different USB sticks. Boot just shows a blinking cursor.

If I mount the USB stick, I see it has 729M of data on it.

One more clue: After usb-creator-gtk exits, the activity light on my USB drive continues to blink for a minute or so, and even after that's done, /media/XXXX-XXXX and /tmp/tmpXXXXXX remain mounted. I have been manually umounting them before pulling out the stick.

Is there any way to get debug output from usb-creator-gtk? Or is there a straightforward command-line alternative to usb-creator-gtk that would offer more debugging options?

UPDATE: In syslog, I noticed the error:

usb-creator-gtk[xxxxx]: segfault at 4 ip xxxxxxxxxxxxxxxx sp xxxxxxxxxxxxxxxx error 6 in libdbus-1.so.3.5.7[xxxxxxxxxxxx+xxxxx]

Turns out this is ubuntu bug #875758.

Is there an alternative to usb-creator-gtk? Ideally, a bash recipe that would help me isolate the problem and work around it?

muru
  • 193,181
  • 53
  • 473
  • 722
Joe
  • 869
  • 1
  • 7
  • 8
  • 3
    Have you tried unetbootin - I find this far better that the default in Ubuntu: http://unetbootin.sourceforge.net/ – fossfreedom Dec 13 '11 at 09:38
  • Also copying the ISO image to USB drive (not partition) with `dd` should work. – enzotib Dec 13 '11 at 09:44
  • Thank you, fossfreedom. Unetbootin worked where usb-creator-gtk failed. – Joe Dec 14 '11 at 02:53
  • @fossfreedom want to add that as an answer? – Stefano Palazzo Feb 01 '12 at 11:39
  • @Stefano - not really - I dont think it answers the question directly. The OP seems to have disappeared - possible this question could be considered as abandoned? – fossfreedom Feb 01 '12 at 12:51
  • [What to do with questions that describe known bugs?](http://meta.askubuntu.com/questions/1317/what-to-do-with-questions-that-describe-known-bugs/) this has been reported on [Launchpad](https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/875758) and as such is now closed. – Marco Ceppi Feb 25 '12 at 01:21
  • Reopened Reopened – Marco Ceppi Dec 16 '13 at 12:25

2 Answers2

6
  • Identify device (/dev/xxx) and unmount device

  • Device should be in FAT32 if not:

    sudo mkdosfs -n 'USB-LABEL' -I /dev/xxx -F 32
    

Mount the iso file and copy content to USB device:

sudo mkdir /media/iso
sudo mount -o loop /path/to/ubuntu.iso /media/iso
cp -a /media/iso/. /USBMOUNTPOINT/

Make the device bootable:

sudo apt-get install syslinux mtools
syslinux -s /dev/sdd1

Rename the isolinux directory to syslinux and copy config:

mv /media/xxx/isolinux /media/xxx/syslinux
mv /media/xxx/syslinux/isolinux.cfg /media/xxx/syslinux/syslinux.cfg

Reboot your pc and change the boot-order in bios to USB. Now your ubuntu usb flash drive will booted up and you can install it.

David Foerster
  • 35,754
  • 55
  • 92
  • 145
yilmi
  • 1,272
  • 9
  • 12
2

mkusb-nox wraps a safety belt around dd

It is possible to use dd 'naked', but I would discourage you to do it, because it is risky.

dd if=file.iso of=/dev/sdx

dd is very powerful and does what you tell it to do without any questions, even if you tell it to overwrite your family pictures. A simple typing error is enough ...

mkusb-nox is a tool, that works in text screens and terminal windows (nox: no X graphics).

It uses dd under the hood to clone the content of a hybrid iso file to a target block device (USB drive, memory card ...). Most current linux iso files are hybrid iso files. You can say that mkusb-nox (as well as mkusb with a GUI) 'wraps a safety belt' around dd.

mkusb-nox uses an extraction method to create install drives for Windows.

See these links,


Edit: You can use dus (mkusb-dus) in text mode

sudo add-apt-repository universe  # only for standard Ubuntu

sudo add-apt-repository ppa:mkusb/ppa  # and press Enter
sudo apt-get update
sudo apt-get install dus mkusb-nox usb-pack-efi
sudodus
  • 45,126
  • 5
  • 87
  • 151
  • 1
    mkusb-nox is great! It's better than usb-creator-gtk – diyism Aug 18 '17 at 07:02
  • @diyism, I'm glad that mkusb-nox works well for you. Thanks for the feedback :-) – sudodus Aug 18 '17 at 08:57
  • `dd` did not work for my Windows 11 Disk Image (ISO). My computer complained it could not boot from the EFI device. I had to use this rather laborious process instead: https://nixaid.com/bootable-usb-windows-linux/ – Joe Jun 09 '23 at 23:03
  • @Joe, Cloning works for most Linux iso files, but not for Windows, so yes, you must use some other method. May I suggest another method, that might be easier than the one you found: [mkusb](https://help.ubuntu.com/community/mkusb) (not `mkusb-nox`, but **`mkusb-dus` and `mkusb-plug`** have GUI interfaces, that **call the text mode shellscript `mkusb-tow`** 'to Windows'). **You can use `mkusb-tow` directly from the command line (in text mode)**. – sudodus Jun 11 '23 at 19:50