WARNING: Please read before continuing ▼
Difficulty: Moderate
Time: ~30 Minutes
Last Updated: 26th September 2009
Applies to: *NIX
KIWI is a new tool released by the people behind OpenSUSE for creating customised distributions. One of the best features of it is that the images created are portable. However, documentation is scant at this time, and the instructions for deploying an ISO image onto a USB device are buried deep in the manual.
The actual process for copying the file is simple, however, identifying the right drive can be tricky.
WARNING: This procedure will erase all information from the target device. Please make sure the USB drive you want to use is empty.
If you have a disk image created with KIWI that can be deployed onto a USB device, then its a simple matter to do so providing that you have a UNIX-like system. First, obtain a suitable USB device. For a CD, you’ll need at least 800MB, for a DVD, up to 5GB.
First, you need to plug in and identify the which device in /dev the USB device has been assigned to. It is VITAL that you get this correct, as you could end up overwriting the contents of your hard disk if you get it wrong!
One of the simplest ways on Linux to identify a USB device is using:
ls -al /dev/disk/by-id/*usb*
It should give you a fairly readable list of all USB disk drives on your system. Pick out which is the USB disk you want to use.
On OS-X , open Disk Utility.app, and right click on the correct drive in the left hand panel. Note down the “disk identifier” (it will be something like disk?, where ? is a number. If it looks like disk?s?, then you have selected a partition, not a drive.
The path to the drive will be /dev/disk?, substituting disk? with the identifier you found.
On BSD, you must check the output of dmesg to get the drives identifier. You can extract all detected drives using:
cat /var/run/dmesg.boot | egrep ‘ad[0-9]|cd[0-9]‘
If you cannot identify the device, then its possible that your system is not detecting the USB device properly, due to your systems configuration, or the USB device not being compatible with *NIX. This problem is outside the scope of this procedure.
Next, you need to ensure the device is unmounted. To do this (as root):
umount /path/to/usb/device
Substituting /path/to/usb/device for the device you identified earlier.
If the device cannot be unmounted, you need to find out why (common reasons may be that you are not root, or that something is using a file on the device).
Once you have made sure the device is unmounted, its time to copy the image to the device. Before you do so, make sure you are certain you have identified your USB device correctly. If at all in doubt, seek further confirmation, as you could over write your primary disk drive with the ISO image if you are wrong.
To copy the ISO image to the device:
dd if=/path/to/iso/image of=/path/to/usb/device bs=32k
Substituting /path/to/usb/device for the device you identified earlier, and /path/to/iso/image with the path to the iso image. This may take a while to complete and is dependant on hard disk performance.
Once dd has completed, thats it. The USB drive is finished. It will now boot the disk image on any compatible system that it is plugged into.
Sources and Further Reading:
OpenSUSE Lizards: Hybrid Live Systems