9

Possible Duplicate:
Create USB installer from the command line?

With curiosity I have on terminal, I came to this step. How can I create Live USB from terminal? Is there any tool i got to do that ?

I am using Ubuntu 12.04 .

2
  • @ఆగస్ట్, Can you please put that in the title or question then, because it sure looks like a duplicate without it. Oct 8, 2012 at 18:15
  • @ఆగస్ట్ now that looks good sir ji :)
    – devav2
    Oct 8, 2012 at 18:21

2 Answers 2

16

You can use the famous (and also dangerous) Linux tool dd for this job. But take note that it will completely erase all the contents of USB drive. Also note that you can't get the facility of persistence storage with the Live USB, which means every boot to the Live System will be new.

Using dd

First take note of the device number of your USB drive with the command sudo blkid. Most probably, it will be /dev/sdb or /dev/sdc. Almost all of the time, it cannot be /dev/sda.

Then open a terminal with the Ctrl+Alt+T shortcut and use this command (I'm assuming your USB drive is /dev/sdb).

sudo dd if=/path-to-the-iso-file/filename.iso of=/dev/sdb

The command will run for some time. When you see the prompt $ in your terminal, you're done.

Using cat

You can also use the cat command. Open a terminal and enter the command like below:

sudo cat /path-to-ubuntu-iso/iso-filename.iso > /dev/sdb; sync

Replace the /dev/sdb with your system-specific USB drive number.

Please note that you need to specify the output device as /dev/sdb or /dev/sdc, not /dev/sdb1, /dev/sdc1, etc.

Update for the updated question

Not all distros can be made bootable using the dd method. One such example is OpenSUSE DVD (not the live one). So it is not possible to use dd to make a bootable iso for every Linux distro, but the dd method should work for all live distros.

8
  • I think its done pastebin.com/imy2b1rW
    – Raja G
    Oct 8, 2012 at 16:39
  • hey its not booting , i set to boot from removal disk but its not .
    – Raja G
    Oct 8, 2012 at 17:18
  • It's not /dev/sdc1 but you need to specify /dev/sdc without the partition number
    – Anwar
    Oct 8, 2012 at 17:32
  • hmm bad luck , negative . Its not booting even 1st priority removal disk . I am sure ISO dont have errors .
    – Raja G
    Oct 8, 2012 at 17:48
  • You wanted to make Ubuntu bootable or the archlinux?
    – Anwar
    Oct 8, 2012 at 17:50
2

Yes it can be done with mtools (various) If you have a look at this page, there's instructions for downloading the isotostick.sh script that uses mtools (you need to also install mtools).

A look through that script will give you an idea of what is involved.

4
  • 1
    hi i have managed to get maximum but now getting this error ./isotostick.sh: line 103: /lib/udev/vol_id: No such file or directory
    – Raja G
    Oct 8, 2012 at 16:30
  • It should work for most debian distros I think. Apart from that, maybe have a look at Multisystem and how it does things - mostly using grub to boot various iso files direcly by loop mounting them. It's a useful technique when you want to boot different distros off one USB stick and lends itself to a fair bit of hacking around. The downside is that some distros do things quite differently in this regard. Oct 8, 2012 at 16:32
  • hi i managed to get what i have mentioned for previous two comments . but stopped at this error .
    – Raja G
    Oct 8, 2012 at 16:37
  • Yep, vol_id disappeared round about 9.04. It appears to be checking that the partion type is VFAT. You should be able to skip all the fluff and go straight to the nuts and bolts, but if you really want to re-write the script you should be able to pull the information out of /proc/self/mounts Oct 8, 2012 at 16:47

Not the answer you're looking for? Browse other questions tagged .