So I have now
Gentoo Linux installed and running on my iBook G4 for a little over a week. I have been wanting to give it a try for a while. Gentoo like Arch is a very DIY distro. You basically install just as base system and from there it is up to you what you want to install. The fact that you are building your own custom Linux system is the big appeal for Gentoo and Arch. The drawback is that it involves a lot of patience. Both Arch and Gentoo have great documentation that if you pay attention and follow will help get your system going. So I am going to through some of my thoughts about the different stages of getting the system up and going.
The Base Install:
So when you boot from the live cd you get a shell and from there you build your base system. It is very important that you follow the
PPC Handbook closely for a successful install. This is an invaluable resource in getting your system going. The handbook will help get you get you hard drive partitioned and formatted but it will also walk you though important concepts in Gentoo such as it package management system
Portage. Portage unlike apt or yum install packages by downloading the source code and compiling locally on your system. There is part of the base install that you may need to deviate from the Handbook. In the end where you are setting up Yaboot and preparing to boot into the system you need to create your yaboot.conf file. When you do you need to change the device line to
hd:. You conf file should look like this:
rican-linux@ibookG4-gentoo ~ $ cat /etc/yaboot.conf
## yaboot.conf generated by yabootconfig 1.0.8
##
## run: "man yaboot.conf" for details. Do not make changes until you have!!
##
## For a dual-boot menu, add one or more of:
## bsd=/dev/hdaX, macos=/dev/hdaY, macosx=/dev/hdaZ
boot=/dev/hda2
device=hd:
partition=4
root=/dev/hda4
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot
image=/boot/vmlinux
label=Linux
read-only
initrd=/boot/initramfs-genkernel-ppc-3.12.39-gentoo
initrd-size=8192
If you do not do this yaboot may not boot properly. Also there is a bug that will not allow yaboot utility to install on the base system so to update yaboot.conf with the
ybin command you will need to do it from the live cd.
Configuring the Kernel
What appeared to be the most stressful part, but was actually not as bad I originally thought was setting up and compiling the kernel. Basically you are setting up what features you want turned on from what type of Video hardware to if you want routing features you want on. Make sure you start with running this command
make pmac32_defconfig. It should help with getting most of the PPC features turned on. While you are configuring the kernel it would be good to visit the
Gentoo PPC FAQ section on setting up wireless. There are some kernel settings you nee to verify so why not do that part now rather than later and have recompile. When doing this part it is critical that you follow the handbook. It will guide you though.
Desktop
I have decided to install XFCE as my DE. The first thing you will need to do is install
Xorg, then once you get it installed you will need to install the
XFCE packages. You can verify everything is working by running
startxfce4. If all is good then the next thing would install a display manager. I used
lightdm as my display manager, but you there are plenty of DMs you can choose from
here. Also you still need to enable KMS once you have the DE installed or you will experiencing your DE freezing. You should not set the yaboot parameters until Xorg is installed or the system will freeze on boot. This means that you will need to boot into the live cd to apply the changes the yaboot.conf file. Here are some screen shots for my desktop..
Wireless
If you have enabled the proper setting while you were configuring the kernel the next set is to download and install the firmware. My iBook uses the Broadcom BCM4318 chipset and usually it is just a simple
few steps:
sudo apt-get install firmware-b43-installer
sudo modprobe -r b43
sudo moprobe b43
Now in Gentoo you have to manually grab and install the firmware. Thankfully the PPC FAQ points you a great resource
here that walks you through. Once you have followed the instructions you can verify by running dmesg, you should see the follwing
rican-linux@ibookG4-gentoo ~ $ dmesg |grep -e b43 -e Broadcom
[ 16.106492] b43-pci-bridge 0001:10:12.0: enabling device (0004 -> 0006)
[ 19.719625] b43-phy0: Broadcom 4318 WLAN found (core revision 9)
[ 19.761647] b43-phy0: Found PHY: Analog 3, Type 2 (G), Revision 7
[ 19.761676] b43-phy0 debug: Found Radio: Manuf 0x17F, Version 0x2050, Revision 8
[ 19.785836] Broadcom 43xx driver loaded [ Features: PMNL ]
[ 26.661593] b43-phy0: Loading firmware version 666.2 (2011-02-23 01:15:07)
[ 26.681602] b43-phy0 debug: Chip initialized
[ 26.682597] b43-phy0 debug: 32-bit DMA initialized
[ 26.682640] b43-phy0 debug: QoS enabled
[ 26.701989] b43-phy0 debug: Wireless interface started
[ 26.702046] b43-phy0 debug: Adding Interface type 2
[ 28.967573] b43-phy0 debug: Using hardware based encryption for keyidx: 0, mac: 44:e1:37:b4:aa:70
rican-linux@ibookG4-gentoo ~ $
Then run
ifconfig to verify you see the wlan0 interface. If not run the command again with the
-a option. If you do see it then all it means is that you need to turn the interface on
ifconfig wlan0 up if not then you may need to a reboot or verify that the b43 module is active. At this point you need a tool to manage your network connections. Your best choice is NetworkManager, and to install you just need to execute
sudo emerge -av net-misc/networkmanager. After it compiles and installs you will notice that there is no gui applet that you would normally expect to see. This is because the applet is another package that needs to be installed(
sudo emerge -av gnome-extra/nm-applet). However NetworkManager has a command line tool you can use as well. Just execute
nmtui and from there you can join your wifi network.
Final thoughts
Getting Gentoo to work too a lot more effort than Debian or Ubuntu. However if you love challenges and want to learn how an OS works from the ground up then you will definitely get that with Gentoo. Video playback was great with mpv however smtube is not part of the Portage tree. They did have minitube but it would not work (looks like a google api issue). 3D acceleration works if you set the default display to 16 in xorg.conf. The two biggest issues for me was one the cdrom would not auto mount for me and the install time for packages. It take a really long time to install anything big since Gentoo is downloading the source code and compiling on the local system. There are definite advantages to doing this normally, but for iBook or even later PowerBook this may be way too time consuming. If you have a later dual core Powermac G4 or G5 then you may have some benefit of Gentoo on your system.