Switched to Arch Linux from Gentoo

Time installing Gentoo: days
Time installing Archlinux: 30 mins.

I have an old Intel based Dell laptop with 1.8GHz single-core processor. I’ve had Windows XP on it for a couple years, then I switched to Gentoo for the past 5 or 6 years. Well, it’s really not the kind of laptop that you should be compiling everything from source on. I’m tired of going through the “everything’s broken, hook it the ethernet cable and start fixing it” routine after I’ve left it alone for months at a time.

I just use it to tune my car, it’s the “Garage Laptop”. So, Gentoo isn’t a good fit. And Gentoo seems to be becoming this bloated mess of package mismatches. Since I leave my laptop alone for a while, I end up not being able to install a package I want since the version my portage tree has is no longer in the main tree. So, ’emerge –sync’, and now I have to update 50 packages just to get the one I want.

No thanks.

I’ve got a working system with XFCE4 in 30 mins. Plus, it takes only about 2 GB of my 32 GB SSD. Restoring my home folder puts the total at 6 GB, which is more than 4 GB less than my Gentoo install.

This is a decision I needed to make a long time ago.

udev broke, server broke, router broke

I attempted to get a webcam going on our home server. So, I plug it in, and since I’ve done this before I ran a script I made to grab an image from the webcam. Which didn’t work. So, after checking out why (/dev/video0 node was missing), I noticed that the kernel no longer had support built in.

After going through the kernel options, I realized they changed the v4l and webcam support options around and since I just upgrade using “–silentoldconfig” (the bad way to do upgrades), it broke whenever I upgraded to 3.2.12. And 3.2.12 wasn’t in portage’s tree anymore, and I didn’t have the sources for it installed (mistake number 2), so I was pretty much SOL.

So I decided to upgrade. Remotely. 1500 miles remotely. Long story short, a udev upgrade swapped my network device names around and broke the internet on the reboot, and I had to wait until I was home to fix it. I kind of knew this was going to happen, but meh, I like to gamble.

It’s amazing how many config files have references to eth0/1 in them.

Now everything started to work normally again, except after purchasing a game on Steam, my router appeared to drop the connection during the download. As it turns out, the router was at 100% CPU and 99% memory, and I guess was just running out of memory and rebooting due to the download (2-3 MB/s). So, it looks like my internet is faster than my wireless router can handle.

It’s a WRT54G running DD-WRT, and I don’t see any firmware upgrades for it. But DD-WRT’s website is pretty whack, so who knows. I think I’m going to upgrade it in the future, if it keeps crapping out on me.

Home server is back online

I’ve pulled power and cable from the attic and just powered up the home server again. It’s been asleep for 5 months until now. I’ve just done an emerge –sync, and it took about 10 minutes to complete.

However, it went up without any problems, which is good. Considering I turned it off in a working state. I was tempted to backup all my config files and start fresh with, say, Arch Linux, but that would take all weekend. So, I’ll stick with Gentoo until I replace this aging 1.6GHz Atom server.

Well, now to start the long process of updating crucial services and resolving dozens of package conflicts. Fun!

Gentoo on a mid-2012 MacBook Pro

If your sick of your brand new MacBook just working (more or less), and you just feel like modifying your kernel’s source to get your computer to work right, you’ve come to the right place. I (finally) managed to get Gentoo booting on a new MacBook Pro (15″, Core i7, mid-2012) alongside OS X 10.8.2. I suppose it actually wasn’t that bad, it could have been much worse. I only had to reinstall OS X once after a wonky partition editor…. edited a little more than I wanted.

What I have in the end is a MacBook Pro that dual boots Gentoo Linux and OS X using rEFInd. Gentoo boots via EFI, I did not use a boot loader (in the traditional sense).

My first attempt–you know, the one where I left my backup drive at work, was a miserable failure from the get-go. I went with what I was reading online, to use a boot manager/loader. Specifically GRUB/GRUB2 (I tried both). Also I used rEFIt, which has a wobbly gptsync utility, that as far as I can tell, hosed my entire drive. I had even tried building a modified gptsync from source. Although, maybe it was gparted. Since I had problems with that on both occassions.

In either case, I couldn’t get gparted/parted to change the partition type to linux (0x83 or  82 or whatever it is). It kept reporting that the partition I created was ‘MSDOS’. And in both cases, I shrugged it off because as far as I know, the kernel doesn’t really care as long as it has the drivers to load the root filesystem’s actual type.

Where I went wrong in the first case was to attempt to use GRUB/GRUB2 to boot. I had heard that you could use rEFIt to load grub, and then grub would boot the kernel. I didn’t read a whole lot on EFI booting the kernel directly, so I avoided it. Trying this involved setting up the GPT tables along with legacy MBR tables, and then supposedly I had to ‘sync’ them to get rEFIt to see the new partition/OS. Since my OS X partition is encrypted, this caused problems with the gptsync utility. I followed these two guides which ended up in grub sort of working and OS X completely gone. Oops. I had a backup though.

So I retried it this weekend, convinced that with EFI (even Apple’s “EFI”), you shouldn’t need any boot manager or loader (other than the EFI program itself). A little more searching and I managed to get it to work. And this skips the whole gptsync fiasco, the GRUB mess, etc.

My first hurdle though, was getting the partitions right. I swear it was a bug in parted or something. Because the man pages online and the one’s on the minimal Gentoo CD were way different. Any attempts to run the command ‘mkpart’ with any of the FS type options would result in a partition with MSDOS type. I eventually just settled with that for reasons I mentioned earlier.

rEFInd seemed to ignore the command line options it’s own readme specified (specifically, ‘–esp’). So it ended up installing on the root of the OS X filesystem. I had the EFI (ESP) partition mounted at /boot, so I just moved the files there and re-ran the ‘bless’ command.

This is how I did it:

  1. Partition: Use disk utility to make a partition for Linux
  2. Install rEFInd
  3. Plug in to your network and reboot to Gentoo CD: I used gentoo-minimal-amd64
  4. Format the new partition: I chose ext4
  5. Obtain stage, initial package sources and unpack/install
  6. Configure and install kernel
  7. Reboot and pray
  8. BCM4331 wireless
  9. Fixing that annoying ‘applesmc: read arg failed’ kernel error message
  10. ethernet
  11. X, audio, etc.?

I now have a working Gentoo living along side OS X. It’s a pain to switch between them, since rEFInd takes ~20 seconds to show up on boot. Now if only I could get X and nvidia-settings to work well with an additional monitor that isn’t always present, I could do all my work on it.

Config Files

  • .config
  • make.conf
  • xorg.conf