Archive for the ‘Linux’ Category

On Ubuntu 9.10 and SATA

February 23, 2010 3 comments

DISCLAIMER: I am by no means an Ubuntu or Linux expert. The information in this post may not be the most correct or efficient way to solve the issue that I describe. It is simply the resolution I found and what worked for me. Conduct all changes at your own risk and remember to always backup your data before doing work on your system.

I finally decided to bite the bullet and turn my desktop computer into an Ubuntu machine. Up until now I’ve kept it running windows for the ease of gaming. I haven’t been gaming much lately and had never run Linux on a machine with a halfway decent graphics card or processor so I thought it would be nice to see what Ubuntu could kick out on something other than my lower end laptop.

I’ve done many Linux installs in the last few years, most of which have been Ubuntu or other Debian derivatives and have yet to run into any major issues. This install decided to break that cycle. I could boot off the Ubuntu 9.10  live CD perfectly, but after the system loaded my hard drive was nowhere to be found. After testing a myriad of things to insure that it wasn’t something to do with 9.10 I figured it had to be a hardware issue. I’ll spare you the gory details of my lengthy searching and simply say that I ended up at a bug report that mentioned an issue with Ubuntu recognizing SATA drives. This, as it turned out, was my problem.

The issue can be resolved on the initial live CD boot by doing the following:

1- Insert the live CD and power on the machine

2- When prompted with menu choices hit F6 for other options, then hit ESC to exit the pop-up

3- There will be a line of boot options at the bottom of the screen. At the end of that line type: pci=nomsi

4- Hit enter.

Once you’ve completed these steps you should be able to see your SATA drive and complete the install as usual. After this the two most common scenarios are: you have a dual boot setup with Windows and Ubuntu, or you only have Ubuntu installed. If you have a dual boot system set up then, after the post install reboot, Grub should come up normally and you will be able to perform the next set of instructions. If you only have Ubuntu installed then you will need to put the live CD back in and boot from it again; this time select the”boot from the local hard drive first” option.

Regardless of which of those two methods you used, you should end up at the Grub boot loader. In order to successfully mount the SATA drive and load the OS you will need to do the following:

1- Select the desired kernel to boot, most likely the first on the list.

2- Hit “e” to allow you the edit the boot commands

3- Go down to the line that starts with “linux /boot/…” and ends with “… quiet splash”

4- To the end of this line add:  pci=nomsi

5- Hit enter and the system should boot correctly into your newly installed OS.

After you’ve got Ubuntu up and running successfully there’s one last thing to do. You need to add the “pci=nomsi” command permanently to Grub so you don’t have to complete those last four steps every time you boot up your machine. To add the command follow these steps:

1- Open up a terminal and backup your grub.cfg file:  sudo cp /boot/grub/grub.cfg /boot/grub/grub.cfg.backup

2- Edit grub.cfg in the editor of your choice, I used nano:  sudo nano /boot/grub/grub.cfg

3- This file will have the same information you saw when editing the boot commands in the last step three.

4- Repeat steps 3 and 4 from the last set of instructions.

5- Save the file and exit. For nano hit ctrl+x, yes, and hit enter

After doing some more research about Grub2 I came across this extremely helpful Ubuntu forum post. As it turns out, my previous instructions for editing grub were wrong (see: struck out text above). With Grub2 the following steps are correct:

1- Open up a terminal and back up your default Grub file:  sudo cp /etc/default/grub /etc/default/grub.backup

2- Edit the default grub file in the editor of your choice, I used nano:  sudo nano /etc/default/grub

3- Change the line GRUB_CMDLINE_LINUX_DEFAULT so that the quotes include:  “quiet splash  pci=nomsi”

4- Save the file and exit: for nano it’s ctrl+x, yes, and enter.

5- Once you are back to your terminal prompt type: sudo update-grub

6- The command should output that it is modifying grub.cfg, when it’s complete you can exit the terminal

When you’re done with these steps you should be able to remove the live CD and boot normally. Keep in mind that after any system upgrades or changes that modify Grub you will have to edit grub.cfg again in order to resume normal booting. With the corrected Grub2 editing instructions I added your custom settings should not need to be changed if system updates or changes modify grub.cfg.

I haven’t done enough follow up research to know if this whole situation is a bug that will be fixed in the future or if it’s an issue that will remain. Admittedly, I couldn’t even tell you the specifics of why the fix works or is needed. I’m just your average Linux user who found a solution and wanted to share the information.

If you have any questions, or improvements on the info in this post please leave a comment.

Categories: Linux, Ubuntu

My Ubuntu Background Changing Script

February 8, 2010 Leave a comment

I am an indecisive person. To the extreme. Naturally this personal trait lead to some issues when I decided that I wanted to change my background image on my Ubuntu laptop.

When I started looking I found no lack of Linux and Ubuntu related wallpapers available and came across many that I liked. I saved all the images to a directory, settled on one, and sat back to enjoy my newly decorated desktop. Little did I realize that approximately thirty minutes later I would be changing it again. Before long I came to the conclusion that, left to my own compulsions, I would be manually changing my background image at an annoying rate forever. I’m no scripting guru by any stretch so this situation seemed like a great opportunity to learn and solve a problem at the same time.

