February 08, 2010

Tumblings, Jan 24

A couple of links posted to my Linux Tumblr last week:


del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links

Posted by jdarnold at 01:07 PM | Comments (0) | TrackBack (0)

February 07, 2010

Arched

So early in December, I went on a quest for a new Linux distro. It wasn't so much that I was unhappy with my openSUSE 11.0 installation, but I knew I was probably going to install the new 11.2 version and so I figured I would cast about to see what's up with the other KDE distros. And given that Linux Format had just done a big review on the "best" KDE distros out there, it was good timing all around.

I didn't really have as complete a checklist of features as I have had in the past. Of course, it had to install on my beast of a machine, with its myriad hard drives, cd drives, dual monitors, and the like. I wanted an easy to use package manager, with plenty of packages available. I was't quite as sold on a "one size fits all" admin panel like openSUSE's Yast2. I'm feeling a little more adventurous, and hate to see my configs get changed without my knowledge. I wanted a KDE distro, as I find GNOME to be bizarre. I didn't want to get too far off the beaten path, as I like a popular, well documented distro.

First up was Sabayon, which has been getting lots of good press. I wasn't crazy about their home page - it was too hard to find even the download link. And there were a few kinks in the install process. It was a few months ago, so I don't remember exactly the problems, but they were enough to sour me on it a bit. It did have exactly the same problem I was going to find in all the rest of my installs, which is that the setup hard drive numbering for GRUB was always different than the final installation drive numbering, requiring me to reboot using the live disc and edit the /boot/grub/menu.lst file and change the hd0 to hd1. Not sure why that is, but I guess the mix of IDE & SATA hard drives makes it crazy.

So after dabbling a bit with Sabayon, I moved over to try Sidux, which really intrigued me with its cutting edge release and huge package library. It also had an incredibly clean install process and the desktop is stunning. Really a very polished and good looking release. It has a very nice community with lots of good info on the web site. I was a little turned off by its insistence that you drop down into single user mode to install any updates, which isn't something I like doing.

But I played with Sidux for a couple of days. It was nice, but I decided to give Arch Linux a try. It had been written up very nicely in the previous issue of Linux Format, in the "Remix Your Own Linux" article. It's overriding philosophy of "Keep It Simple" was really attractive, as was the very large package library. I found it amusing that the Live CD boots into a commandline, the installer is the old fashioned text-mode graphics and, even after installing, you end up with commandline! It doesn't even install X for you.

I found this a refreshing change and decided to jump right in. I even decided against installing KDE and just run openbox with a stripped down config. It's really been working nicely for me and I haven't looked back. Arch makes a great server install, as there is very little cruft installed by default. When I built my media server machine, with its 1tb software RAID, I only added Emacs & Samba and I know it is a lean, mean, serving machine.

The Arch wiki is incredibly informative and comes up early in many Google searches. The forums are active with intelligent discussions and it is a very nice, experienced, community. While I wouldn't use it for my Grandma's Linux, Arch is a great distro once you get some Linux experience and want to tailor a distro to your ideas, and not the other way around. Arch is also why the calls for fewer distros is misguided. It isn't for everyone but as long as each distro has a certain focus, and hues to it closely like Arch does, there's plenty of room out there. Next up - theme color changes!


del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links

Posted by jdarnold at 10:37 AM | Comments (0) | TrackBack (0)

February 02, 2010

February 01, 2010

On Being Persistent

Those of us who have multiple hard drives in our computers will inevitably boot up one morning to find the naming scheme for these drives has changed. What was once /dev/sda is now /dev/sdb and vice versa. Your computer won't boot and fsck complains about an uknown or mismatched filesystem type. This is especially true after a kernel upgrade. Nothing really can be done about this random renaming, as it is all in the timing. But how can you fix the problem?

Actually, it's a pretty easy fix. Instead of using /dev/sd? in places like grub's menu.lst file and the all important /etc/fstab, use a special label that doesn't change. I find using UUID's to be the best solution.

