So my one Ubuntu server box after the last server update died and never came back to life. It was on an old IBM Intellistation P4 box, and the POST beep codes tell me that it’s either the system RAM or the system board. Since neither I’m in a position where I’m about to pour more cash into, I decided to just put a Ubuntu VM on my main box and go from there. After all the main box these days seems to be just idling away, so why not!

The problem was that I couldn’t remember how to mount a network drive, so it booted up at startup. After a few minutes of souring and trying a few things, came across the answer.

First run the following command:

sudo apt-get install smbfs

 

This will install the Samba File System, but more importantly it will also install the smbmount application.

Test to make sure that you can from the machine that you are setting up the mount point reach the network file system. You can do this via the command:

sudo smbmount //servername/directory /mountpoint -o username=putusernamehere,password=putpasswordhere

 

Obviously replace the necessary values above with the real information. Mine looks like:

sudo smbmount //192.168.1.7/public /storage -o username=george,password=xxxxxxxxx

 

Doing this, I received the error message:

mount error: can not change directory into mount target /storage

 

This is resolved by simply running the command:

sudo mkdir /storage

 

To add this mount point to your startup you will first backup your fstab file:

sudo cp /etc/fstab /etc/fstab_backup

 

once that is backed up, you will:

sudo nano /etc/fstab

 

Add in the following line:

//servername/directory /mountpoint smbfs username=putusernamehere,password=putpasswordhere 0 0

 

Mine looks like:

//192.168.1.7/public /storage smbfs username=george,password=xxxxxxxxx 0 0

 

Then writeout the file and exit nano, and run:

sudo mount -a

 

This will reload the mount points and if successful you will have full access to your network drive via the /storage directory!