My Tonido Plug 1 crashed the other day and unfortunately, Tonido does
not provide an updated image of Debian. The stock image of Ubuntu they
provide is horribly outdated and Ubuntu doesn't support ARM, so there
is no way to get an updated version without spending a week compiling on
the plug computer...
So, I decided to setup a virtual NAS server to run on my HTPC. The applications I wanted to run are:
Also install the Virtual Box extensions (also from Oracle and free)
use VBoxManage modifyhd --type=writethrough
Otherwise, if you use the snapshot feature, all future writes will go to the snapshot instead of the drive
Add the vmdk to the virtual NAS inside Virtual Box
To install Debian,
So, I decided to setup a virtual NAS server to run on my HTPC. The applications I wanted to run are:
- Tonido
- Deluge
- Logitech Media Server (for my Squeeze Box)
Setup virtual NAS on Oracle Virtual Box
Install Virtual Box from Oracle -- this is a free virtualization platformAlso install the Virtual Box extensions (also from Oracle and free)
Attaching a physical drive on Virtual Box
To attach a physical drive, you have to first create the vmdkC:\Program Files\Oracle\VirtualBox>VBoxManage.exe internalcommands createrawvmdkTo get Virtual Box to actually use the disk follow these instructions (from here) if you are running a Windows Host (reproduced below)
-filename c:\Users\pc\Documents\vRangadevi\PhysicalDrive.vmdk -rawdisk \\.\Phys
icalDrive3
- Close all open programs or documents on any partition on the disk to pass-through
- Run DISKPART (command line utility)
- Select hard drive carefully using SELECT DISK. disk numbering starts at zero. you can roughly verify your selection with LIST PARTITION if you know what your partitions should look like or LIST DISK to see disk sizes.
- Offline the disk using OFFLINE DISK. all volumes will disappear from windows explorer.
- ATTRIBUTES DISK CLEAR READONLY
- Verify with ATTRIBUTES DISK
use VBoxManage modifyhd --type=writethrough
Otherwise, if you use the snapshot feature, all future writes will go to the snapshot instead of the drive
Add the vmdk to the virtual NAS inside Virtual Box
Install Debian
I decided to create a second VMDK using Virtual Box to attach to my virtual NAS (and put it on my SSD -- not the physical disk that we just created in the previous step)To install Debian,
- Download Debian ISO from their site
- Create a new Virtual Box instance w/ 512 mb ram, 5gb virtual HDD for the O/S partition (this was what my plug computer was setup with earlier).
- Boot off of the ISO and install w/ the following options
- Select "File Server", "SSH server", and "Standard system utilities" options for packages to install
- Reboot
su rootEdit /etc/fstab to enable automount of physical disk
vi /etc/apt/sources.list (Comment out the reference to the debian cd)
apt-get update
Install applications
apt-get install sudo samba deluged deluge-webui openvpn screen vim
wget http://prdownloads.sourceforge.net/webadmin/webmin_1.690_all.deb
dpkg -i webmin_1.690_all.deb
apt-get install -f -y
- visudoers (to give your account ability to sudo)
- vi /etc/samba/smb.conf
- Change workgroup to your workgroup
- allow hosts = 192.168.1.*
[root]Add any other users as needed
path = /media/disk2part1/
browseable = yes
read only = no
guest ok = no
force create mode = 0775
force directory mode = 0775
valid users =
Setup Deluge
Setup deluge to work with a block-listInstall SqueezeBox Server
- Install SqueezeBox server (Logitech media server)
- Download from http://www.mysqueezebox.com/download
sudo dpkg -i
Install Tonido
wget http://www.tonido.com/download.php?TonidoSetup_i686.deb
sudo dpkg -i
sudo apt-get install -f -y
Configure OpenSSL
- Create conf file with details of vpn provider (name it .conf)
- Create password file & reference in conf file
- Edit /etc/init.d/openvpn to add "NAME" variable which contains of conf file
- To add to system boot list
update-rc.d deluge-daemon defaults
invoke-rc.d deluge-daemon start
Setup IP Tables
Setup IP tables as doing so will close unnecessary ports and secure the server
To autoload at startup: https://wiki.debian.org/iptables
Install vboxadditions
To install vboxadditions, you need to install header files first...
sudo apt-get install linux-headers-3.2.0-4-486
mount -t iso9660 -o ro /dev/sr0 /media/cdrom0
/media/cdrom0/VBoxLinuxAdditions.run
Force FSCK to check HDD after every reboot
edit /etc/rc.local and add
touch /forcefsck
echo "-V -- -v" > /fsckoptions
Install Dante proxy
Dante will enable you to proxy internal network traffic through the vpn tunnel (tun0)
See http://blog.edseek.com/~jasonb/articles/dante_tunnel.shtml for instructions
Common URLs/ports for reference
Deluge: http://Webmin: https://
Logitech Media Server: http://
Tonido: http://
No comments:
Post a Comment