First and formost is migration of data. This is one of the more time consuming aspects of the task as the LX195 isn't speedy to begin with and only supports USB 2.0 for external drives. My first pass was to purge data that would not be making the journey. Its really amazing how much of a digital pack rat one can be. Once legacy and unneeded data is gone, I used the tools in the Home Server Console to migrate the shared folders that remains off the single internal drive and onto the available external drives attached to the server.
While the server busied itself moving bits around, I downloaded the latest version of Ubuntu Server (12.04 LTS at the time of this project). My primary computer is a MacBook Air, so using dd at the command line I wrote the ISO to a 1GB flash drive I had laying around.
1. Use diskutil to list the available disk and identify which /dev/disk# is the target flash drive
$ diskutil list2. Use dd to bitwise copy the ISO onto the flash drive of choice
$ sudo dd if=./ubuntu-12.04-server-amd64.iso of=/dev/rdisk1Note that you should you want a progress bar to add some sanity to this process, there is a handy applet called 'pv' that's available for Linux and other platforms. For the Mac it can be installed via Mac ports. The command syntax becomes:
dd if=ubuntu-12.04-server-amd64.iso | pv -p -t -r -e -b -s `stat ubuntu-12.04-server-amd64.iso | awk '{ print $8 }'` | sudo dd of=/dev/disk1The resulting output resembles:
$ sudo dd if=ubuntu-12.04-server-amd64-extracted.img.dmg | pv -p -t -r -e -b -s `stat ubuntu-12.04-server-amd64-extracted.img.dmg | awk '{ print $8 }'` | sudo dd of=/dev/disk1Once the data migration is complete and the flash drive is ready it's time to get the screw driver. Before a custom OS can be installed on the LX195, it needs to be put into debug mode. This can be done by closing the open J2 jumper. See http://www.mediasmartserver.net/forums/viewtopic.php?f=21&t=5422 for pictures and other relevant information.
563MB 0:15:39 [ 722kB/s] [====================================> ] 82% ETA 0:03:22
There are two ways to manage the actual install for Ubuntu Server. The more complicated method is to preseed the ubuntu install (see: https://help.ubuntu.com/12.04/installation-guide/amd64/preseed-using.html#preseed-auto). Alternatively a keyboard and monitor can be used in conjunction with a debug board (see: http://www.mediasmartserver.net/forums/viewtopic.php?f=6&t=8066). As I still had a debug board from my WHS2011 install adventure I opted to take the easy path.
For the actual install of Ubuntu Server 12.04, I stuck with the default install options until prompted for automatic updates. As this machine is a home server and not something truly important I opted to enable automatic security updates.
At the end of the install, Ubuntu prompts for additional modules. As this is going to be a headless server I chose to install OpenSSH during the install. If you want to skip this and install OpenSSH after the first boot, run the following command:
sudo apt-get install openssh-serverRegardless of how OpenSSH is installed, the default config will not do for anyone remotely conerned with security. As such the next thing on the list is to reconfigure OpenSSH to lock down access. First create a backup of the existing configuration file, just in case.
sudo cp /etc/ssh/sshd_config /etc/ssh/sshd_config.oldThen edit is with the console based text editor of your choice.
sudo nano /etc/ssh/sshd_configIn the configuration file, edit, uncomment and/or add the following:
PasswordAuthentication noI've been using SSH for a while so I already had an extra RSA key pair I could use. After saving the sshd configuration I created the authorized_keys file and added my public key to it. Once that was done I restarted sshd with init.d and tested the connection.
PermitRootLogin no
AuthorizedKeysFile %h/.ssh/authorized_keys
$ sudo /etc/init.d/ssh restartFrom my MacBook:
$ ssh -i ~/.ssh/id username@homeserver.home.localTake a look at http://www.debuntu.org/ssh-key-based-authentication-p2 and http://www.debuntu.org/ssh-key-based-authentication-p2 for more guidance on key based authentication for OpenSSH
Lastly for good measure I updated the server manually.
$ sudo apt-get updateThat's enough for one night. Tasks for tomorrow include evacuating the data from the external USB drives, configuring the 3 1TB drives as a RAID5 using LVM and ensuring the three will mount correctly on a reboot. Time permitting, I will also start work on the install and configuration of Netatalk and Samba and creation of user accounts for family members. Once those tasks are complete, it'll be time to install java, serviio and beyondupnp.
$ sudo apt-get upgrade
No comments:
Post a Comment