Tuesday, September 25, 2012
11:45 PM

Create Live USB with Linux like you have never done before!

I like to try and review different free open source operating systems. This is what this blog is about.

usb key linux 1
Image of Dariolynx
The majority of my reviews are for Live runs of the OS’s. Wherever possible, I try to use a Live USB, not Live CD or Live DVD run. The reason is obvious: the speed of a USB run is much higher than that of an optical drive. This makes an overall experience better and wastes less time.

Unfortunately, a Live USB run is not always possible for me. The reason is in my laptop’s BIOS, which does not work properly with hybrid ISO images.

Some time ago I wrote an article titled "Different methods to create Live USB", where 6 different methods were described. Obviously, the most widely used of them are the command dd and the tool Unetbootin.

Since hybrid images are not usable for me, the command dd is rarely good for me. Unetbootin is my most often used method.

Unfortunately, Unetbootin is not always satisfactory either. The most recent case was my experiment with OpenSuSE 12.1 Li-f-e. That time round, I had to revert to the Live DVD method.

That was a trigger to one of my readers to join the scene. The person under the nickname Cyberorg (his real name is Jigish Gohil, by the way) mentioned a new method, which I’ve never heard of before. It is his own tool, which creates a Live USB from ISO images with a method different from Unetbootin’s. Of course, I wanted to try it.

The tool

The tool is a script. Yes, this is not a binary file, but rather a bash script. This approach has its benefits and issues. The most obvious benefit is cross-platform compatibility. You can run the script on any operating system which has bash. Which one does not have? The issue, of course, is the absence of a graphical interface. If you are scared of the command line, then this is not your cup of tea.

The use of the script is very simple:
  • You need to be under root (not sudo);
  • You need to specify the path to the ISO image;
  • You need to specify the partition on your USB stick, which must be in FAT format;
  • You need to answer a couple of confirmation questions in the process.
The tool allows you to have multiple images on the same USB, on the same partition. It is clever enough to build its own multiboot menu.

Experience

I tried to use the script myself. Being in a Xubuntu 12.04 session, I tried to create a Live USB with OpenSuSE 12.2 KDE.

First of all, I ran sudo su to get root access. You may know that there is no root user per se in Ubuntu-based systems, so the simple command su will not work. The command sudo su is a workaround for this.

Then, I specified a location of my ISO image, and the USB stick partition. Here are some comments:

  1. Path to an ISO image should not have spaces in folder and file names, or you need to use quotation marks. That’s a generic rule for all the commands in bash.
  2. The USB stick partition should be unmounted, so I needed to run umount /dev/sdb1 first. If the partition is mounted, you get an error message.

Finally, the script created a Live USB stick for me, which carried a processed image of OpenSuSE 12.2 KDE on it. It was a time to see how my laptop would like it.

The outcome

The best way to try was to reboot my laptop and use the USB stick. That is what I did.

And… drums… drums… drums… tension increases…

It worked! First, I was able to see a boot menu, then the splash screen of OpenSuSE 12.2 KDE. And then, the whole OS booted!

That was a success! I now have another tool to use when I need a Live USB!

Limitations and perspectives

The only distributions supported by Cyberorg’s script for now are Ubuntu and OpenSuSE. This already gives you the wide range of available distributions to try, because of richness of Ubuntu-based derivatives.

Cats love linux
Image by Photohiro
Of course, there is a prospect for further development, and this is a benefit of Open Source. Developers, or fans, of other distributions (Mageia, Debian, PCLOS, Sabayon and so on) may add functionality necessary for their distributions, making the script even more versatile.

In terms of existing script, I think it would be beneficial to replace the error message about a mounted USB partition with a simple umount command. Why do you need to ask user to do this externally, if you already have a bash script running?

Have you tried the Cyberorg’s script? Or maybe you know other methods of Live USB creation, not mentioned in either of my articles?

Update: you can now read a review of OpenSuSE 12.2 KDE, which I used as a guinea pig in this case.

0 comments:

Post a Comment