Reinstall Ubuntu without losing your data

Thursday, February 28, 2008
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

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. 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 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

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


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


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. 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!

Compiling the linux kernel 2.6.24 in Ubuntu for the intel iwl4965 driver

Saturday, February 23, 2008
I have decided to try to compile my laptop's kernel to the latest 2.6.24 from kernel.org.
I followed the directions from Dave Yates at the lottalinuxlinks podcast.
http://lottalinuxlinks.com/blog
I tried several times and did not have much luck. The first time I had my wireless card working (intel 4965) but my sound card was not working. I did not test this for very long as I really like to have sound on my machine. I decided to try again. The next time I tried to compile I had my sound problem fixed but my wireless had stopped working. So, back to the drawing board. I tried again and again without success. Searched google and the Ubuntu forums and I was able to find one post stating that to get the iwl4965 module to load at boot you would need to copy the files from /lib/firmware/ to /lib/firmware/
so in the terminal I typed

sudo cp -r /lib/firmware/2.6.22-14-generic/ /lib/firmware/2.6.24.2


I also downloaded the latest iwl4965 microcode from the site http://intellinuxwireless.org/
placed the file iwlwifi-4965-1.ucode into the folder /lib/firmware/2.6.24.2 and then continued to compile the kernel. After about an hour and a half the kernel had compiled and the deb packages were ready to install. I installed the deb packages and rebooted the machine and the wireless and sound worked great. The wireless card is now stable (24 hours now and no disconnect) and my sound works as well as compiz 3d effects and all of the wobbly goodness.
The only thing that is not working is my virtual machines - virtualbox & vmware-server.
This isn't really a big deal because I can always reboot my machine and use the old kernel.
The other thing that stopped working is my built in webcam. Not a big deal either. I can live without it.

My machine seems to be a bit more snappy now that the kernel is optimuzed for my intel processor. Graphics seem a little crisper and the whole system just seems to be better and more stable than it was before.
I guess I could have waited until the next release of Ubuntu ( Hardy Heron ), but I just didn't want to wait.
Maybe I will try fixing the other things that broke this weekend.
I will post my results if they are interesting enough.

Toshiba U300-NS5 on Ubuntu

Monday, February 18, 2008
I have recently purchased a laptop from Toshiba and I absolutely love this thing.
The first thing I did was boot into Vista and snoop around.
That took about 5 minutes.
Then I took my Ubuntu 7.10 cd and layed down a fresh copy of linux on the hard drive.
Out of the box the display did not work correctly and the sound was not working at all.
Getting the display was kind of a treat since I was fortunate enough to get the new intel x3100 or gma965 chipset in my new machine.
After a little searching around I found that a lot of people were trying different things that may or may have not worked but what I came to was a blog post stating that it was as easy as typing in the terminal 'sudo apt-get install linux-backports-modules'.
Sure enough, this is what I needed. After a reboot everything worked perfectly.
My display fit the screen as well as the resolution. Compiz worked right away as well as my sound card.
After a couple of months of enjoying my new machine I decided it was time to get rid of windows and reclaim my hard drive for Ubuntu.
I installed a program called 'remastersys' from the linux mint repositories and it woked great.
I was able to install an exact copy of my system backto the hard drive with the live install cd that I had created with remastersys.
WOW!! That was awesome!
Coming from a windows background, I have never been able to do something like that before.

My overall views of the Laptop and the software that I have mentioned here, five out of five penguins.


Links back to sources:

http://www.howtoforge.com/ubuntu-linux-mint-livecd-with-remastersys
http://www.ubuntu.com/

Update:
I am still using the same laptop. Now running Ubuntu 9.04 Jaunty Jackalope. and soon to be 9.10.
I am still enjoying the laptop and have no complaints about this hardware.