(SOLVED) How to move boot device to an internal flash drive


Recommended Posts

I had just built my server based on Supermicro X9SRI-F motherboard which has a USB port inside (i.e. on it). I was excited about it and plugged in a USB drive in there planning to run unRaid on it. What I didn't realize is that I should have prepped that drive first. At any rate, I've created an installation drive on my laptop, plugged it into the USB port on the front panel on my server chassis and installed unRaid. Unfortunately, installation didn't ask which drive I'd like to use as a boot device (unless I missed it) and assumed that it'll be the drive I am installing unRaid from. So now I am sort of stuck with having to keep a usb drive plugged in on the front.

 

What would be the best way for me to move my boot drive onto the "internal" usb drive, without having to take the server apart? Thanks in advance!

Edited by olegbc
tagging solved
Link to comment
1 minute ago, olegbc said:

Didn't buy a license yet, but I can/will

Ok, when you do buy a license, it will be tied to the GUID of whichever flash drive you use. So, you need to make sure you license the correct USB stick.

 

Since you are currently using the trial, the specific USB drive doesn't really matter, theoretically I suppose you could use the command line in unraid to prepare and use the internal stick for a new trial. Trial installs can't be moved from stick to stick, you would have to set the array up fresh. If you have valid parity, you can assign the drives to the same slots and check the box to tell unraid parity is already valid and just do a check instead of a build.

 

Using the command line to set up the internal stick is not a documented procedure, so if you aren't already linux adept, it would be easier just to open the case and either swap the sticks, or prep the internal stick to be your permanent one.

Link to comment

Thanks for your help @jonathanm! Can I buy a license and then backup and restore the USB drive from the "old" one, onto the new internal one while somehow transferring the license? All using the unRaid terminal..

 

Would the procedure be:

1) backup the current usb stick via unRaid GUI (create a zip)

2) format the internal stick as FAT32 with label UNRAID

3) extract the files from the backup zip onto the internal stick

4) execute make_bootable_linux (is it supported?)

5) authorize the new stick with a valid (i.e. bought) license?

6) profit... :)

Edited by olegbc
adding procedure details
Link to comment
5 minutes ago, olegbc said:

Thanks for your help @jonathanm! Can I buy a license and then backup and restore the USB drive from the "old" one, onto the new internal one while somehow transferring the license? All using the unRaid terminal..

You have to have booted off the drive that is going to have the license as you need the GUID to correspond to that drive for the licence to be valid.

Link to comment
14 minutes ago, olegbc said:

2) format the internal stick as FAT32 with label UNRAID

3) extract the files from the backup zip onto the internal stick

4) execute make_bootable_linux (is it supported?)

5) authorize the new stick with a valid (i.e. bought) license?

3) extract the files from the zip file obtained from Unraid download site  to the internal stick.

4) I've got no clue whether the make bootable linux script works inside unraid. Never tried.

4.5) Shut down server, remove external USB, boot from internal

6) Set up array as I described in my post above with previous drive assignments

 

Once the internal stick is licensed, you may be able to use the config folder from the backup. I do know you can't use the backup on another trial, which is what the internal stick is until it's licensed.

 

You may have to "fool" the makebootable script by removing the stick you booted from to make the internal usb the only one visible with the UNRAID label. I don't know what the script is programmed to look for. If you do start experimenting, be sure the array is fully stopped before you yank the boot drive, otherwise the array could be in a bad state when you try to bring it up again.

 

I'm assuming that all data currently on the machine is expendable, as you may run in to some unexpected results when you start playing. This kind of thing is either enjoyable or a PITA, depending on your tolerance for tinkering and failed experiments.

 

If you go through with this, it will be a learning experience for me as well!

  • Upvote 1
Link to comment

Thanks @jonathanm and @itimpi. It's a net new NAS setup for me so there is no data on the disks at all. If things break or whatever, it's fine I can just "rebuild" everything. I could take the server apart and just plug the current unRaid stick into the internal slot and just continue using it, I just kind of don't want to and would rather try "fixing" my issue via terminal - should be a good learning experience right?

 

I'll report back on goings on.

Link to comment

So my plan to move unRaid installation to a different USB drive without having to take it out of the case totally worked! A little too well actually. Not sure if I really had learned as much from this experience as I thought I'd have to to make it happen 🙂

 

At any rate, here is the procedure for posterity sake:

 

1) Make sure both USB drives (the empty one and the current unRaid one) are plugged into the server.

2) Lookup the drive names for both USB drives so you know which one is a source (current unRaid USB drive) and which one is a destination (new unRaid USB drive)

3) Go to terminal on your server and type:

dd if=/dev/sdX of=/dev/sdY status=progress

Note: X = source USB drive; Y = destination USB drive

 

This will essentially clone the USB drive with your current unRaid installation onto the new one. My 32GB drive took a while to clone (~2 hours) so give it some time. The "status=progress" argument makes sure to show you the progress.

 

4) Now you can shutdown the server and remove the USB drive with the original unRaid installation.

5) Boot from the new USB drive. I had to change boot order in bios.

6) Cloning unRaid USB drive doesn't transfer your license, and if you're on trial it will straight invalidate it and you wont be able to start your hard drive array. You either have to buy and activate a new license (which is what I did) or transfer your existing license onto the new USB drive. Guide for the latter is here.

7) You're up and running!

 

Thanks @jonathanm and @itimpi for your help fellas!

 

 

 

Edited by olegbc
Formatting
Link to comment

Glad you got it worked out.

 

A couple thoughts.

 

dd will only work if the source is smaller or equal to destination. Bad things can happen if you clone a larger drive to a smaller one. The partition table will reference space that doesn't exist, causing eventual errors.

 

If the two drives are identically sized, this procedure is ideal. Cloning a smaller to a larger will leave the remaining capacity unusable, which may actually benefit the durability of some flash media.

 

As you found out, this forces you into a corner license wise if you are on a trial.

 

It does nicely sidestep the need for formatting, labeling, and the make bootable procedure.

Link to comment

Good to know about dd. The two drives I used were identical so no issues so far. The licensing thing was kind of expected so I didn't think that was an issue. I was always going to pay, but yeah this procedure essentially brings your free trial days to zero.

 

Thanks again for the help! I am loving unRaid community. So far it's so much friendlier and newbie-tolerant than FreeNAS one 🙂

Link to comment

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.

Guest
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.