Wednesday
11Mar2009

Upgrade to Ubuntu Jaunty Jackalope

Today I upgraded to Jaunty (64 bit) on my dektop. The experience was quite easy to do and the process only took about 2 hours.  This may have been shorter if a reboot was not required.  There was no mention of anything going wrong, but after the reboot I was faced with a dialog box that said it was only a partial upgrade.  I continued the upgrade and after one final reboot everything seemed to be fine.  I have not had much of a chance to play around with it but I can say that I love the new notification system.  After a history of glitches during prior upgrades I was hesitant to perform an upgrade vs. a fresh install but I will continue to enjoy the features of Jaunty Jackalope until the final version is released.  If you were planning to make the upgrade I would recommend it.  I will post more later if anything becomes an issue.

Update:

  I have had mixed results with Jaunty Jackalope. Overall it has been a pleasant experience. I have experienced plenty of crashes and bugs but I find I cannot go back to Intrepid.  I have recently learned that my intel video card is now better supported with the newest kernel and newest xorg, but I cannot seem to get it working that good in my installation. I originally took the upgrade path due to lack of installation from the live cd. Ubiquity kept crashing at the partitioner.

  I have tried the live cd and everything works out of the box. Video playback is very good and scrolling in firefox and synaptic is very fast. Trying this in my hard disk install is quite different. I am not sure if it is a conflick in packages or maybe some configuration files.  I think it may be time to format my home partition and start from scratch again.

 

 

Friday
06Mar2009

How to Setup Ubuntu for Reinstalling your applications without losing your data

  I can't remember where I learned this but I use it whenever I need to reinstall Ubuntu on my machines, or when I am doing a fresh install on a new machine. What this does is very simple. The first step creates a text file with a list of installed programs and after reinstalling Ubuntu you will be able to apply that list and reinstall all of the programs without searching through endless amounts of packages trying to find out what programs you are missing.

  Pros: Very easy to do. Just three commands and you are back up and running. Not much interaction from the user.It just works.

  Cons: Requires some initial setup. Depending on the amount of applications you originally had installed, downloading and installing those packages may take some time.

  Prerequisites: Your 'home' folder must be on a separate partition. I will explain later in this article. Let's get started. The first step you will have to do is create a text file. Go to 'Applications>Accessories>Terminal' Type in the terminal

 

Code:

sudo dpkg --get-selections > backup.log

  You will be required to provide your user password. Now you have created a text file in your home directory called backup.log. Keep this file somewhere safe. Maybe a thumb drive or something. Or you could email it to your yahoo or gmail account. You also have a very small backup of your installed programs. This will not backup any of your files. ie - photos, documents,videos, etc. Standard backup practices apply to those types of files. Next you can take this file to any computer running Ubuntu and install all of those applications.

 

  If now is the time, reinstall Ubuntu and make sure that after the install you have that 'backup.log' file in your home directory. Now you can apply that to a list of programs to download and install. First you will have to make sure that all of your repositories are enabled that you originally downloaded the software from. If you added sources to your sources.list file, then you will have to do that now before you go on. If you haven't added any repositories, then you are ok to continue. Next you will have to go back to a terminal and type

Code:

sudo dpkg --set-selections < backup.log

  Supply your password if asked. The next step requires a package that is not installed by default in Ubuntu. To install the program, type in the terminal Code:

sudo apt-get install dselect
  Supply your password if asked. Now all that is left is to type one last command into the terminal. Now type Code:
sudo dselect
 
Supply your password if asked. Now select 'install' Now you can walk away, make a beverage and come back to check on it once in a while. You may have to click 'next' or 'ok'. Once it is finished you can exit. Now you are finished and you can use all of the programs you were using before we started this procedure. Notes: The reason for having your home folder on a seperate partition is because of the hidden files and folders in your home folder. All of your program's settings are stored in your home folder. For example: all of your bookmarks, extensions and browsing history in firefox are stored in there as well as your desktop wallpaper and all of your settings. Having your system set up this way allows you to reinstall Ubuntu without erasing your home folder. Once the programs are all installed they will still have the same settings as they did before. If you are a former windows user and have had to reinstall the OS, then you know that it can take many hours to set windows up the way it used to be. Not with linux. If you want to install a dual boot system with Fedora and Ubuntu, just make sure that both of the installs use the same home folder. That way both of your desktop settings will be the same. Enjoy!

 

 

 

Friday
06Mar2009

Convert TS files to DVD in Linux

  I have a dreambox satellite receiver and it records to a transport stream (TS) mpeg2 form. Since dvd's are also in mpeg2 format there is no need to transcode the TS files. I have put together a script that will do the job very quickly. I borrowed some code that I found in forums and on some websites. I also had a little help from the ubuntu forums to get some of the zenity options working correctly.

  This script only requires that you have previously installed dvdauthor, mkisofs, and mencoder. Some distrobutions may not already have these packages installed.

  The TS2ISO script will also require that you have some extra room on your hard disk for the new iso file and also the temp files. Generally at least double the size of the original TS file.

  When you run the script you will be asked what file you would like to convert. Then you will be asked what you would like to name the output file.

  Next you will be asked what the audio pid of the file is.

(This was due to multiple audio tracks in the stream)

  Some recordings have multiple audio in the stream and some do not.

  At this point 'mencoder' will find out the details of the video and if it has several languages in the stream. This is an example of what you will be looking for