There are a couple of ways to get the UUID of a hard drive. The easiest is to use the blkid command from the commandline. It lists all the hard drives, along with their UUID and TYPE:

$ blkid
/dev/sdb1: LABEL="ReiserData" UUID="0e9c1455-4993-4ddf-a86a-a3dac116a5cc" TYPE="reiserfs" 
/dev/sda1: UUID="a846c306-3114-403d-b893-a3e27704755a" TYPE="ext3" SEC_TYPE="ext2" 
/dev/sda3: UUID="c03ce6c7-32ab-41e9-b603-da09acc0fbab" TYPE="ext4" 
/dev/sda4: UUID="303889b7-ae78-436f-85ac-da95b2280596" TYPE="ext3" 
/dev/sda5: LABEL="/home" UUID="d6db1ae8-30d6-48ee-8a66-90912480e8be" TYPE="ext3" SEC_TYPE="ext2" 
/dev/sda6: UUID="71712106-eef9-48c3-840f-20fb77173a9d" TYPE="swap" 
/dev/sdb2: LABEL="GAMEY2" UUID="4B89-0200" TYPE="vfat" 
/dev/sdc1: UUID="59ac55ab-93f8-4466-804d-57d1148b76e5" TYPE="ext3" 
/dev/sdc2: UUID="260834A7083477BF" LABEL="Media" TYPE="ntfs" 

You can also get the UUID of paritions by using ls :

$ ls -l /dev/disk/by-uuid/
total 0
lrwxrwxrwx 1 root root 10 Feb  1 00:00 0e9c1455-4993-4ddf-a86a-a3dac116a5cc -> ../../sdc1
lrwxrwxrwx 1 root root 10 Feb  1 00:00 260834A7083477BF -> ../../sdb2
lrwxrwxrwx 1 root root 10 Feb  1 00:00 303889b7-ae78-436f-85ac-da95b2280596 -> ../../sda4
lrwxrwxrwx 1 root root 10 Feb  1 00:00 4B89-0200 -> ../../sdc2
lrwxrwxrwx 1 root root 10 Feb  1 00:00 59ac55ab-93f8-4466-804d-57d1148b76e5 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Feb  1 00:00 71712106-eef9-48c3-840f-20fb77173a9d -> ../../sda6
lrwxrwxrwx 1 root root 10 Feb  1 00:00 a846c306-3114-403d-b893-a3e27704755a -> ../../sda1
lrwxrwxrwx 1 root root 10 Feb  1 00:00 c03ce6c7-32ab-41e9-b603-da09acc0fbab -> ../../sda3
lrwxrwxrwx 1 root root 10 Feb  1 00:00 d6db1ae8-30d6-48ee-8a66-90912480e8be -> ../../sda5

You can see that FAT32 and NTFS partitions have different kinds of UUIDs, but it should work for our purposes. Now you just need to replace all references to the various /dev/sd? names with the correct UUID. This will remove all "randomness" from the boot order. Even if you currently have only one hard drive, you really should go to this "persistent" method of naming partitions, as you never know when you might add another.

In the /etc/fstab, replace /dev/sd? with UUID="uuid", like this:

#/dev/sda4
UUID="303889b7-ae78-436f-85ac-da95b2280596" / ext3 defaults 0 1

and in the /boot/grub/menu.lst file, replace it with the /dev/disk/by-uuid path, like this:

kernel /boot/vmlinuz26 root=/dev/disk/by-uuid/303889b7-ae78-436f-85ac-da95b2280596 ro vga=773

The Arch Linux Wiki has a very nice page on Persistent block device naming here: http://goo.gl/GTWT.


del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links

Posted by jdarnold at 09:28 AM | Comments (0) | TrackBack (0)

December 02, 2009

Glorious LXF126 Contest

