Sunday, October 21, 2012

Gentoo on my HP2000-425NR

Well, my Dell died :-( May it rest in peace. So I bought the cheapest good machine I could find, or maybe the best cheap machine - which turned out to be a HP-2000. Memory was on sale, so I got an extra 4G.

AMD E300 1.3 GHz processor.
6GB Ram
320GB Hard Drive
Ralink RT5390 Wireless
ATI Technologies Inc AMD Radeon HD 6310 GraphicsATI
ATI Technologies Inc SBx00 Azalia (Intel HDA) (rev 40)

Installing Linux has proven problematic.

Of course, I started with Gentoo. And, no doubt, I'll end with Gentoo. But in the middle... The Gentoo minimal CD does not come with support for my wireless card, and I'm not using the wired connection (because I'm using the free Internets at McDonald's) So, I decided that the easiest solution would be to go with a different distro.

I tried Fedora Core (17) first, but it wouldn't re-partition my hard drive. It would not let me resize the Windows partition. So I used Ubuntu, which is as close to no-brain as one can get. It resized the Windows partition but that made Windows unusable. This is undoubtedly my fault, not sure what I did, but I suspect it had to do with the boot partition.

So, I ended up installing FC17, redoing all the partitions, and re-installing Windows. The intermediate result was a working dual-boot computer.

But FC is not for me. It's a solid distro - I don't want to say anything bad about it, but I miss Gentoo. Let's just say that FC17 installed and ran Zeitgeist without my knowledge or consent. Yeah, I should pay more attention, but when your downloading and installing hundred's of packages and their dependencies; How careful can you really be? And if you don't know why I'm bothered by zeitgeist, you may want to look into the whole Zeitgeist concept.

I have to say this somewhere, so I'll say it here. FC17 often boots with a blank screen - like it didn't load the video module. I try switching to other tty's to no avail. I still haven't figured out why it does this or how to cure it. Sometimes a reboot works, sometimes not. But if I shut all the way down and restart (cold boot) it always works. I suspect something with grub - but no proof yet.


So, the question is how to get Gentoo on this machine.

If there is an educational part to this post, I'd guess that this is it.

I used gparted in FC17 to create a new partition for Gentoo and mounted it under a gentoo directory created in /mnt. Then, with FC running and connected to the internets I downloaded a stage3 tarball and portage snapshot and decompressed them onto that gentoo directory. I edited my config files in FC.

I wrote a quick little script that I run as 'sudo' to get into the gentoo system from a terminal window in FC:

#! /bin/bash
mount /dev/sda9 /mnt/Gentoo 

cp -L /etc/resolv.conf /mnt/Gentoo/etc/ 
echo "--> Gentoo mounted"

mount -t proc none /mnt/Gentoo/proc
echo "--> /proc mounted"

mount --rbind /sys /mnt/Gentoo/sys
mount --rbind /dev /mnt/Gentoo/dev
echo "--> sys and dev mounted"

chroot /mnt/Gentoo /bin/bash

Of course I chmod +x the file, and just 'su mountGentoo' when I'm ready to go. When I'm in the chrooted environment I do env-update && source /etc/profile and I'm good to go. I have the Gentoo environment and commands - I'm emerging left and right.

More to come.


And, just to finish off this post - How I Solved Everything! I didn't solve it, the interwebs did. I just googled the right things.

Apparently there is a file called linux-firmware that has the 'drivers' or firmware that allows the kernel to speak to the hardware. Unfortunately, I don't have the piece of paper upon which I wrote the error message which dmesg provided. But during one of my many sessions with the blank screen I logged-in (without visual feedback) and sent dmesg to a file. "Loading firmware file 'rt2860.bin'" and "Failed to request Firmware".

So, once I emerged linux-firmware - the screen worked and my wireless worked! I was happy! Still am, come to think of it.

Just one more quick thing. This morning, when I booted up, wlan0 did not function. The bootup error message was "Could not set interface wlan0 flags" and "Operation not possible due to RF-Kill". Turns out my wifi was turned off. I figured that one out on my own.

When I installed linux-firmware there is an additional step that's needed before it can really be used. When you're configuring the kernel you actually have to enter text. I went here and towards the bottom, the guy spells it out for me.:
Use no framebuffers with radeon/kms. quoting the guide: Quote:
Support for frame buffer devices --->
(Disable all drivers, including VGA, Intel, nVidia, and ATI)

Sounds like the firmware blobs are not incorporated in the kernel config: Code:
emerge radeon-ucode

cd /usr/src/linux;make menuconfig

Edit menuconfig
Device Drivers --->
Generic Driver Options ---> Quote:
[*] Include in-kernel firmware blobs in kernel binary
(radeon/PALM_me.bin radeon/PALM_pfp.bin radeon/SUMO_rlc.bin) External firmware blobs to build into the kernel binary
(/lib/firmware) Firmware blobs root directory

Select "() External firmware blobs to build into the kernel binary" a dialog box opens.
Copy and paste Quote:
radeon/PALM_me.bin radeon/PALM_pfp.bin radeon/SUMO_rlc.bin

onto the blank line in the dialog and enter.
A new line will appear "(firmware) Firmware blobs root directory" Select it and another dialog appears. Backspace to clear it and type in or copy and paste Quote:
I was worried about having absolutely NO framebuffer support compiled into the kernel, or even as a module, but it sure worked!

No comments:

Post a Comment