How to turn an old netbook into a NAS drive

1st Mar 2010 | 11:00

How to turn an old netbook into a NAS drive

Don't throw it out - put that old netbook to use

Turn your netook into a NAS

The network-attached storage (NAS) business is booming. Everyone needs a convenient storage pod for the gigabytes of data they accumulate, and they want to be able to access it from anywhere on the local network and the wider internet.

As a result, the hardware is getting increasingly powerful. High-end NAS boxes for small businesses and large homes are moving from ARM processors to Intel's Atom platform, and turning simple file servers into far more capable mini-machines in the process.

One of these expanded NAS boxes could operate as a web server, a media transcoder, a UPnP streaming hub for your PS3 and Xbox, and even a virtual desktop. The only problem is that these boxes are expensive – and that's before buying the hard drives.

Fortunately, there's a cheaper way. These NAS boxes aren't the only hardware to use Intel's Atom: it's also used in many netbooks. These machines are often cheap, accessible and easily configurable, and they're all well suited to the task regardless of their age.

They're energy efficient, unburdened by extra hardware, feature both wireless and wired interfaces, and are small, quiet and cool. Attach a hard drive or two to a USB port, configure the operating system and you're ready to go.

We're going to turn one of these netbooks into a super-powered NAS using some external USB storage, a LAN connection and some install media.

1. Install UNR

Not all Linux-based operating systems for netbooks are equal. Linpus, as bundled with the original EeePC, is particularly ill-equipped for updates and customisation, so don't mess around with your default install if you ever want to use your machine as a netbook again.

For these reasons, and to keep your current netbook data safe, we're going to create a NAS configuration that will sit on a USB flash drive rather than your netbook's internal storage. This will enable you to return your netbook to normal laptop duties whenever the need arises by simply removing the USB stick.

Step 1

However, you could omit the USB flash drive requirement and just install a new operating system over the old one if you prefer.

There are two popular netbook distributions that we could easily shoehorn into NAS operating systems. The first is Intel's Moblin, a finely tuned version of Linux that makes good use of a netbook's limited capabilities. The only problem is that it's not that easy to modify with simple packages.

That leaves us with Canonical's Ubuntu Netbook Remix (UNR), a special version of its Ubuntu operating system tailored for netbook hardware and screen sizes. The great advantage that UNR has over Moblin is that it has access to the massive library of packages that are available to any Ubuntu user, so installing and configuring these packages is an identical process on both systems.

To install UNR on your netbook, you need to get hold of an ISO of the latest release. You then have two options. If you've got a Windows machine handy, burn the ISO to a disc and run the usb-creator.exe application from it. This will automatically install the distribution onto a USB stick without any further hassle.

The second option requires a machine running Ubuntu. Use the Synaptic package manager to download and install a package called usb-creator. After this is done, run USB Startup Disk Creator from the Launch menu. In the top panel of the window that appears, click on the 'Other' button and point the file requester in the direction of your UNR ISO. In the lower panel, make sure you select your inserted USB device and click on 'Format'. Get the wrong device and you'll lose any data it contains, so be careful.

The end result of both methods is that you'll have UNR installed on a USB stick. You can now boot into this operating system by simply inserting the USB stick into a spare port on your netbook and rebooting. When the UNR desktop appears, you're ready to reconfigure.

2. Add connections

Your netbook is going to need to be connected to your LAN, either through a wireless router or a wired one. The connection is configured through the Connection icon in the top-right border of the main UNR screen.

Wireless connections are easier to achieve. Your netbook hardware will be detected and your computer will join the network automatically after you've entered any required passwords. However, the wired connection is better for both power use and performance.

Step 2

If you've got a spare Ethernet port on your wireless router, for example, you can use this to bridge the wireless connection from your network to the wired connection on your netbook. The wired connection will stop your wireless bandwidth becoming saturated if your NAS box is uploading or downloading from the internet, and will provide other wired devices with a faster route to your data.

UNR is designed to be easy to use on smaller devices. Instead of the old desktop metaphor used by standard Ubuntu, you'll find a large array of icons arranged to mimic Ubuntu's standard Launch menu. Click on a category in the left panel, for instance, and your screen will fill with the icons for the applications contained within the menu.

And when you launch an application, UNR cleverly merges the titlebar into your screen's top bar, saving space on small screens. But these are only cosmetic changes, and you'll find the same old Ubuntu beneath the surface. Now we need to configure it to automatically mount your remote storage.

When you connect your external USB storage device, UNR will automatically mount the device and launch the file manager to display its contents. Your device's actual location on the filesystem will depend on its type and name, but you can find any automatically mounted devices listed under the '/media' branch from the File System icon in the manager.

When you've identified your drive, make sure you remember its location; you'll need this to enable either the mount point (or, more sensibly, a folder within the mount point) to be shared across your LAN.

Sharing files on your netbook NAS

3. Install Samba

Before augmenting your NAS with any other features, it's important to get the basic functionality right. To share files on your netbook USB drive with all the other machines in your network, you need to install a server called Samba.

This is the open-source implementation of Microsoft's network protocol, which means that it will work with all of the Windows, OS X and Linux machines on your LAN. It's the most common fileserver system and it's used by many NAS devices.

