Kamis, 18 Desember 2008

Repairing a corrupted XFS file system

I have been testing out the XFS file system. When 8.10 came out I did a fresh install with XFS as the partition for the root directory. Everything was working fine until one day I was having trouble running programs like Firefox and mplayer. Nothing seemed to be working very well. Programs would load but then all of the sudden they would quit. Finally I tried to log out but all I got was a whitescreen and the computer would not shut off. I did the unthinkable and pressed the power button until it turned off.

Two days later I tried to start up my laptop only to be greeted with an error message about the root filesystem not being able to load. I tried the alternate kernel, but that would not load either. It seemed like the drive had not mechanically failed because the bootloader would come up and it would try to mount the root file system. I tried putting in the install CD and using rescue mode but that was not any help. All it did was tell me that it could not load the root filesystem. After doing a few searches I found that running xfs_repair was my best option but the only way to do that was to take the drive out and connect it to my desktop computer through a USB to ATA-66 adapter.

Once connected to my desktop all that was needed was to figure out which /dev/??? it was. A quick check in dmesg showed it to be /dev/sdb3. I then ran:
xfs_repair -L /dev/sdb3
When that finished I was able to mount the drive and get any files I wanted off of it.

I put the drive back in the laptop and it was able to boot, but it was still having problems with some programs. Right now it is getting a fresh install of Ubuntu 8.10! (but this time I am sticking with ext3)

Jumat, 05 Desember 2008

SATA Drive Power Management in Linux

I recently purchased a new 1TB HDD for a new power efficient server I built and I wanted to share a few of the power saving tips I discovered after reading a few sites.

File system

I was originally going to use ext3 for compatibility reasons, but after reading into JFS more I found that it's lighter on CPU and a bit more power friendly, so I used it to format this new drive. I also disabled atime and diratime within /etc/fstab.

/dev/mapper/jezebel-homevol /home jfs noatime,nodiratime 0 1
hdparm

Many newer drives support advanced power management on the drive itself, mostly at the sake of performance but since this is a data drive that sits idle most of the time the hit is negligible.
sudo hdparm -M 128 /dev/sdb
sudo hdparm -B 100 -S 240 /dev/sdb
The first will enable Acoustic Mode and the second will set spin down after 20 minutes of idle time. You can make the permanent by adding them in /etc/hdparm.conf.

Kernel params

Most of these tricks are for laptops, but they work just as well on an always-on server by enabling them in /etc/sysctl.conf.

#Specific Flash and Power Tweaks
#
#Set Laptop mode for less disk writes
vm.laptop_mode = 1
#
#Set Dirty writeback higher
vm.dirty_writeback_centisecs = 1500
vm.dirty_expire_centisecs = 1500
vm.dirty_ratio = 25

#
#Set swappiness
vm.swappiness = 20
Swappiness is set lower than default to keep swap around in case it's needed but to not use it very much.

Kamis, 04 Desember 2008

Installing LiVES

Another good video editor out there is called LiVES. I wanted to test out the latest version so I went to GetDeb for the download. The website getdeb.net is maintained by a volunteer group that makes fresh .deb packages featuring some of the most used software in Ubuntu. Sometimes the Ubuntu repos can get behind and not have the latest and greatest, so this website is a great companion when you need or want to have the latest version of certain software. So here are the steps:
  1. Download the .deb file from getdeb.net.
  2. Double-click on the file to start up the GDebi package installer.
  3. First it will tell you that you should install the one in the official channel. Nevermind the message because you are installing the latest.
  4. The package installer will most likely tell you that it needs to download some other packages for dependencies.
  5. Click on Install package and when the installer finishes you can find LiVES under Applications>Sound & Video

Selasa, 02 Desember 2008

Installing Cinelerra

Recently I have needed to do some video editing and wanted to check out some of the best video editors for Linux. It looked like Cinelerra had the best options but it was not clear how to install it easily. I did not want to install from source so after some careful searching around I found the easy way. You can also view these instructions here (I made some additions as they did not work for me as they were written).
  1. Install a repository using this link. After you download the package make sure you install it with the GDebi package installer.
  2. Open a terminal and type this command: sudo apt-get update
  3. Now decide which package you need; cinelerra (x86 and x86_64 without opengl 2.0 video card) cinelerra-generic (x86 and x86_64 with opengl 2.0 video card). You can see the other versions on the page I mentioned earlier under the installation instructions for Hardy
  4. Install your package using apt-get: sudo apt-get install cinelerra-generic
  5. Once installation completes you should be able to find Cinelerra under Applications>Sound & Video.
