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.
 
support by: infomediaku.com