Posts tagged ubuntu

2012-06-23_02-24-06_238

Installing Ubuntu Server 12.04 LTS using Hardware Raid1

19

So my new 10,000 rpm raptor drives came in today, and I’ve had a sabrent hardware 4 port sata raid controller sitting around for a while, and decided to put them to work in a desktop server I plan on migrating the site’s I host (including this one) over to during the next few weeks.

One of the main reasons for the move is I this new raid1 setup will help ensure that me and my clients data will remain safe, in the case of a hardware failure. While I do currently backup with mysqldump and some rsync magic, restoration is alot easier using raid, then moving and re-installing everything from backups, not to mention just add’s to the geek cred :)

However I ran into a problem installing grub the error stated:

Unable to install GRUB in /dev/mapper

Executing ‘grub-install ‘/dev/mapper’ failed.

This is a fatal error

and because I haven’t had a lot of experience with either raid configurations or ever having installed linux to a machine with such a configuration I needed to do some research.

I found a few good posts, but most of them recommended creating another partition just for grub, and then using the raid drives for the rest of the install.

To me that sounded like a poor workaround, I want the data to be mirrored on both drives, equally, grub and all.

That led me to try a few other avenues to figure out the correct and easy way to get through the install.

Long story short, here’s a breakdown of how to get it setup and working, the easy way. In this breakdown I’ll assume you can follow the easy installer prompts for Ubuntu, have “activated the serial ata raid devices”, have taken note of the array’s name (you can take note of it on the “[!!]  Partition disks” screen that looks like the purple box on the left. (sorry not a vm so I had to take a picture of the screen…) in my case the name of the array is “sil_biegdfaaeabh”, and have continued onto the part of the install where it asks where to install grub.

  • First let’s find the name of the raid array, in case you forgot to take note of the name as mentioned in the previous paragraph (as I’ve done a few times when just mindlessly pressing next in the wee hours of the morning..) press Ctrl +alt+F2 to drop into a busybox terminal session. Press enter when prompted to start the terminal.
  • Type in the command [codesyntax lang="bash" lines="no" title="command"]

    [/codesyntax] and find that funny-named array after the entry named controller and then head back to your install terminal by pressing Ctrl+Alt+F1.
  • enter that name after the /dev/mapper that is populated by default. In my case:
    [codesyntax lang="bash" lines="no" title="install grub to:"]


    [/codesyntax]Of course CHANGE THE NAME and substitute your OWN in the example above!
  •  Continue setting up Ubuntu as you see fit, as the rest should complete without any further hassle!
In my case, I think after an update&&upgrade and mabye
[codesyntax lang="bash" title="command"]
[/codesyntax] IF you feel like having a desktop to work with, of course. I’m starting to like XFCE a lot more these days, and the Midori browser is coming along nicely, so also give that a consideration. Some tasks I just find easier with a mouse and desktop, notice I didn’t say faster, but this post is all about easy!
Then it’s on to something like ISPConfig3, I’m still loving the ease of administration of my web hosting and haven’t seen anything else close to as feature packed!
As for the actual migration, I’ll probably be too busy with it to document it fully, but I might write-up some helpful reminders for you and I if I find the time.
usenet-title

Uploading to Usenet on debian (or ubuntu) linux

6

So I’ll start off by saying I do use a graphical user interface (gui) on my debian laptop (Linux Mint Debian Edition) and have also switched from my old love bit torrent over to usenet just for security’s sake. I’ve been reading alot of posts on the net to figure everything out as people and links come and go as does software to do what you want it to do. Here’s the easy way of how I upload to usenet using my laptop.

A few things you’re going to need beforehand.

rar, cksfv, PyPar2 and JBinUp. (cksfv, rar and PyPar2 are available in the repos. and JBinUp is availble online.)

Now you’ll notice a few dependancies are going to be needed just by the names of those apps. PyPar2 is obviously written in python so you’re going to need that and JBinUp is written in java so you’re also going to want that installed. Yes there are other apps such as newsposter (cli) but I’ve been having issues with that and really the gui of JBinUp as well as the .nzb file creations really come in handy for me.

First your going to need to break your video down into smaller parts using rar. Music files are small enough you don’t need to split them apart but movies you do. For files 1.4gb in size or smaller your going to want to split them into 15mb sizes. Here’s the easy gui way of doing that.

Right click the movie file and choose compress.

After some using this, I realized that the rar settings are set to archive not store (read slower and not recommended)

There’s a better way, and I’ve made an earlier post about how to do that using a script so you don’t have to use the commandline (after setting it up the first time that is ;) ). After using that guide, skip down to the next part starting in Green.

