Posts tagged ubuntu
Installing Ubuntu Server 12.04 LTS using Hardware Raid1
19So 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"]
1ls -l /dev/mapper
[/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:"]
1/dev/mapper/sil_biagdfaaeabh
[/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!
|
1 |
sudo apt-get –-no-install-recommends install ubuntu-desktop |
Uploading to Usenet on debian (or ubuntu) linux
6So 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
|
1 |
<strong>cd /home/daniel/NZB/example</strong> |
then run the cksfv command like so.
|
1 |
<strong>cksfv -b *.rar > checksum.sfv</strong> |
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!
Getting your Zune to work in linux, kinda.
7UPDATE! 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
) 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!
awesome rar-sfv script for gnome – nautilus
1So what you want to do is add this to “/home/yourname/.gnome2/nautilus-scripts” and make it executable
[codesyntax lang="bash"]
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 |
#!/bin/sh cd $NAUTILUS_SCRIPT_CURRENT_URI LABEL=$(zenity --entry --title="RAR Output Name?" --entry-text "$1" --text "Type the output name here.. set to the input name of the file you will rar, you can change this name to anything you like BUT DONT HAVE SPACES AND PLEASE REMOVE. example .avi .rar .mpg mpeg .flv .zip FROM THE END You Just need the name you want " $1 2>&1) if [ "$?" = 0 ]; then zenity --title Replay --info --text 'You hit OK' --auto-close else zenity --title Replay --info --text 'You you Canceled' exit fi pri=$(zenity --list --title "Set the Priority" --height 330 --text "Please chose your Priority setting. 0 is no priority 3 is min 6 is above min 12 is mid 19 is max" --radiolist --column "Pick" --column "Rar Priority" FALSE "0" FALSE "3" FALSE "6" TRUE "12" FALSE "19" 2>&1) if [ "$?" = 0 ]; then zenity --title Replay --info --text 'You hit OK' --auto-close else zenity --title Replay --info --text 'You you Canceled' exit fi size=$(zenity --list --title "Set the Archive Size Units" --height 270 --text "Please choose the units that will be used (ex. 50m is 50 MB)" --radiolist --column "Pick" --column "Size" FALSE "1m" FALSE "3m" FALSE "5m" TRUE "15m" FALSE "50m" FALSE "auto" 2>&1) if [ "$?" = 0 ]; then zenity --title Replay --info --text 'You hit OK' --auto-close else zenity --title Replay --info --text 'You you Canceled' exit fi comp=$(zenity --list --title "Set the Archive Size Units" --height 247 --text "Please chose you compression setting. 0 is to store (no Compression) 3 is mid 5 is max compression" --radiolist --column "Pick" --column "Compression Ratio" TRUE "0" FALSE "3" FALSE "5" 2>&1) if [ "$?" = 0 ]; then zenity --title Replay --info --text 'You hit OK' --auto-close else zenity --title Replay --info --text 'You you Canceled' exit fi DIR=$(zenity --entry --title="RAR Tmp Directory?" --entry-text "/tmp/"$LABEL"" --text "Tmp Directory Location... Just hit ok or enter here. Nothing needs changing as its the temp folder to creat the needed logs and so. Everything Will be deleted from the tmp when we have finished. Also When all rars are complete a log window will show up with the rar log. To make sure we have no errors" 2>&1) if [ "$?" = 0 ]; then zenity --title Replay --info --text 'You hit OK' --auto-close else zenity --title Replay --info --text 'You you Canceled' exit fi mkdir $DIR (nice -n $pri rar a -v$size -m$comp -vn $LABEL.rar $1 >> $DIR/$1.log) 2>&1 | zenity --progress --pulsate --title "Progress" --text "Creating your rars." --auto-close --auto-kill; then if [ "$?" = 0 ]; then zenity --title Replay --info --text 'You hit OK' --auto-close else zenity --title Replay --info --text 'You you Canceled' exit fi zenity --info --title "Done!" --text "Archiving complete! You can find the archive(s) $LABEL in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS as $LABEL.rar" --auto-close --auto-kill; zenity --title="RAR Completed log" --height 300 --width 500 --text-info --filename=$DIR/$1.log 2>&1 for file in $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS; do if [[ -d "$LABEL" ]]; then exit fi filename=$(echo $LABEL | sed -e 's/.*\///g') arg=`echo $arg $LABEL.r*` done $LABEL=`zenity --entry --title="Make SFV $LABEL.rar" --entry-text "$LABEL" --text="Insert desired name for the .sfv file it will auto load the name you entered for your rar files just click ok"` zenity --info --title="Cksfv" --text="cksfv $arg > $LABEL.sfv" --auto-close; (cksfv $arg > "$LABEL.sfv") 2>&1 | zenity --progress --title "Make SFV" --text "Making..." --auto-close; zenity --info --title "Done!" --text "Everything is now completed ENJOY :)"; rm $DIR/$1.log |
[/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.
Screenlets make for a beautiful and informational desktop
6So 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!


