So far I found the program quite useful and powerful. There are some good articles out there about using it to author DVDs if you do a quick search. One of the articles I read was on linux.com and it was quite helpful to give me a good start on using Cinelerra for editing video. You can find that article here.

Dual Monitors with Nvidia GeForce 8600 GT

Once you install the restricted hardware drivers and you have your Nvidia card working you can then proceed to set up dual monitors. Open up System>Administration>Nvidia X Server Settings. This will open up a dialog box like so...
This nice GUI will allow us to set up our dual monitor interface. I will say that the program can be quite fickle at times and sometimes it will not work even though it should work. Just keep trying with the options until you get a working combination. I wanted my second monitor, which happens to be a regular 15" CRT, to simply be an extension of my desktop. This is done using the TwinView configuration option as seen in the next photo.

And the options for my second monitor...
Once you get the right settings made make sure you click the Save to X Configuration File. If you don't click that then next time you start up all of your custom settings will be gone and you will have to play around with it again.

Setting up the dual monitors was fairly quick for me. Took approx. 10 minutess of playing with various settings to get it to display just like I wanted it too. If you have an Nvidia card you should be able to set these up without too much hassle using similar options like I did. Of course if you want to do a separate X screen you could choose that as well instead of the TwinView.

Jumat, 07 November 2008

A Dark Cloud

Something I wrote on Nov. 5th:

Today we stand as one nation to lift up our first black President of the United States. The road that was paved with the blood of so many has led us to this point in history, the monumental moment cannot be overstated. Barack Obama is our 44th President and the culmination of so many hopes and dreams. From his grandmothers love to Dr. Martin Luther King Jr’s sacrifice President Obama now stands as the validation for so many embattled souls. I am proud to be an American, I am proud to have been part of such a historic event. The chant “Yes we can” will forever be emblazoned into our hearts and minds. As I watched President Obama’s speech I could only marvel at the significance, trying to soak in every moment. Imagining what it will be like to speak of this moment to my grandchildren I felt lost in a sea of joy and honor. The United States of America is truly great.

However a small black cloud hangs over those of us waking up in California. With only the smallest of margins the constitution of our great state is now exclusionary to gays and lesbians. This morning I can only imagine the sorrow of those families who are so personally touched by this injustice. It angers me that on this great day California has chosen to take a step backwards. Marriage, first and foremost, is about love and commitment. Yet it is apparent that many people hold gender to be a much more significant factor when defining marriage. There is much to be said about this, but one word embraces my true feelings. Disgraceful.

Selasa, 04 November 2008

Why Today is Importatnt to Me

In 2004 I had just moved to California with my brother. The Iraq War was in full swing and starting to take a turn for the worst, it was constantly rainy in San Diego, and I had just started a job that I wasn't sure would go anywhere. That Nov 2nd I stood in in with my brother while it rained on us and my fellow citizens. For the rest of the day I followed the election online while at work, listened to Air America on the drive home and heard Jeananne Garafalo and her co-host strain for some optimism of the results while the rain kept falling. I watched the cable news networks call each state, and had some glimmer of hope when it came down to Ohio, but early in the morning of Nov 3rd it was considered over. All the while I was reading forums and boards online, feeling even more distraught by the things my fellow citizens were saying. Seeing them cheer and celebrate the re-election of who turned out to be the worst president in the history of our nation.

This year is different. There is no rain, my career is in full gear, I have a wonderful supportive girlfriend, and things overall are better. Unfortunately for our country things are getting worse, the result of 8 years of unabashed hubris on the part of our leadership and those who followed. Our economic situation is considered dire and with the way things are going there's not much to look forward too.

But that will change tonite.

After following the election cycle these past months I am confident that tonite will be historic, and Barack Obama will be our 44th president. Even with all the problems we as a nation face at this moment, his campaign has delivered on it's promise: Hope

I know that tomorrow will be a better and brighter day, and that we as a nation can come together and climb back up that hill to shine unto the world.

Update: It actually is raining, which for the most part is pretty nice and doesn't dampen my spirits at all.
 
support by: infomediaku.com