Once the Compress window opens click the option that says “Other Options” to expand them, then change the extention to .rar and LEAVE THE BLOODY PASSWORD FIELD BLANK!!! Then check the box that says “Split into volumes of” and set that field to 15.0 then click Create.

Once it’s run it’s path (which could take some time) you’ll be left with many files in your folder which should look something like this:

Skip to here.

Remember that the original file is NOT going to be uploaded but we’ll need it for another step later so leave it in your folder for now.

We’re going to want to create the .svf and .nfo files. NFO Files are just a .txt file that has had it’s extention changed. so feel free to use whatever text editor you feel comfortable with and create your .nfo file. I’m not going to go far into the .nfo creation as that’s really up to you what info you want to put in there, however the output from programs like MediaInfo will suit you quite well. Run MediaInfo on the original file and select view > text and you’ll get something that looks like this:

Copy the info from there and add it to your .nfo file. Your done with this step, so you can now safely remove the original file from your folder now.

Next we’re going to create the parity files. (Par2) so open your PyPar2 app and click on the create tab.

Right click on the window and add all the .rar files in your folder. The default settings will be fine for our needs, so once all your files are in PyPar2 just click on the GO button.

Choose the same folder as your .rar files to save the .par files and let it run it’s magic.

The par files are very important as they let you fix broken or missing .rar files. Make sure they are included in your folder.

To Create the .sfv file, your going to have to check into the commandline (sorry I haven’t found a gui for this part yet) so fire up your terminal emulator. (I like terminator)  Now let’s cd to your working directory which in my case is /home/daniel/NZB/example

then run the cksfv command like so.

The -b command strips out the directorys so that the .sfv file will work on anyone’s system without having to have it in the same directory structure. The > checksum.sfv will create the .sfv file instead of just printing the results to the terminal window. It should look like this:

and the output should look like this:

So now your files are rar’ed and par’ed, you’ve got a .nfo file and a .sfv file, your almost ready to post your files! Fire up JBinUp

 

In JBinUp go to File > Settings and setup your server and poster settings. I’ll wait. I can’t tell you how to enter in this info as each usenet provider has there own url’s and settings, as well as plenty of documentation on how to setup your clients so this shouldn’t be a major issue for you.

After you have your basic settings situated, click on the single (+) button to start setting the posting information. The interface is quite simple, just fill in the blanks. Set your post’s title (aka subject) and choose who’s uploading this post (if you have more then one setup) then click the add button to add the files you want to upload. You want to select every file in your folder, so a simple keyboard command of Ctrl+A will select everything for you and click the Open Button.

Once everything looks right, click Forward and select the groups you want to add this post to. The options here are too varied and numerous so you’ll have to figure out what groups you want yourself but check the alt.binaries.whatever group’s to figure out where you’re going to want to post to. Got your groups? Good! Click the “Add Job” button and it’s off and uploading!

Once your files have finished uploading it’s a good idea to create a .nzb file for them so you can share your posts easily on sites like NzbMatrix and the likes. I am not uploading this example I’ve been using so the option isn’t available for me but if you right click the file you posted in JBinUp after it’s done uploading you’ll get the option to create a nzb file. Again I highly recommend you do this :)

That’s it! Your files are now living on usenet and you have the .nzb file to prove it! Share it with your friends and let’s get some more new content on the net’s!

Screenshot-11

Getting your Zune to work in linux, kinda.

7

UPDATE! If you read the comments you’ll notice that linux has finally ported the zune over to it nativly! Please do check it out and let me know how it works for you, I don’t have a zune anymore…

 

So alright, yea, I own a Microsoft Zune.

I do really like it as well! (it’s really quite loud even if the antenna for the radio sucks!)

However I’ve recently decided that running Microsoft Windows just wasn’t going to cut it any longer, and with the fit and finish of Ubuntu I haven’t even had a wanting for anything Windows related other then getting music (and more importantly my netcasts and audiobooks) on my zune (well and photoshop…).

