Thursday, April 15, 2010

Udev "Error" in Debian Sid, Kernel Upgrade difficulties

So I have been hesitant for some time now to upgrade by Debian Lenny box, due to some upgrade errors I encountered in the past due to dependency conflicts.  (I have now switched to aptitude, which seems to do much better).  However, it was finally time.. I had several hundred updates to run, so it was time.  When I ran this installer, I received the following error:

Manually Upgrade the Kernel

So, it was time to upgrade my kernel manually.. no way around it.  I downloaded the latest kernel for Sid (2.6.32-3-686 at the time of running) and manually installed, which I've never done (not too difficult, or so I thought)....

I then needed to reboot after the kernel installed, so that changes could be made.  I waited patiently on reboot for my server to come back on-line.... it never did.  I went over and hooked up a screen to my server, and noticed that GRUB had errored out.

Fix Grub

I noticed that the problem must be that for root it was looking at (hd0,1) and root=/dev/hdb1 (not possible).
So after changing (hd0,1) to (hd0,0) and root=/dev/hdb1 to root=/dev/hda1.  I'm not entirely sure why, however, if you do run into this issue, I would recommend that before you reboot, run this command:
 sudo update-grub

Generating grub.cfg ...
Found background image: moreblue-orbit-grub.png
Found linux image: /boot/vmlinuz-2.6.32-3-686
Found initrd image: /boot/initrd.img-2.6.32-3-686
Found linux image: /boot/vmlinuz-2.6.26-2-686
Found initrd image: /boot/initrd.img-2.6.26-2-686
This may fix your problem.  If you need to, you may manually edit your grub file to make sure it is correct.
 sudo nano /boot/grub/menu.lst

Haven't had a problem since!

Happy upgrading!

Tuesday, April 13, 2010

Jinzora 3 Tutorial - Setup and Configuration on Linux

Jinzora requires the following programs:
A web server, I recommend Apache2
PHP (PHP 5 is the latest).
MySQL (or some other version of a database) - Free and easy to download and setup.

Obtaining the files:
Download the lastest Jinzora3 at
untar the file to the directory you wish to install it in.. /var/www/ for instance
tar -zxvf jinzora*
Rename the folder as you desire.. since I have a jinzora2 installation I name mine Jinzora3.
sudo mv jinzora* jinzora3
I change the permissions and ownership of jinzora
sudo chown -R www-data jinzora3
If you want to make things easier run the command below...sometimes causes permission issues!
sudo chmod -R 700 jinzora3 **
Or, if you want...
sudo chmod -R 755 jinzora3 **
I would recommend locking this down further than 755..... not nearly as safe!

Web Based Installer

Visit jinzora3 in your browser: http://localhost/jinzora3.  You should see the below page

Choose your language and select "Proceed to Requirements"

Here Jinzora will check your computer for requirements.. you may need to change permissions, just change the permissions for each of the files/folders listed, and recheck requirements, you shouldn't have any difficulty with that.

PDF support is used for album art, and is not required.
 Your default PHP installation will most likely not meet requirements... you will need to edit your php.ini file to meet these requirements (just searching for those terms (such as "memory_limit" and "max_execution_time") should find the setting in the php.ini file).
Locate php.ini (mine is located at /etc/php5/apache2/php.ini) and make the necessary changes.

Once you are all set.. "Proceed to License". Accept...

For Installation type, choose defaults unless you know what you are doing. Main settings is a very important section:

Choose your username and password for the admin account Choose the default access that non-authenticated users have - tooltips explain the options. Choose your front-end...there is a small thumbnail to assist you... Import settings are also very important, and depend on your media. My media is all organized into folders, so I choose "Filesystem" for the data structure, and I dont read the tag data, since I don't necesarrily keep that updated. The Media layout is another setting that needs to be carefully configured. The default is Genre which means the folder structure is "Genre/Artist/Album/Songs". I am not that detailed, I have mine laid out as "Artist/Album/Songs".  After you have that all set up, continue to "Backend Setup".

Setup database, this is quite self-explanatory, it is just for setting up the MySQL backend for Jinzora.

Next, you will need to import your media.  Using the web-based file browser select the directory to import music from.  Depending on what you selected before, and how much music you have, this may take some time.  After that, proceed to "Save Config" and then launch Jinzora.  Once you launch Jinzora, you will be greeted with the following error message:

 Remove /var/www/jinzora3/install (if that is your directory)
 sudo rm -r /var/www/jinzora3/install
You will now be able to log onto Jinzora3 by visiting http://localhost/jinzora3 (or whatever IP and naming scheme you used).

After Install Setup

If you immediately receive a long amount of errors when you log on that are PHP errors you need to change to following line in your php.ini (if you is useful for debugging)

display_errors = on TO display_errors = off

And.. technically that is it.  The interface should be easy to navigate.  You can start building playlists, or play a random selection of songs.  When you select "Play"  your browser will download (by default) a m3u playlist file... just open the file in your player of choice and you should be good to go!
There are, however, a few troubles you may run into.  Jinzora is able to convert different file types on the fly.. however, this option usually needs to be setup correctly to do this.  To set this up, we need to edit the settings.php file, which  is located in the root folder. (We can also edit this from the Jinzora interface... however I find the interface to be rather clunkly... however, if you wish to do so, click on the little hammer icon "Admin Tools" then  to system tools -- settings manager -- main settings -- resampling). Lets go ahead and open the file:
nano /var/www/jinzora3/settings.php
There are a few settings we need to check to make sure they are set correctly.

$allow_resample = "false";  -- Change from false to true
$path_to_flac = "/usr/local/bin/flac"; --change to /usr/bin/flac
(on my distro at least, try "whereis flac" to locate flac on your distro)
$path_to_faad = "c:pubfaad";  --change to   $path_to_faad = "/usr/bin/faad";   (again, double check)
$path_to_mplayer = "/usr/bin/mplayer"; --change to $path_to_mplayer = "/usr/bin/faad";
$mplayer_opts = "-ao pcm -aofile /dev/stdout";  --change to $mplayer_opts = "-f 1 -o /dev/stdout";
$always_resample = "flac|mpc|wv|wav|shn|m4a|ape|ofr|ogg|wma|m4a"; --add m4a if you need to
As a person preference I like to add:
$allow send email = true

You should be all set up for resampling! For grins, here is a chunk of my settings.php

Playing Music in the Web Browser

Next, we can setup your in-browser player.  Once again, that can be changed from the web interface.  Go to Admin Tools -- system tools -- settings manager -- main settings -- playlist, and at the bottom there is a setting for "embedded_player".  This can be set to many different kinds of players... the official list of players listed for jinzora is:

A player I really enjoy is xspf.  Just enter xspf into the embedded player field, and next time you play a song, the player will open up start playing the file.

For mobile phone integration, there is a free app for Jinzora3 on the android operating system for playing your tunes on the go!

That finishes the basic overview of how to get Jinzora3 up and running... enjoy your music anywhere you go!