Create USB from Linux

6 posts in this topic Last Reply

Recommended Posts

I cannot figure out how to create the USB stick from Linux. 


root@optimus-prime:~# bash /media/user/UNRAID/make_bootable_linux 
INFO: make_bootable_linux v1.3

INFO: The following device appears to be the unRAID USB Flash drive: /dev/sda
Permit UEFI boot mode [Y/N]: Y
INFO: unRAID USB Flash drive currently mounted to /media/user/UNRAID, copying temporary installer files to /tmp/UNRAID
umount: /media/user/UNRAID: target is busy.

To continue you may need to enter your admin password
sudo: /tmp/UNRAID/syslinux/ command not found


Also, neither your Wiki or your Download page have ANY mention of how to do this from Linux. So I'm trying to just figure it out on my own. I swear this used to work, or I'm just forgetting that it didn't work before and did it from a Windows box. Which is what I'm sure I'll end up doing again.




Link to post

There are some forum posts on this topic.


Google: " linux bootable usb"


Some people have had success with various methods. Gparted and Syslinux have ways of making a usb bootable. If you do figure out a good method, maybe you can update the wiki. Appears that a Linux method has been requested for a long time. 

Link to post
  • 11 months later...

I know this thread is a bit old, but I was just tinkering with this today and got the same error. I managed to get it working with 1 small edit to the script.


That last line is indicating that the script is failing because sudo sees the path /tmp/UNRAID/syslinux/ without a command, and doesn't know what to do with it. Or at least I think that is what is happening.


To fix the issue, open up the script with your favorite text editor, and find the line below (towards then end of the script):

sudo /tmp/UNRAID/syslinux/ $TARGET


Add your shell of choice to the line, after the word "sudo". I use bash, so the result looked like this:

sudo bash /tmp/UNRAID/syslinux/ $TARGET


Note: I assume you can use other shells here, but did not test it, so YMMV.


Save the edited script and exit. Now the script should run just fine. You know it was successful when the terminal spits out something similar to these lines (# of bytes, time elapsed, and the device letter /dev/sdX might be different on your system):

INFO: Installing Syslinux bootloader on /dev/sdb1
INFO: Writing MBR on /dev/sdb
0+1 records in
0+1 records out
447 bytes copied, 0.00128967 s, 347 kB/s

INFO: the Unraid OS USB Flash drive is now bootable and may be ejected.


There are probably other ways to get the script to work, but this worked for me.


Hope that helps!


Also, for what its worth, I too remember using the make_bootable_linux script on a PC running linux in the past without issue. Not sure what changed.

Edited by diarnu
Link to post
19 minutes ago, diarnu said:

I was just tinkering with this today and got the same error. I managed to get it working with 1 small edit to the script.


There's another discussion about this very subject here:



Link to post

Cool, I will add what I posted here to that thread.


They also posted a series of steps that work with the script right out of the box (or out of the zip, I guess?) in that thread, and updated the getting started section of the wiki with those steps too.


For those that find this thread before the thread linked above or the wiki, the steps are:

  1. Format the entire USB as a single FAT32 partition, label MUST be UNRAID (otherwise the script will not find the USB)

  2. Extract archive to mounted USB drive

  3. copy make_bootable_linux back to the PC

  4. unmount (not eject) USB drive

  5. run the following command from wherever the scipt is located on the PC (will not work if you try to run it from the USB)

    sudo bash ./make_bootable_linux 


I tried myself and found that these steps work too. If I forget to unmount the USB per step 4, then just running the script a 2nd time also did the trick. Seems like the 1st attempt unmounts the drive but then fails, and the 2nd attempt succeeds on the unmounted drive. Also, if you eject the USB instead of just manually unmounting it the script will not be able to find the USB to work its magic.

Edited by diarnu
Link to post

I'm glad there are methods that work for people. Setting up a boot device is something you (hopefully) need to do only very infrequently, though on those rare occasions you really want it to be as easy as possible.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.