Archive for the ‘Technology’ Category

Rescuing your Linux system from a failed grub install

Saturday, December 13th, 2008

It is bound to happen at some point. You’ve installed the latest kernel or you’re attempting an upgrade and now your system just won’t boot. The screen shows nothing more than GRUB. If your system isn’t able to get past the GRUB prompt and it isn’t because of a hard drive failure then chances are very good that you can rescue your system. This routine will work best if you created a non LVM boot partition or if your rescue cd includes the LVM tools.

This post assumes you are running a RedHat or Fedora based system but the concepts apply to all systems that use grub to boot. It also assumes you have a relatively recent install cd.

To get started, insert your install cd. In my rescue scenario I used a CentOS install cd. When the install has loaded to the initial screen enter ‘linux rescue’ and press enter. The cd will boot like normal and ask about your preferred language and keyboard layout. Continue until you are asked if the rescue routine should find any installed systems. If your root directory exists in LVM you should say no, unless you the rescue cd you using includes LVM tools. It isn’t important to mount root anyway, just your boot partition.

When you are at a prompt, create a boot directory at / and mount your boot partition there. In a typical RedHat/Fedora setup it will be on /dev/[h|s]da1. Next, rename the current device.map files to some other name. We’re now ready to reinstall grub.

Type grub and press enter. You’ll now be in the grub interface. Type ‘root (hd0,0)’ and press enter. Next, type ’setup (hd0)’ and press enter. Some text will flash by with, hopefully a success message. If you see success you should now be able to reboot into your Linux system.

Time Machine saves me again

Monday, December 1st, 2008

Lately I’ve been talking a lot of talk about how great the Mac platform is. At work I go back and forth with a coworker on the merits of Linux and OS X. Of course he claims that Linux is all you need and I’m confident that the Mac is where it’s at. The reality is that OS X suffers its own set of issues which I have talked about in the past. No OS is perfect, just a matter of which one best fits your needs.

Anyway, through no fault of my own I managed to royally screw up my iTunes library to the point where some of the files were pointing to random objects in my backup drive. I have no idea how. At the same time my iPod Touch would simply not cooperate. Many files that I normally sync were listed as missing including over half of my largest play list which is still just a small subset of my entire collection.

So anyway, what’s my point right? My point is that I was able to save myself a ton of work simply because I turned on Time Machine.

Everybody says, “make sure you make a backup” but lets be serious, who actually does? This is one of the many reasons I claim OS X to be one of the best operating systems available for “normal” people. No other system that I am aware of provides such a simple, easy to use and surprisingly robust backup AND restore system. It is so easy you might actually forget it is there.

Restoring my iTunes library to normality was as easy as entering the Time Machine interface, going to the previous point in time, clicking the iTunes library files in my Music folder and clicking the restore button. Done deal. I plugged my iPod in and all of my files were copied back to it as if nothing had happened.

iPhone Linux, Linux now booting on the iPhone/iPod Touch

Sunday, November 30th, 2008

Linux now booting on the iPhone/iPod Touch, with video.

Latest iPod/iPhone firmware fixes Safari

Friday, November 21st, 2008

If you own an iPod Touch or iPhone and you the web at all make sure you upgrade to the latest firmware. I’ve always assumed it was a lack of CPU in the iPod Touch that caused larger and more complex sites to be so slow. Turns out Safari just needed to get fixed.

Nice to see a major network using the HDTV aspect properly

Tuesday, November 4th, 2008

I’m watching the election results on msnbc.com and they’re actually putting the full 16:9 aspect ratio to proper use. Most of the time they shoot things in widescreen but virtually all shots are framed to fit the older 4:3 format. Along with election results msnbc is showing poll closing data on either side of the screen. While the data isn’t extremely useful it is nice to see the space is getting put to use.

New job

Wednesday, October 29th, 2008

I don’t typically blog about where I work but I will say that I’ve changed where I work. With this change may come a small shift in focus on what I write about. My new job brings me back into the Linux world whereas my previous one saw me doing Windows 90% of the time (though you wouldn’t have known it from what I wrote about). This does mean however that I won’t be writing about OpenSolaris as much unless something changes with how my home setup is done.

My outrage for the Macbooks lack of firewire was newsworthy

Friday, October 17th, 2008

Some comments I made on the an apple discussion website has made the geek news. http://tinyurl.com/4ueslk The comments by miniconvert are from me.

A number of people have pointed out that newer camcorders don’t use firewire anymore. That’s cool, but the issue isn’t just camcorders (though for me it primarily is). Others have pointed out that Apple likes to lead the way, they dropped the floppy first as well as PS2. At the time, very viable solutions existed, it was time for these interfaces to go away. When Apple introduced the iMac it lacked PS2 ports (or really, the Apple keyboard/mouse ports) but it didn’t really matter. That new computer came with a USB keyboard and mouse. By removing firewire they’ve left a lot of potential customers in a bit of a conundrum. What to do with those peripherals that are based on firewire?

How Apple reacts to this backlash will be very interesting. I’ve always understood why people dislike Apple products, this is one of those reasons but in this case I think they’ve gone too far too fast. I do of course realize nobody is forcing anybody into buying a Macbook. It’s just that, when you want to live in the Apple world you choices are already limited.

Adding high speed storage to that Macbook lacking firewire