VIDEO MPEG2(pid=4898) AUDIO MPA(pid=4899)

  If the the video and the audio pid are only one number apart you can just enter the audio pid number. If the numbers are two numbers apart, ie: 4898 and 4900 then there is more than one audio language in the stream. (maybe spanish).

 If you would like to select english then select the number between the audio pid and the video pid.

 If you would like to burn in the other language then select the actual audio pid number.

  Once the script has completed, the tmp folder will be deleted and there will be a file in the same folder that you ran the script from named "output".iso.

  You are now ready to use your favorite burning software to burn the iso to disk.

  Or if you are using nautilus you can just right click on the iso file and select 'write to disk'

  That's it.

  I have only tested this on Ubuntu but it should work in any other distribution.

  I have had trouble with older dvd players, playing the video back properly.

  Inside the script you will see that I have set the chapters to 5 minute intervals.

  As you will see in the script, it is easily changed to 10 minutes.

  I do recommend testing the script to see if the language is ok and that there are no video problems. I like to use vlc media player to test the iso files.

  If you would like to make changes to this script and submit them to me, I would gladly give credit here on my site.

 

Update:

  Added detection of user cancelation

Update:

  I finally turned this script into a nautilus script Pay close attension to the way that the audio pid is presented to the user.

  The only was I was able to make this work was to output some information to a text file and then have 'ts2iso' open the file in 'gedit' so that you can provide your audio pid. If you have a different choise of text editor you can simply change it in the script.

  Just save the script to '~/.gnome2/nautilus-scripts/', make the script is executable

chmod +x ~/.gnome2/nautilus-scripts/ts2iso

  Then all you have to do is right click on the .ts file and select Scripts>ts2iso.

 

 

Friday
06Mar2009

Bash Script Shortcuts

  I have been playing with some better ways to execute my scripts that I use alot.

  I have found a solution that works well for me and I hope you can make use of this too. I have a couple of dozen scripts that I use and about half of them I use all of the time. The first thing I did was made a bash script directory in my home folder. I named it 'bin'. Next I edited my home/<user>/.bashrc file and added these lines to the bottom of the file.

PATH=$PATH:~/bash 
export PATH

 

  What this does is includes the directory you put here in the list of executables.

  Next I closed any terminals I had open and when I reopened them I could just type in the name of the custom script and it will run without navigating to the directory where the script is stored. From now on, all you have to do is save your scripts to that directory, make them executable, and you are good to go. Some of my scripts had been kept on my data partition so it would get rather tedious to either type in the full path or navigate to the directory. I found this to be a big time saver.

  One of the things I find myself typing in the terminal alot is "sudo apt-get update" and "sudo apt-get upgrade".

  So I wrote a script to do it for me. The script looks like this


#! /bin/bash


sudo apt-get update && sudo apt-get upgrade

  I saved it to me home/drew/bin folder and named it updateme.

  Now when I am in the terminal I can just type 'updateme', and this issues two commands at once. Get the idea? This is great if you find yourself executing many commands throughout the day over and over again. You could just put all of your commands into one script and add it to your script directory. Give it a clever name and you are all set.

 

 

Friday
06Mar2009

Adding SATA and other drivers to your windows installation cd

  I am trying very hard not to use windows but lately I was forced to. I am the proud owner of a laptop without a floppy drive, and no bios updatter for linux. I thought I would bite the bullet and install windows to update my bios. Not quite so easy. My windows install cd did not recognize my hard drive and when I used the F6 option to install my SATA/RAID drivers from another source, windows could not see my usb drives iether. I searched high and low and could not find a clear answer to my problem. I found several forum posts of people having the same problem as me and no solutions. Just a lot of people saying 'never mind'.

  I don't plan on blogging much about windows stuff but I am all about hacking and this is a hack/solution that I had to do to make something work. I will include a list of some of the struggles I had to go through later on in this article.

  What I used was 'Nlite'. I have used it before trying to customize my windows installation and did not have much luck with it. I decided to give it another try. I was able to find a post in one forum linking to a file on intel's website called 'Intel Matrix Storage manager'. I downloaded and extracted this file and added it to my list of drivers to include in the windows disk. While I was at it, I downloaded all of the drivers for my laptop from the toshiba website and added them as well. I also thought this would be a good time to slipstream SP3 into the cd. Nlite took care of this too. After a couple of nights of beating my head aginst the wall, I had a new windows xp install cd with drivers and SP3. I rebooted my laptop with my new cd in it and it booted up, recognized the hard drive right away and I was able to install windows xp on my newly vulnerable laptop. All of my hardware worked right out of the box. I updated my bios without any problems and I think I will keep this copy on my hard drive for now. I don't know if toshiba will release any more bios updates for this laptop but I will keep windows on a small partition, just in case.

Trial and Error

  At first I had cleared some space at the end of my hard drive and the windows install cd did not see any hard drives that it could install to. So I used gparted live cd to move my other partitions to the end of my drive and leave some free space at the beginning of the drive. Still no success. I tried installing to an external hard drive that I use for backups. After the first reboot I got the error 'hal.dll' (or something) is missing. Please fix this and retry. So next I tried an old hard drive that I had pulled from a dying pc that still had a functional install of xp on it. The first time it saw the MBR and tried to boot but something went wrong. On the second try It could not find the MBR. I know I probably could have just used the vista dvd that came with my laptop, but where is the fun in that? Besides, XP only used a couple hundred megabites of memory on a fresh install and vista uses a gig. Also, I don't like the look of vista or it's functionality.