User Tools

Site Tools


blog:spring2016:mp010784:journal

This is an old revision of the document!


Matthew J. Page - Spring 2016 Blog

Links to previous semesters opus/blog entires:

Fall 2014 - C/C++ and UNIX : {http://lab46.corning-cc.edu/opus/fall2014/mp010784/start}

Spring 2015 - HPC Fundamentals, HPC Systems and Networking, and Systems Programming: {http://lab46.corning-cc.edu/opus/spring2015/mp010784/start}

Fall 2015 - Data Structures : {http://lab46.corning-cc.edu/blog/fall2015/mp010784/start}

HPC Experience ][

Week 1

Testing…

…ok, it's working.

So this week I won my appeal with the school and I can officially be actually in this class instead of just pretending I am, also saving myself from doing an additional semester in Spring 2017. So I'm on the final two semesters if all goes well.

This week we looked at some potential projects that needed to be done. Some of these included setting up or fixing a Samba server in Mac lab on campus. Another potential project included fixing the file server slowness, as we experienced during Data Structures last semester while every student wa making changes to their code and recompiling, as every pod in the LAIR (Location for Abstract Innovation and Research[I had to put the backronym somewhere on one of my blog entries]) was mounting every single users home directory to each pod and when changes were made on one pod by one user it is needlessly syncing those changes to everyone else's pod because every user has every users home directory mounted causing needless overhead on the system. So that would be a very productive enhancement project for the LAIR as a whole.

I personally have taken an interest in what will probably turn out to be a very quick and easy project. The art studio downstairs from the LAIR has had a very very old Ubuntu Linux box that they have been using for years that needs an upgrade. So we were looking into some simplified, hands off, n00b friendly linux distros to use and Matt mentioned elementary OS, which I obviously have heard of, but never tried myself before nor looked into much. I know it is designed to look and behave similarly to Mac OS. Tyler and I were talking about it and I enquired about what desktop environment it used, which none of us knew. It appears to be using a desktop called Pantheon, which I've never seen or used before, but it appears that just as Linux Mint was used to introduce the rest of the Linux world to the Cinnamon desktop, elementary OS is being used to introduce the Pantheon desktop to the Linux world.
At home Friday night, I downloaded an iso file for elementary OS and created a bootable USB for it for installation or live booting so that I could test drive the OS and play with it a little. I used my usual method these days of accomplishing this, by using dd:

sudo dd bs=4M if=/home/robgraves/Downloads/elementaryos-0.3.2-stable-amd64.20151209.iso of=/dev/sdg && sync  

In this case the name of the file and the path to it will be relative to whatever file you are using and the /dev/sdg would be the drive you are using as the destination.

Upon playing with elementary OS and Pantheon desktop environment it seems like a very slick and sexed up desktop. Pretty quick and responsive and looks good too. At first glance I have to admit it looks a lot like like GNOME3's Gnome Shell, but there are some differences. And as elementary OS is I believe based on Ubuntu, it has some Ubuntu similarities as well such as the soon to be abandoned Ubuntu Software Center, and the graphical settings and configs menu look very similar. It should do the job. I forgot specifically what things we needed on it. I know he said they used it primarily for music playing and for maybe Powerpoint presentations or pdf viewing, i don;t recall which he said. But if it was Powerpoint, I'm wondering if on the old machine if they are using something like LibreOffice to view them or are they going so far as to virtualize windows and run MS Office on the virtual machine. Probably not the latter as I can't imagine people who have little interest in this stuff going to such lengths.

Additionally we have a stack of towers we need to test. Tyler and I started doing that Friday, putting in hard drives and RAM. We immediately ran into three fails off the get go, it appears. We have some that do work, but one of these machines we will load up with RAM and end up using for this elementary OS machine for the art room below.

Week 2

On Monday Tyler and I continued to test the RAM and the DELL machines in the back of the LAIR. We ended up discovering that the 4200U sticks of RAM weren't compatible with the DELL machines so we had to use 5300U and then everything worked fine. So we ended up loading up the one DELL machine with 4GB of RAM and did a memory test on it. After connecting this machine to the network, I started installing elementary OS on this machine to be placed long term and forgotten about for the Art Lab below us. Currently I am writing this entry from that very machine as I wait for updates to the new system to complete. The elementary OS system is pretty bare bones so we still need to install LibreOffice and I need to decide if I want to use the default generic music player or install something else like Banshee or RhythmBox.

I ended up installing Clementine as a music player on the box for art class and noticed it was hanging and crashing sometimes so i uninstalled it and tried Rhythmbox, similar issue with unexpected crashing. I uninstalled that and tried Banshee. Banshee appeared to be working okay as a music player but at the end of Wednesday I came to the conclusion that I was gonna scrap the excess media player and music players and just go with the default music player and video player fo elementary OS, so I uninstalled VLC and Banshee. As of right now there is no Flash and Java on it, by design, and audio CD's work and have been tested. It automounts USB sticks, and it plays mp3's and youtube videos and video files and Powerpoint presentations via LibreOffice so as far as I'm concerned it's pretty much ready to deploy, it seems very stable and quick and simple interface for non computer people. I also did system updates as this system will probably never get them again. So unless Matt has any other things to add or test, I'm ready to deploy this machine.

Friday and this machine is ready to move out. I packed up the Elementary OS machine and put it on the LAIR cart, along with a mouse, keyboard, power cable, and video adapter and cable for delivery and setup in the art lab below us. Today I also started on the new project, setting up a Samba server for the Mac lab on campus. I personally have never done a Samba server before, so this project opportunity took an interest. We have a newer machine that we are using for this Samba Server, it has Intel i5 CPU and it had 8 GB of DDR3 RAM, we ended up harvesting that for the LAIR collection. We discovered that the BIOS had a password so we had to move the jumper on the machine to reset the BIOS password, then move the jumper back to boot again. We downgraded the RAM to a single stick of 2 GB DDR3. This machine has two mechanical drives which will be configured in some kind of a RAID setup, I forgot exactly what Matt had suggested. There's also an SSD drive, which will be the boot drive with the main OS on it, which we are going to end up using Debian for. First of all, however, this drive contained the only existence of the LAIRwall setup and configuration from the old LAIR. We booted into the Network, after configuring the boot order, and booted into g4u and the uploaded the image from the SSD to fileserver with:

uploadimage lairwall.img 10.80.0.3 wd0

I think…or something very close to the above command. After the image was uploaded I started to look into PXE Booting to set up Debian but I ran into a snag as it wasn't taking the file partitioning and wasn't writing it to disk, but this was late afternoon on Friday, so I am leaving that problem for next week to solve.

Week 3

On Monday I retried to install Debian on the Mac lab's future Samba server, my current working project. It continued to fail saying some error along the lines of that it couldn't mount the partition as root /. I booted into a live session of Ubuntu to access disk testing utilities to see if the hard drive was okay and everything appeared to be functioning properly. Later, with Matt's assistance we discovered that it was a kernel module issue, where the ext4 filesystem wasn't being mounted to the partition because of perhaps an older kernel module. When we switched to xfs filesystem, then it continued the installation. Currently now we have a vanilla Debian Jessie system functioning on the Samba server machine. Next we need to install and set up samba in addition to taking the two mechanical drives and getting them formatted and configured in a RAID setup. Both of these areas are shadier parts of my knowledge base as I've never done a RAID configuration or a samba server before, so I may need to read up on them before venturing any further on this project.

After mentioning this decision in front of Matt, he suggested we set up the Samba first, then later we will use MDADM (not MD80M) for the RAID setup on the mechanical drives. So I installed the samba package along with the mdadm package on the server. Both still need to be configured, but I'm gonna save that for a later day as it's getting later today and I need to catch a bus soon.

On Tuesday I spent a couple hours, way more than I had anticipated, trying to mount the three hard drives for this server. Matt showed me the bracket he had just got in to mount the SSD drive, and I mounted that relatively quickly, but the way the cage was set up for the mechanical drives was kind of weird and I spent quite a bit of time getting it figured out and mounted properly. Once all three drives were physically mounted I ran into a new issue. The only power line coming from power supply that had the new SATA power adapters had three of them, equidistant from each other, and I could easily attach two adjacent ones to the two mechanical drives but the remaining distance to the SSD drive was too far away with the mounting bracket we had used. We ended up having to use a MOLEX to SATA power adapter and then that was able to reach from the MOLEX line out of the power supply to power the SSD. then I had to wire the SATA cable to hook up the three drives. As I left it, it still boots Debian from the SSD, the boot drive, and BIOS recognizes the two mechanical drives, which I haven't formatted or set up for RAID yet.

Lol, Tyler's assessment of my activities today:
Tyler's Blog

On Wednesday Tyler and I with Matt's assistance setting up the RAID mdadm setup. RAID stands for Redundant Array of Independent Disks. We used a couple commands to set it up:

mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sdb /dev/sdc

In this case /dev/sda is the SSD Boot Drive with Debian on it and /dev/sdb adn /dev/sdc are the two mechanical drives.

mdadm --detail /dev/md0

or watch it live with:

watch mdadm --detail /dev/md0

also can watch progress with:

watch cat /proc/mdstat

Ubuntu Touch Diversion

Looking into using my old phone as an experimental Ubuntu Touch installation. I found the wiki here:

https://developer.ubuntu.com/en/start/ubuntu-for-devices/installing-ubuntu-for-devices/

And the downloads I found here:

http://cdimage.ubuntu.com/ubuntu-touch/daily-preinstalled/current/

Week 4

This week we started to set up samba on the samba server.We configured everything for samba, mostly set to defaults and and restarted the samba server, usually the command on Debian based systems is:

service samba restart

but we had to go with the other, more common method to get it to restart:

/etc/init.d/samba restart

We also added an entry in /etc/fstab to automount the mechanical mdadm RAID drives, with:

/dev/md0    /export    defaults    0     0

The automounting of the mech drives was a success, and I'm assuming samba is working, but we cannot access it. We also created two users. usera and userb, and Matt tried accessing the samba shares from the pods, but the password authentication failed. I also attempted to access it from my laptop from Windows 10, and also had a password authentication failure. I googled for a bit attempting to find a solution but as of Tuesday, we don;t have Samba accessible.

Finally on Thursday, I got the samba server so that I could log on from not only Windows but also Linux on the system, except that it was fully accessible across the board. So now we need to investigate what options are doing what from the options I added so that the shares are only accessible and viewable from that user. The segment of the file that I added to, which isn't necessarily going to be our final config settings, are as follows:

[usera]
    comment = tacocat
    path = /export/home/usera
    #security = user
    browseable = yes
    available = yes
    valid users = usera
    read only = no
    public = yes
    writeable = yes

And now on Friday to clean up the samba config at /etc/samba/smb.conf we cleaned out the individual user accounts and made a template, public, and users shares sections as follows:

[template]
    comment = tacocat
    path = /export/home/template
    #security = user
    browseable =yes
    available = yes
    #valid users = users
    read only = yes
    public = yes
    writeable = no

[public]
    comment = tacocat
    path = /export/home/public
    #security = user
    browseable = yes
    available = yes
    #vaild users = users
    read only = no
    public = yes
    writeable = yes

[homes]
    comment = tacocat 
    path = /export/home/%S
    security = user
    browseable = yes
    available = yes
    valid users = %S
    read only = no
    public = no
    writeable = yes
    create mask = 0700
    directory mask = 0700

Our final testing on Friday before the break showed that the shares were accessible from A Linux system or a Mac system, and on windows if I directly tried to browse the homes share it wouldn't work, but if i specified a user and their password, it would work. Success at this point, on to the next phase after break.

Week 5

This week was return from break week. We didn't really do much on Monday other than discuss Tyler's venture into dual booting his laptop with Windows 7 and Debian Linux. We ended up talking about wine and I even fired up my laptop to show Tyler downloading the windows executable for Putty and running it via wine on my Linux partition.

On Tuesday we started looking into the final phases of the samba server. Matt said we needed to set up some kind of VPN client on the file server and then we needed to set up some administrative scripts to automate user management. He said he'd show us the script he had wrote for the previous iteration of the file server. I have a copy of that that I'm using as reference as I try to write the most bare bones streamlined version of it that I can. Matt introduced us, well actually just me since Tyler already used it last semester with his LAIRbrary project for managing the books at the LAIR. But today Matt introduced me to whiptail, which appears to be a way to use an ncurses like interface, like what the Debian guided installation shows. So I started experimenting with some writing a bash script with whiptail. This is my very basic displaying of a menu that doesn't do anything yet other than capture the user's choice as a variable called choice.

#!/bin/bash

whiptail --backtitle "This is a backtitle" --title "This is a title" --menu "" 12 70 0 "Users" " - Add a  New User" "Quit" " - Exit Management Section" --clear --nocancel 2> junk.txt

choice = "`cat /home/mp010784/junk.txt`"
rm -rf /home/mp010784/junk.txt

After playing with whiptail and re-acclimating to bash scripting again after a year of not doing any bash scripting, I installed ssh daemon onto the samba server and created users for both Tyler and I and gave us both sudo privileges. We both tested it and logged into the samba server from the pods to verify that it worked.

On Friday, Tyler and I started looking at the script we were gonna try to write and started looking into ways to share a session and we installed screen and tmux trying to do that ultimately to land on grabbing wemux, which we both still need to learn how to configure and use. [https://github.com/zolrath]/wemux|https://github.com/zolrath/wemux]

blog/spring2016/mp010784/journal.1456593325.txt.gz · Last modified: 2016/02/27 17:15 by mp010784