The script is designed to check a designated directory for image files to use as your desktop background. You can use the Ubuntu default of /usr/share/backgrounds or set a custom location in the configuration area at the beginning of the script. Once a list of the available images is generated it will pick a new one to set. Finally it will check to make sure that the new background is not the same as the current one, if it is another will be selected; if not the new background will be set.

To automate the process you simply need to add a cron job to handle running the script. For example, if you wanted your background image to change every ten minutes you would add the following line to crontab:

1-59/10 * * * * /path/to/the/script

To find out more about scheduling cron jobs, or cron in general, Google is your friend.

If anyone has questions, tips, code improvements, etc. please feel free to leave comments!

Script code can be found here!

Categories: Linux, Ubuntu

Ubuntu 9.10 and the Stuff I Can’t Live Without

November 12, 2009 Leave a comment

Ubuntu logo

Despite enjoying Crunchbang as much as I did, when the Karmic Koala was let loose on the world I had to give it a go. I’ve been running it for about a week now and aside from one quicky resolved issue it’s been smooth sailing.  There is a plethora of Karmic reviews available all over the web so rather than reiterate what has been already stated, I thought I’d use this clean install to take note of some of the applications that I install every time a new distro hits my machine.

Most of the Linux distributions I use are Debian based so the install process is generally the “sudo apt-get install” approach. I know there are ways to take the packages you have installed and back them up for ease of installation at a later date or on another machine. That’s something I should have done a long time ago, and something that will probably continue to get pushed into the future >.<

Soooo… onto the applications.

Name: VLC
Install Command: sudo apt-get install vlc

VLC is a media player that plays, well, I’ve yet to come across anything it won’t play. I actually use this program on all my Windows and Linux machines as my primary media application.

Name: Proxychains
Install Command: sudo apt-get install proxychains

This is the program I use whenever I want to create a ssh tunnel to direct my web traffic through. It’s a breeze to configure and is awesome for browsing at public hotspots. I’ve also created a bash script that checks to see if the tunnel exists and, if so, opens Firefox with the correct settings. I may do a later post on how to configure and use this app.

Name: Virtualbox
Install Command: sudo apt-get install virtualbox-ose

Virtualbox is an open source virtualization application. Configuring virtual machines (VM) took some getting used to initially, but by the second or third setup I seemed to have the process down pat. The only extended issues I’ve had have been with getting the VM to recognize usb on the host machine. I haven’t put the time into ironing it out becuase it’s much easier to set up a network share between the virtual and host machines to transfer data. Though it could be an issue if you want to run iTunes and interact with your iPod on the VM.

Name: Gpodder
Install Command: sudo apt-get install gpodder

This is what I use to manage my podcasts. It’s very simple to use and has a great feature that allows you to save your list of podcasts so that you can download it when needed. If you have a long list of shows, like I do, this can save you a ton of time by not having to track down everything and re-add the feeds. Gpodder interacts well with my iPod running Rockbox firmware, another piece of software I highly recommend.


I think that covers everything that I make sure is on my machine for a fresh Linux install. The only other step that is required for my laptop is activating the hardware drivers for my Broadcom wireless NIC. Once that is done and these applications have been installed I have the ability to connect, securely if needed, to the internet just about anywhere. If you can do that then you can get most, if not all, of the information, drivers, or other software you may need.

Feel free to leave any questions or notes about what you software you can’ t live without in the comments.

Categories: Linux

#! Crunchbang Linux

September 9, 2009 2 comments

After hearing about Crunchbang Linux a few times on The Ubuntu UK Podcast I decided to give it a try. Crunchbang is a derivative of Ubuntu which is what I have been running on my main laptop now for a few months.  Crunchbang itself has been created to “a great blend of speed, style and substance” which is accomplished in part by using the Openbox window manager. I didn’t think that Openbox would make much of a difference aside from the lack of the top and bottom panels and getting used to the new dropdown menu. Much to my surprise I’ve been extremely impressed by the convenience of the right click style drop down main menu. It’s great to be able to call up the menu from wherever you are on the screen, the collective time saved moving your mouse to the upper right hand corner really adds up.

The main menu is also incredibility easy to customize. The config file is a simple XML document that, even if you aren’t familiar with XML, is  easy to sort out and add your own items. There is also a GUI that can be used to edit the menu.  As a matter of fact, to say this OS is “highly customizable” is an understatement. I’ve yet to find any part of the interface that isn’t more a couple clicks away, and that’s only if you don’t know the location of the particular config file. While any Linux distro is highly customizable this is one of the easiest I’ve come across.

There’s plenty of things that I’m not covering here, mostly becuase I’m new to this whole writing/content creation stuff. I plan on posting more info on the distro including some of the modifications to my scripts to get them working in Openbox. If you have any questions about my Crunchbang experience feel free to ask in the comments. As a lightweight, snappy and convenient Linux distribution Crunchbang Linux looks like it’s going to be hard to beat.

Categories: Linux Tags: