BeagleBoard XM Powered File Server Using Ubuntu

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

Single Board computers like Raspberry pi and BeagleBoard have found wide range of applications among DIYers. This post tells you how to install Ubuntu headless server on a BeagleBoard single board computer and then configure it as a File Server using Samba (almost like a NAS). BeagleBoard XM is an OMAP3 board and works very well an ultra low power file server for my LAN and serves all types of media to my HTPCs running XBMC and my Raspberry Pi powered digital picture frame. So here is how to do it.

Before You Begin

You will need the following:

  1. A serial to USB cable
  2. DHCP based wired internet access (to access the Ubuntu package archive)
  3. A Micro-SDHC card of atleast 4 GB capacity
  4. A computer running Ubuntu or any other Linux

Ubuntu Server Installation

I have used preconfigured image of Ubuntu 12.04 LTS Precise Pangolin  Texas Instruments OMAP3 (Hard-Float) preinstalled desktop image meant for OMAP3 boards. Go ahead and download it by clicking on the link.

Copy the image to SD card

Now write the raw image downloaded above to a blank SD card. Make sure you’re using at least a 2 Gig SD card so that you have enough room for the image, 4 GB is recommended to allow room for expandibility.


  1. Insert the SD card in your host computer’s SD card reader.
  2. Make sure the SD card is not mounted (just umount it if needed).
  3. Identify the correct device name (like /dev/mmcblk0 or /dev/sdb) using command like sudo fdisk -l
  4. Run the following command to write it:
gunzip -c ubuntu-12.04-preinstalled-server-armhf+<omap or omap4>.img.gz | sudo dd bs=1M of=/dev/<device name>


sudo sh -c 'zcat ubuntu-12.04-preinstalled-server-armhf+<omap or omap4>.img.gz > /dev/<devicename>'

Run the sync command after first command execution has finished and then wait for the image to get written on the card.

Booting the image

Now the card is ready to be inserted in to the BeagleBoard.

  1. Attach a serial cable to the serial port on the board and other end to the USB port of your computer. (note: The board is already wired for a straight serial cable – no null modem needed, also no driver installation needed in Ubuntu)
  2. Open a terminal on your host system and launch a serial console monitor with the port set for 115200,n,8,1 by using the screen command as shown below
    • screen /dev/ttyUSB0 115200
    • you can end the screen session by pressing Ctrl-A and then K
  3. Insert the SD card in the system and switch on the board.

The system should start booting with output shown on your serial terminal. After the board resizes the image to fill the SD card, it will reboot and start oem-config to prompt for localization and user info. This is when you can choose what packages to install as well as configure user name etc.

Screenshots for installation and configuration steps are shown below:

Finally, choose the pre-defined software packages of your choice, for just having ssh and Samba (file sharing) capability, we can select the package sets shown in screenshot below. To make the selection you have to press “spacebar”.


Mounting External Drive and Configuring Samba

Upon reboot you would get the login prompt, you can login to check the ip address and the remaining setup can be done through ssh. So after finding out the ip of your server, ssh into it. You would see something like this.

I have hooked up an external hard drive to the BeagleBoard server, so first thing is to mount the drive as a local folder and then configure the samba to share the folder(s) to my LAN. Check the drive / partition that you want to mount by doing:

sudo fdisk -l

Output would be something like this (depending on number of drives / partitions attached to the server):

@shrot:~$ sudo fdisk -l

Disk /dev/mmcblk0: 3904 MB, 3904897024 bytes
128 heads, 32 sectors/track, 1862 cylinders, total 7626752 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p1   *          32      147455       73712    c  W95 FAT32 (LBA)
/dev/mmcblk0p2          147456     7626751     3739648   83  Linux

Disk /dev/sda: 650.1 GB, 650136969216 bytes
255 heads, 63 sectors/track, 79041 cylinders, total 1269798768 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa0035911

Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      206847      102400    7  HPFS/NTFS/exFAT
/dev/sda2          206848   245794815   122793984    7  HPFS/NTFS/exFAT
/dev/sda3       245794816  1269796863   512001024    7  HPFS/NTFS/exFAT

To mount e.g. /dev/sda3, we start by creating a folder in my home directory (first cd to your home directory, also mounting in home directory takes care of permissions)

mkdir media
sudo chmod 0777 media

so get this partition mounted automatically at the boot, we can make an entry to /etc/fstab file by doing this:

sudo nano /etc/fstab

Paste the following at the end of the file and save it.

/dev/sdXY  /home/user_name/media   ntfs       defaults   0   0

XY above should be replaced by suitable letters as per your case. Now this would take care of mounting at the boot but to avoid reboot mount the drive manually by doing this

sudo mount /dev/sdXY media

This would mount the drive that we want to share through samba. Lets configure samba now. Edit the samba config file by doing this:

sudo nano /etc/samba/smb.conf

Change the name of the workgroup depending on your setting on Windows computers. I changed it to the following:

workgroup = HOME

Now add following block of lines for each share that you want to create.

   comment = Media collection
   path = /home/user_name/media
   browsable = yes
   guest ok = yes
   force user = user_name
   read only = no
   create mask = 0777
   directory mask = 0777

after the block that looks like this

comment = All Printers
browseable = no
path = /var/spool/samba
printable = yes
guest ok = no
read only = yes
create mask = 0700

Note: The setting above is less secured, as it allows all guests to be able to view / append / delete files in the share, so use it with caution. My home LAN is secured so, I don’t care much about the privileges.

Now restart your computer, and if you have followed all the steps correctly then you would see your new file server available to all Windows or Linux machines after the reboot. That completes the setup of an ultra low power file server.


You might also like

Install DLNA Server On Ubuntu File Server While there...
DIY Webcam Server or Home Security / Monitoring Setup Using BeagleBoard XM Running Ubuntu Earlier I showed...
DIY Multimedia / Photo / Video Frame Using Raspberry Pi Long long ago...
Stream Live TV to Several Computers on LAN Streaming of...

About the Author

has written 346 posts on this blog.

Meditating towards his "nerdvana", lifehacker is a teacher by the day and a nerdy blogger by the night. He lives to learn and yearns to learn living.

One Comment on “BeagleBoard XM Powered File Server Using Ubuntu”


  1. DIY Webcam Server or Home Security / Monitoring Setup Using BeagleBoard XM Running Ubuntu - Hack Your Life!

Write a Comment

Gravatars are small images that can show your personality. You can get your gravatar for free today!


Copyright © 2017 Hack Your Life!. All rights reserved.
Proudly powered by WordPress. Developed by Deluxe Themes