Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am currently looking to change my home NAS from FreeNAS to Ubuntu server 12.04 LTS. I have had a look but all the guides I can find are about making a live USB not a USB with the Full install on it.

Does anyone know of an easy to follow guides out there for;

  1. Making a "full install" for Ubuntu server 12.04 to a USB thumb drive using a windows 7.

  2. Installing the necessary packets to make Ubuntu work as a NAS

  3. Setting up a RaidZ ZFS pool.

  4. Installing Samba and setting up a share with a password?

Post was edited to clarify what I was after.

share|improve this question
    
ubuntu.com/download/help/create-a-usb-stick-on-windows This will help you install a live ubuntu. I hope this helps. –  Goku Mar 26 '13 at 14:06
1  
Why would this be any different from installing Ubuntu Server on any other external drive? –  Eliah Kagan Mar 26 '13 at 14:09
    
Goku: (For the benefit of others, I know you're aware of this.) That won't help the OP, because the OP's goal is to install a fully functional, persistenet server system on a USB flash drive, not simply to produce Ubuntu installation media. @user68186 That question and its answers are exclusively about installing an Ubuntu desktop system to a USB flash drive. This question is about installing an Ubuntu server system. Ubuntu Server doesn't use the same graphical installer and one cannot make an Ubuntu server system with UNetbootin out of the desktop ISO and a persistent area. –  Eliah Kagan Mar 26 '13 at 14:24
    
@Eliah Kagan: Is there a guide you would recommend for installing it on external drives? –  Silly_Ender Mar 26 '13 at 14:38
    
@Silly_Ender there is no need for a guide: this the same as for internal drive... –  ttoine Mar 26 '13 at 14:47
show 1 more comment

3 Answers

up vote 2 down vote accepted

You can install to a USB flash drive the same way you'd install to any external drive. Probably only minimal special guidance is needed in this situation.

  1. Make sure the external drive that you want to install Ubuntu Server on is attached. If your computer has trouble booting from other installation media when it is, then you can defer this step to immediately after the system starts to boot from the installation media in step 2.

  2. Boot the server install CD/DVD/USB. (If this is a live USB, then of course it must be a different drive from the USB drive you're installing on.)

  3. Select the external drive to install to.

  4. As part of the installation, you are asked to specify where the GRUB boot loader should be installed. Make sure it is at least installed to the master boot record of the external drive itself. You will probably not want to install it anywhere else.

    In particular, please note that if the newly installed server system's GRUB is installed to the MBR of an internal hard drive, then whether or not any other Ubuntu system is installed on the machine, no system will be able to boot when the flash drive is not attached. You don't want that. (You can fix it by reinstalling your OS's boot loader to the MBR of the internal drive, but it's best simply to avoid it altogether.)

  5. To boot the new system, you must select the drive it's on as the boot device.

This server system may or may not be highly portable, depending on how much you configure it to be dependent on other features of the machine on which it is installed:

  • You should make sure the swap partition (and as discussed above, the boot loader) is also on the USB flash drive!
  • By default, drives in /etc/fstab will be listed using their UUID's (which can be viewed by running sudo blkid). If you keep it that way when adding any new entries or modifying existing ones, your system will be much more portable, because it will be much more resilient to changes in the way devices are numbered, which often happens when hardware is substantially changed.
  • If you install the 64-bit version, it will use large amounts of RAM more efficiently, and for high-performance server needs, this is typically recommended. However, the 64-bit version of Ubuntu (server or otherwise) will not run at all on a machine with a 32-bit processor.

Finally, you may want to consider alternatives to attempting to create a portable server system. For example, you might be better off installing Ubuntu Server to a virtual machine. This is automatically portable. One of the disadvantages of running Ubuntu Server from flash storage is that, if you have a very large amount of writes (which occurs in many though not all server applications), the USB flash drive will wear out muc faster than a traditional magnetic hard drive (and I believe also faster than an SSD).

share|improve this answer
    
My server is running a 64-bit CPU with 16gb of ram. Once i get Ubuntu up and running on the USB Thumb Drive and pluged in to the back of my server case i'm not planing on removing it and the only upgrades i'll be doing is adding more HDD drives. –  Silly_Ender Mar 26 '13 at 15:44
    
@Silly_Ender Why not just install Ubuntu Server on the machine you intend for it to run on? (This could still be on the USB flash drive.) If you're having trouble doing this, your best course might be to post a question requesting help with that. The best way to make sure it will work on a particular machine is to actually install it on that machine. As a separate point, I had forgotten to mention in my answer that if a USB flash drive is under heavy writing (a lot of files being created or modified, frequently), it will reach the end of its life much sooner than a magnetic drive. –  Eliah Kagan Mar 26 '13 at 16:21
add comment

I recently did just that. You either need to install from a separate USB drive or CD and just select the USB drive you wish to install to as the drive to install to when creating partitions.

The easiest way I found was using UNetBootin to install the netinstall version of Ubuntu 12.04 which turned out to be very easy and quicker to start than downloading the whole distro. This allowed me to use a small USB stick to install from.

Checkout http://blog.pendles.com.au/2013/04/hp-microserver-linux-box.html to see how easy it is to install to USB and also get ZFS and samba going too.

share|improve this answer
add comment

Your question carries 3 questions in itself
There is an easy way to make a "full install" or"persistent mode install"
1.If you are using a windows system to make the install use "universal usb installer" see http://www.pendrivelinux.com/
2.If you are using a ubuntu system to make the install use Multi system available at the same site. There is a nice article here How do I install Ubuntu to a USB key?

share|improve this answer
1  
None of this is likely to apply to installing a server system. –  Eliah Kagan Mar 26 '13 at 14:43
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.