Ubuntu

Howto: Upgrade Ubuntu Version of Server

To upgrade from Ubuntu server system to the latest server:
1- install the update-manager-core package if it is not already installed:

sudo apt-get install update-manager-core

2- This is optional, you can update without doing this: Edit /etc/update-manager/release-upgrades and set Prompt=normal;
3- Launch the upgrade tool with the command

sudo do-release-upgrade -d

and follow the on-screen instructions.

Password Reset for Ubuntu System

Yes! I forgot my password to a fresh install of Ubuntu. Thankfully I can recover using the following steps:

1. Turn your computer on.
2. Press ESC at the GRUB prompt.
3. Press e for edit.
4. Highlight the line that begins “kernel ………”, press e
5. Go to the very end of the line, add rw init=/bin/bash
6. Press enter, then press b to boot your system.
The system will boot up to root shell without a password

7- Type in passwd “Username”
8- Type in reboot in order to reboot your system
9- Log-in with your new password set – done

Enter the Matrix Console

There is something out there and if you follow the white rabbit you might just find something, even if it isn’t what you were orginaly looking for.  With that I offer you the blue pill to some Ubuntu terminal fun.

The program name is cmatrix.  What a fitting name because what the terminal program does is scroll matrix code text inside the terminal.  No need for screensaver applications.  Cmatrix is written in ncurses under Linux, and should compile on other OSes with few modification.

You can install this in Ubuntu with a simple apt-get install cmatrix  and run with the command cmatrix by typing cmatrix –help you can see the following options:

 

-a: Asynchronous scroll, more like the movie/original screensaver
-b: Partial bold text mode
-B: All bold text mode
-f: Force the linux $TERM type to on
-l: Linux support for linux console matrix.fnt font
-n: No bold text mode
-o: Use “old-style” scrolling – less like the movie, more like the Win/Mac screensaver.
-s: “Screen saver” mode. Any key aborts (default is “eye candy” mode, must abort with control C)
-x: X window mode, use if your xterm is using mtx.pcf
-u [update]: Update delay (0-9, default 4).
-C [color]: Use color for matrix (default green).

Keystrokes available while running (not available in -s mode):
a: Toggle asynch mode
b: Enable partial bold text
B: Enable all bold text
n: Disable bold text
0-9: Change update delay
! @ # $ % ^ & ): Change the color of the matrix to the corresponding color: ! – red, @ – green, # – yellow, $ – blue, % – magenta, ^ – cyan, & – white, ) – black.

Here is a screenshot of me running this in putty

How to get your Dell Service Tag

There are those times you need the service tag from a system such as a noteboot, server, or pc and just can’t get to it.  Or… taking the “I’m not getting up for this method”.

Using the Windows Management Instrumentation Command-line (WMIC) you can pull this information right from the command prompt. Simply type the following:

wmic bios get serialnumber

You can also do something similar in Linux..  In my case I use Ubuntu and type:

dmidecode -s system-serial-number

Please note that in both systems you may need to elevate your rights to issues these commands.

PS3 Media Server (Again)

It’s been about 2 years now and well it was time for me to rebuild my PS3 Media Server
The last time I made a write up about this; I gave a few steps and left some out. Here is my rebuild and steps I took to get it working.

I started off by installing a fresh copy Ubuntu Server.
After the updates, I was ready to go.

Like the last build I did the following:

apt-get install mplayer mencoder ffmpeg vlc vlc-nox
apt-get install openjdk-7-jre-headless
apt-get install sshfs smbfs

The ssh and smb fs is used to mount remote storage locally if needed

After that has completed I move my way over to http://www.ps3mediaserver.org/ choosing the latest Linux build.
Latest Version:   PS3 Media Server 1.52.1 – Linux/Unix

Extracting this with tar xzf <filename>
I then moved the pms files to a new folder location.

/opt/pms/ ; you can also choose your own, and it’s entirely up to you.

mkdir /opt/psm
mv ~/pms-linux-x.xx.x/ /opt/pms

Then I changed into the directory

cd /opt/pms

I make the following scripts executable

chmod +x PMS.sh
chmod +x linux/tsmuxer

I then modify the PMS.conf file

cp /opt/pms/PMS.conf /opt.pms/PMS.conf.backup
nano /opt/pms/PMS.conf ; there are many options here, I’m sorry but I am not going into this during this post. I will suggest to you to set “thumbnails = false” to speed things up

The only thing I had changed in this file was the directory where I have my video media files

/media/video ; this data doesn’t exist on my server. It’s shared on another system and I am connecting to this using smbfs (smbmount)

Now it’s time to setup the startup script

cd /etc/init.d
nano startpms *this will create a new file to start the server*

Add the following lines:

#!/bin/bash
smbmount //host/video/ /media/video/ -o user=username,pass=1234pass
cd /opt/pms-1.52.1/
nohup ./PMS.sh &
exit

Save the file and make it executable by typing: chmod +x startpms
Now you issue the following command: something I did not do the last time

update-rc.d startpms

After a quick reboot of my server, I again have a running DLNA / UPNP Media Server running on a Linux box.