Linux Format #126 Cover Image If you are the winner in my glorious Linux Format 2009 Christmas Issue giveaway, here's what you have to look forward to:

  • Ultimate eye candy

    - a pretty interesting article on how to get the most dazzling display, whether you use Compiz, KDE, or GNOME. Despite my general disdain for eye candy, I would try the Compiz/Emerald 3d window manager if it worked on dual monitors, but last I looked it didn't support them.
  • KDE distributions

    - coincidentally enough, just as I'm looking to move on up from my OpenSUSE 11.0 install, along comes LXF with their KDE distro Roundup. I wouldn't have to go too far afield if I stayed with their winner, which is OpenSUSE 11.2, but I'm trying out a couple of other ones they regard highly, like Sabayon and Sidux. I'm a KDE man, so it works out well.
  • Get to grips with /proc and /sysfs

    - this is an excellent overview of the virtual filesystems /proc and /sysfs.
  • DVD Coverdisc

    - the DVD coverdisc includes live previews of the latest versions of KDE and GNOME, which is pretty cool. It also includes Ubuntu Netbook Remix (which I think I'll try on my Dell Mini), Moblin 2.0 and Puppy Linux 4.3.

To enter my little contest, where I will mail you a pristine copy of LXF #126, along with the DVD coverdisc, just drop me an email at jdarnold@buddydog.org. On Monday, Dec. 7th, probably in the evening, I will randomly select one entry and email you back asking for your mailing address and soon it will show up on your doorstep. Open to both of my international readers too :)

Oh, and I also heartily endorse subscribing to the magazine. Yeah, it's pretty expensive, but if you do it via the TuxRadar web page, you can cut it down to US$99 for 13 issues. And, as a subscriber, you get access to all the back issues in PDF format and they really have gotten their act together with it. The PDFs look great and they have a nice HTML page linking it all together. You won't be disappointed.


del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links

Posted by jdarnold at 08:27 AM | Comments (0) | TrackBack (0)

November 30, 2009

Contest and Projects

Due to a mix-up, I ended up with two copies of Linux Format #126, the Christmas 2009 issue. I figure I'll run my first ever contest here at Daemon Dancing - after over 6 years of writing on this blog, why not? Let's make it a simple one - just drop me an email at jdarnold@buddydog.org and next Monday, when I get back from my work trip, I'll randomly select one entry to mail it out to. No strings attached and, believe you me, I won't be keeping your emails around! And heck, I'll even make it open internationally, just to make it even more likely I'll get at least one email entry:)

So I get a 1.5 out of 4 for my holiday projects. I did get the girls' computer up and running. The new power supply took a bit of forcing to get it to fit into the old case, but then it was up and running just fine. I was bit stumped as to what to install for an OS on it. For obvious reasons, the old Windows XP installed on the hard drive failed to boot. Really, all they do is play flash games on it at this point, save for R10.4 playing some Day of Defeat with me and my clan buddies. So I moved her onto the Windows machine and had to pick a Linux for the new box. I went with OpenSUSE 11.2, as I'm most familiar with that and so it would require the least amount of thought. So far, so good.

I get a half a project because I did try to install a new Linux on my own box, but wasn't really happy with it. I installed the latest Sabayon (v5.0), after being pretty impressed with how well the Live CD ran. But I immediately ran into a problem after the installation - GRUB refused to boot it up.

Because I run my own boot manager (TerraByte's BootIt NG), I always install the GRUB boot loader onto the first block of the OS's boot partition. One test of an installer is just how hard this is to do, and I'm happy to report it wasn't too hard for the Sabayon installer - just select the Advanced Options and it was one of the choices. But on boot, I just saw "GRUB " and I knew immediately what the problem was. My machine is a homebrew one, with both old fashioned IDE drives and newfangled SATA drives and this isn't the first time an installer or LiveCD called the drives something different than what a full boot calls them.

Unfortunately, I had formatted the partition as an 'ext4' drive, so I couldn't get at it with my OpenSUSE 11.0 boot. And it may also have had something to do with why GRUB didn't work either. So I redid the install using 'ext3' and still had the problem. After rebooting the Sabayon Live CD, the usual GRUB steps to fix a broken GRUB install didn't quite work:

# grub
grub> find /boot/grub/stage1
 (hd0,0)
 (hd0,3)
grub> root (hd0)
grub> setup (hd0,3)
....
grub> quit

I do the ",3" part to (hd0,3) so that it installs in the root block of partition 3 and not the root block of that whole hard drive, to not overwrite my own boot manager. But I knew this was still wrong, because after a "normal" boot, the boot drive is hd1, not hd0. I think there is a way to tell grub this using another parameter to the setup command, but I had a better idea - I just booted into my OpenSUSE boot and changed all 'hd0's to be 'hd1'. After booting, things got a little further, until I realized that the setup command doesn't seem to fix the /boot/grub/menu.lst file, so I had the make the same s/hd0/hd1/g change there too.

Now I was able to boot into Sabayon. And because they aren't afraid to install binary drivers, I got the nVidia drivers and was quickly able to turn on my second display, which was nice. But the update process left me a little mystified. I couldn't really figure out how to get it to select packages and install the updates. And even when it was downloading, it was incredibly slow and, in the end, didn't seem to do anything.

So in this age of instant gratification, I sort of gave up. I think I'll try the Sidux distro next, although I should just stop wasting time and install OpenSUSE 11.2, as that is the one I like and use.


del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links

Posted by jdarnold at 10:15 AM | Comments (0) | TrackBack (0)

November 27, 2009

Holiday Projects

So on this long weekend in the US, I have a few technology projects I hope to work on:

Fix Girls' Computer

Their computer finally gave up the ghost a few weeks ago and they've been using one of my work computers while I figured out what to do. I picked up an AMD motherboard for cheap (US$120) from AscendTech.us, that included an AMD 6000+ cpu and 1gb of RAM. What it did not include was any kind of manual, which kind of upset me. I think it is an ECS MCP61SM-AM motherboard, which isn't even listed on the ECS web site. But I did figure it out enough to get it put into the case, only to find out the power supply only has a 20 pin plug, and the new ones require a 24 pin plug. So I ordered a new power supply and now it awaits final assembly. Not sure what OS I'l put on it. Maybe I'll go back to Qimo For Kids again.

Install New Linux

My current openSUSE installation is pretty old at this point. I did upgrade from 10.3 to 11.0 about a year ago, but since then I've managed to break it. An update was going too slow and eventually had to be abandoned, leaving it in a state where even the updater won't run. But it was time to start fresh anyway. Good timing, as Linux Format #126 reviewed the "best" KDE4 distros. Not surprisingly to me, their #1 pick was OpenSUSE 11.2. But I also thought the Sidux and Sabayon distros sounded interesting, so I wanted to spend some time with those before picking one.

Continue Linux From Scratch

I also need to get back on the Linux From Scratch project. I have the toolchain all built and backed up, and am ready to begin Chapter Six and actually build the real copy. I have gotten a little sidetracked in the whole package manager discussion, but I think I'll just ignore it for now and try an install. If I want to go further, then I'll think more on a package manager. But I have really been enjoying the heck out of getting into the real guts of a Linux install.

Work On Android

One new toy I haven't talked about is my G1 (Google) phone from T-Mobile. I have actually had it about 8 months now. I really like it and one reason I bought it was for its open source development model. I have a couple of interesting little projects for it ready to go, but just haven't found the time to pursue. I'm not a huge fan of Java programming, but I think I know enough to get something running.

So who knows how many, if any of the above projects I'll get to. Well, I have to do the first one so I can get my test computer back, and it promises to be a cold rainy day here in the US Northeast, so I think I can definitely get that done. As for the rest....?


del.icio.us | Digg it | Furl | Yahoo MyWeb | Create Social Bookmark Links

Posted by jdarnold at 09:29 AM | Comments (1) | TrackBack (0)