Friday, October 17th, 2008

Here is a copy/paste of a post I did on a forum. It describes in very light detail how to add iSCSI based storage to a Mac. With the new Macbook lacking firewire, this might actually become a more popular method.

In the last couple of weeks I’ve been playing around with a few different bits of technology, one of them being iSCSI. iSCSI is a relatively cheap and efficient method of adding storage to a computer that uses your existing network infrastructure. If you have a gigabit network and a Linux server (I haven’t tested other solutions) you can add as much storage to your Mac as you can fit in your Linux system.

You might be thinking, “I have a 2TB USB/FW drive why would I want iSCSI?” USB and FireWire drives are a fine thing but lets look at some of their disadvantages.

* USB2 is actually slower than many FW400 devices
* If you have a mac with just one FW port and your external drive doesn’t include a FW port, you can’t attach anything else to that FW port AND use your drive
* External drives add noise
* External drives must be located close to the computer, not ideal in a HTPC setup

Here a really quick overview of how it is done, I can certainly provide more detailed information however. Here is a list of what you need to get the job done.

1. Linux server with gigabit ethernet
2. A hard drive or RAID set that you want to share to your Mac
3. gigabit switch
4. Mac with gigabit, the more recent the better
5. GlobalSAN iSCSI initiator for Mac
6. iSCSI Enterprise Target for Linux

Setup your Linux system and install IET. If you’re using Ubuntu, IET might be available in apt. I use Fedora so I compiled IET from source. Edit the /etc/ietd.conf file to point to your disk or RAID set (or even a file that was made using dd if=/dev/zero of=filename bs=1024 count=1 seek=n where n is the size of file you want in bytes). Start the ietd service, /etc/init.d/iscsi-target under Fedora.

Install the GlobalSAN iSCSI initiator on your Mac. Enter System Preferences and click the new GlobalSAN button. Add your Linux server’s IP address to the Discovery screen. Click on the target tab and your disk should be shown, click it and logon to it without a username or password UNLESS you configured one in IET. Be sure to check the persistent tab if you want this drive to appear each time you boot your Mac.

Open Disk Utility and format the iSCSI disk. Your Mac will format the new drive and it’ll soon appear on your desktop. You can use it like any other disk you’ve ever used. You can partition it, copy/delete files, whatever. As far as the Mac is concerned it is a normal hard drive.

In my setup I have an Intel Mac mini, 1.83Ghz C2D and a Linux server built in late January, 2.2Ghz C2D. The disk being shared to my mini is a single 120GB PATA drive. I am able to copy files to the drive with a top speed of 44MB/s. Reading is actually slow but I attribute that to a limitation with the mini’s internal drive. I haven’t been able to test using OpenSolaris as the iSCSI target though OpenSolaris would be a fantastic choice as a storage server.

To be fair, there are some negatives to this setup. The biggest one being you can’t have multiple Macs using the same disk at the same time. You can unmount the disk on one mac and mount it with another one, but having two macs connected at the same time risks your data.

Hosting a Fedora network install using Mac OS X

Sunday, September 28th, 2008

Sometimes it just seems that everything is out to get a guy, nothing goes right. This seems to be the case today when it comes to performing an upgrade on my Fedora Linux based file, web, email, XBMC and whatever else server. After burning three copies of the install media none of them work, despite correct SHA1 verification and burning with different drives. What’s a geek to do?

Do a network install!

I downloaded the full DVD hoping to do a local install from it so I could avoid the long downtime of doing an over the internet based network install. The problem however is that I either have two bad DVD burn drives or there is something goofy with the image I downloaded. Everything about the DVD iso checks out, the SHA1 is fine and I can loop back mount it without issue. Rather than give up I decided to do a network install by mounting the iso on my Mac mini and sharing the contents via web sharing. As it turns out, this is very easy to do.

This little mini howto assumes you have already downloaded the DVD install media for Fedora. If you haven’t, I suggest you do that first.

Enter System Preferences and choose sharing. Click on Web Sharing to enable your Mac’s web server. Be sure to note the IP address. Next, double click on the Fedora DVD install iso. OS X will mount it and make it available to you. Next, start terminal and type ‘cd /Library/WebServer/Documents’ without quotes and press enter. Type ‘ln -s /Volumes/Fed* fedora’ (*type Fed and then press tab to autocomplete) and press enter. On my system the complete command looks like ‘ln -s /Volumes/Fedora\ 9\ i386\ DV/ fedora’

Open finder and browse into your mounted DVD media. Look for a folder called images and copy out the boot.iso file. Burn this file to CD using OS X’s Disk Utility. Next, take that disk to your Linux machine and boot from it. Choose install or upgrade and then when asked where the install media is located choose URL. Enter http:///fedora where is the IP address from your Mac. That’s it, the install will then continue as if you were using a local CD/DVD.

OpenDNS now offers filtering or parental controls

Saturday, September 27th, 2008

I was reading slashdot the other day and someone had asked about how to provide email for their children while keeping them safe. One of the answers mentioned that they didn’t really have a solution for them regarding email but if they needed a way to help protect them while browsing the web they should look into OpenDNS. Turns out OpenDNS now offers a type of web filtering that you can control and best of all it is free. I have a new button on the side of my site that will take you to their site if you’re interested in such a service.