Step 3

UNR doesn't waste netbook space installing Samba by default, so you need to install it manually. As with the desktop version of Ubuntu, this is best done through the Synaptic package manager, which can be found in the Administration section of the System group of applications. Just search for samba and install the resulting package.

After the package has installed, switch back to the file manager view for your USB storage device. Create the directory you want to be shared across your network and rightclick on the folder. You should now see 'Sharing Options' listed in the menu that appears. When you select this, a window will open.

From that window, enable the 'Share this folder' and 'Guest Access' options. The latter could be a security risk, as it means anyone with access to your LAN will be able to read the files on your NAS. This is fine if you trust your network, but unacceptable if your network is shared. In those cases, leave 'Guest access' disabled and make sure that each machine you want to share the folder with has a user account and password that has an identical name and password to an existing account on your netbook.

You might also want to tick the 'Allow others to create and delete files in this folder' box, unless you want your file sharing to be read-only.

When you've finished with the options, click on 'Create share' and 'Add the permissions automatically' in the window that pops up. You should see that the folder icon for your share now has two arrows across it to indicate that the folder is being shared across your LAN.

4. Access your files

You can now access your files from other computers on your LAN, and your NAS box should appear within their network folders.

If you need to specify an address, such as from OS X's 'Go | Connect to a Server' menu or Gnome's equivalent 'Go | Location' menu option, then type smb://ubuntu into the location field. This is the default hostname for our new installation, and 'smb' is requesting access through the Samba protocol.

Step 4

After a few seconds, you'll see the folder you just created appear, and you'll be able to access files and folders within that directory as if they were local. Congratulations, your netbook is now a NAS device!

5. Add online backup

To bring your NAS in line with more functional boxes, it's time to add some packages. Backup is at the top of our list, and UNR has a feature called Ubuntu One that's perfect for this job.

This service automatically copies your local files to a remote server. You can then download them from the server to any Ubuntu machine with an Ubuntu One account.

Step 5

Configuration is easy: just look for the Ubuntu One logo in the Internet category, click on it and either enter your account information or create a new account. You'll then be asked to verify your computer's name and say that you'd like the data to be synced. A free account can store up to 2GB of data, but you can subscribe to the commercial service if you want to store more.

Switch to the file manager and you should see a new Ubuntu One folder. Anything you place here will be synchronised with the Ubuntu One server. Rightclick on it to enable it as a shared folder.

6. Security and remote access

There are many security issues surrounding opening your NAS box up to the internet, but UNR should be up to the task as long as you keep your system up to date and install any patches. You should receive automatic update alerts, but this can be a problem when using your netbook as a NAS if you end up not looking at the screen very often.

The easiest solution is to enable a mode where updates are applied automatically. Find and click on the Software Sources icon and in the window that appears switch to the Updates tab. This page manages the background update tasks, and you need to tick the 'Install security updates without confirmation' box and change the update frequency to one your connection can handle. 'Daily' is fine for most installations.

If you want internet access to your box, the safest way is to use SSH (the secure shell). This provides command-line access to your NAS box using a tool such as Putty on Windows machines, or the 'ssh' command in Linux. You'll need to install the opensshserver package on your box.

To connect, forward TCP port 22 to your NAS box through your router and log in with your standard account details. If you prefer a graphical desktop, install the tightvncserver package on your NAS and type tightvncserver:1 into the command line to create a new session.

Any VNC client on your LAN can now access a desktop on the NAS using the address 'ubuntu:1'. To access your desktop from the internet, use SSH to pipe the VNC port through the SSH connection with ssh -L 5901:localhost:5901 ubuntu. address and use a local VNC client to access localhost:5901.

7. Add more functionality

The best reason for using UNR on a netbook to create a NAS is that you can augment your installation with all kinds of functionality, from web servers to media players.

One of the most popular is MediaTomb, a UPnP-compatible media streamer and transcoding tool that's easy to install and configure.

Install it by opening the Synaptic package manager on your netbook and searching for mediatomb. There will be several dependencies.

After installation has completed, switch to the Sound and Video application launcher window and you'll find a new MediaTomb icon. Double-click this and Firefox will launch, loading the MediaTomb web-configuration panel.

From MediaTomb's web page, you can navigate to your media files on your storage device. Click on the '+' symbol on the right to add them to the MediaTomb library.

MediaTomb supports all the most common media formats. After a few moments, you'll be able to view or listen to your content on any UPnP-compatible client such as Windows Media Player, RhythmBox, a PlayStation 3 or an Xbox 360.

To run a web server from your NAS box, install the apache2 package, then type http://localhost into Firefox to see a web page that declares 'It works!'.

-------------------------------------------------------------------------------------------------------

First published in PC Plus Issue 291

Liked this? Then check out Complete guide to making your PC quieter

Sign up for TechRadar's free Weird Week in Tech newsletter
Get the oddest tech stories of the week, plus the most popular news and reviews delivered straight to your inbox. Sign up at http://www.techradar.com/register

Follow TechRadar on Twitter

tutorial NAS network attached storage
Share this Article
Google+

Most Popular

Edition: UK
TopView classic version