Most applications do recognize that I have a media player plugged in (works great for my Sony PSP however!) but being the Zune’s file content is encrypted in a fashion which renders it moot to try moving or deleting content from it that I had to find another way.

Enter in VirtualBox.

Now to be clear I’m talking about the actual VirtualBox from http://www.virtualbox.org/wiki/Linux_Downloads not the one available from the repositories in Ubuntu and I’ll get to why in a moment.

You’ll also need a valid copy of windows. Any flavor that will run the Zune software. I’m using a stripped down version of XP that I’ve cleaned up and slipstreamed using nLite.

Now download your version of VirtualBox using the above link and install it. Ubuntu users will just double click the .deb file and enter in your password and it will begin.  The reason we’re using the official (ie: Non-free as in speach not beer) is that there is no USB support in the “OpenSource” version that Ubuntu host’s in it’s repo’s and yea, your going to need USB support.

Once it’s installed we need to setup a new Virtual OS inside of it. There’s TONS of post’s out there that will explain how to setup a virtual box install so I won’t go into detail other then to say that after you have Windows installed and shutdown you need to enable USB sharing by going to: Settings>USB and clicking the USB plug icon with a “+” symbol in it and selecting the Zune that you already have plugged into your pc.

Now of course you should have already installed the Zune Software inside of your virtual os (I shouldn’t have to tell you that should I?) and whatever other software you wish to use. Also the “Shared folders” inside of VirtualBox is quite handy as well. (I’ll touch on them a little later as well)

Now here’s where I might actually be able to save a few of you some headache’s. You’ll probably find out that when you go to the Zune software it’s not able to connect to your Zune even though the linux side see’s it just fine and it’s listed in your device manager on windows, the Zune software keeps telling you to try dissconnecting and reconnecting your player but it still doesn’t recognize it. DON’T bother trying to do that, it’ll just keep returning the same error. Instead, on the bottom of the VirtualBox window you’ll see that same USB icon. Right click it and un-select your Zune and then re-select it. (also make sure if your Zune is protected with a pin number you’ve already typed that in successfully.)

Now the Zune software should see and have connected to your Zune player!

As for the “Shared Folders” Setting in VirtualBox it’s handy to move music over to your virtual OS instead of trying to figure out other ways and you can, after setting them up inside of the VirtualBox settings, they are located at “\\Vboxsvr” or step by step, open up “My Computer” click on the “Folders” Button, then browse in the file tree to: My Network Places>Entire Network>VirtualBox Shared Folders>\\Vboxsvr. Here’s a screenshot for reference.

I hope that this has helped! I was tired of having a dual boot system and having to restart my laptop every time I wanted to update my Zune (it was messing with my uptime bragging rights in the IRC channel :P ) now I just shutdown the virtual os instead and keep on trucking!

Thank you SO much Oracle/Sun for making VirtualBox so great and best of all free as in beer!

Selection_018

awesome rar-sfv script for gnome – nautilus

1

So what you want to do is add this to “/home/yourname/.gnome2/nautilus-scripts” and make it executable
[codesyntax lang="bash"]

[/codesyntax]

I named the file rar-sfv and when you right click a file you’ll see a new option called “Scripts” hover over that and select the rar-sfv script and it will start asking you basic questions on how you want it packaged etc :) Works Great!

It will look something like this:

– EDIT — Took me a while to find where I originally found this and if you want the article, you can go here.

Screenshot-3

Screenlets make for a beautiful and informational desktop

6

So I just installed screenlets and have modified my .conkyrc file to provide a minimal, beautiful desktop if I do say so myself.

I’m running ubuntu 9.10 on my laptop and am using the “deep” theme for the wallpaper clock.

Here’s what it looks like:

and if you want my very minimal .conkyrc file here’s that:

[codesyntax lang="bash" lines="no"]

use_xft yes
xftfont verdana:size=8
alignment top_right
xftalpha 0.8
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes
draw_shades no
draw_outline no
draw_borders no
stippled_borders 10
border_margin 4
border_width 1
default_shade_color black
default_outline_color black
default_color 102b45
use_spacer none
no_buffers yes
uppercase no
color1 F8DF58

TEXT

${loadgraph 20,245 2f5c85 FFFFFF -l -t}
${alignr}${loadavg 1}/${loadavg 2}/${loadavg 3}

[/codesyntax]

Be glad your a linux user! Openness is beautiful!

Go to Top