Gentoo Linux/PowerPC Frequently Asked Questions
1. Installation
How do I verify with Mac OS X the downloaded ISO is not
corrupted?
First be sure you did not mount the ftp server with
Finder and then copy the file with drag'n'drop. This will corrupt
the ISO. Instead, use curl (with curl -O
http://path/to/iso).
As long as Mac OS X does not offer md5sum, you have to use the
openssl capability to produce an md5 checksum. Therefore, type in
a Terminal the following:
Code Listing 1.1: md5sum with the help of openssl |
$ openssl md5 /path/to/iso
|
Now compare this output with the appropriate file found on the server
where you downloaded the ISO (the file will end with .md5).
If it is the same, the ISO image downloaded correctly. Be sure you have
not mounted it (e.g. with Disk Copy) yet!
Can I dual-boot Gentoo Linux and Mac OS X?
Yes you can! In fact, yabootconfig will automatically detect
and setup /etc/yaboot.conf with Linux, Mac OS X and even
classic Mac OS (see the Gentoo Handbook
for details on yabootconfig). The trick is in how you partition your hard
drive. Before installing Gentoo, startup with the Mac OS X Install CD.
Use the Disk Utility to partition the drive in your machine into
two or three partitions. Alternatively use parted from the
recent LiveCD, that can handle HFS and HFS+ partitions. Furthermore, it
is able to shrink a partition so you don't need to delete your whole
disk. The first partition should be big enough to contain all your
Linux partitions (root+swap+/home etc.). The format of this partition
does not matter. The second partition should be for OS X. The third (and
optional) partition should be for classic Mac OS. It is needed only if
you want to put Mac OS 9 on a separate partition.
Note:
If you want to be able to triple-boot with yaboot, Mac OS 9 needs
to be on a separate partition from your Mac OS X installation.
|
After partitioning, install Mac OS X and Mac OS 9 onto their
respective partitions. Once installation is complete, start following
the Gentoo Handbook.
When you get to the section on partitioning, use mac-fdisk to
delete the large partition you created for Gentoo. In its place,
create a bootstrap partition, root, swap, and any other partitions you
want to use with Gentoo.
If you have an OldWorld Macintosh (pre-iMac), follow a similar
procedure as described above. However, use the Mac OS 9 install CD and
the Drive Setup utility. OldWorld machines do not need a
bootstrap partition.
I have an OldWorld Macintosh and need to use BootX. However, I am
having trouble opening the BootX installer on the PPC install CD. What can
I do?
You will need a new version of StuffIt Expander to open the
file. You can download it
for free.
Is it possible to boot Gentoo Linux on an OldWorld machine without
Mac OS? I would like to have a Mac OS-free machine.
If you have a lot of time to experiment, you could try Quik. Quik is a
bootloader for OldWorld PPC machines. If your machine uses BootX,
you can use Quik; if it uses yaboot, you can't.
Quik can be incredibly difficult to install, and is currently
not working with gcc 3.x (read: Gentoo 1.4 or later), but the
end result is somewhere between "neato" and "breathtaking" because Mac OS
does not have to load. Think yaboot on speed.
Be sure to read the Quik quirks
page. Also see "Is Quik
Bootloader for Mac OS Dead?" and "Guide:
Quik - Direct Booting for Older PowerMacs". "NetBSD/macppc
Model Support" documents OpenFirmware versions for various Apple
and clone PowerPC machines.
Thanks to vladimir for this information.
I have a Beige G3 machine. Can I install Gentoo Linux/PPC on a
second IDE hard drive?
Early Beige G3 machines (those with a "Rev 1" motherboard with an ATI
RageII+ chip) do not support slave IDE drives. To use a second hard drive
with this machine, you would have to attach it to the internal or external
SCSI connector, use install a PCI IDE card. Later G3 machines do not have
this limitation. See
http://www.xlr8yourmac.com/G3-ZONE/IDE/index.html for more
information.
When I try and install Gentoo on my PowerBook or iBook the internal
hard drive does not show up. What should I do?
For a PowerBook, pass hda=1,1,1 to the kernel at boot time.
That should solve your problems. You can do this at yaboot prompt
by typing boot hda=1,1,1. Some iBooks need
hda=16383,16,64.
My /etc/fstab file has /dev/BOOT in it.
Do I need to setup this line for my bootstrap partition?
No. If you are not running a separate boot partition
(/boot) then you do not need this line and can safely just
delete it from /etc/fstab. The bootstrap partition is
not /boot and is not related in anyway. In general,
PowerPC machines do not need a separate /boot partition,
and the bootstrap partition should not be mounted.
Installation is now complete. However after rebooting, I am getting
different characters than the keys I press on my machine's keyboard. What
should I do?
If this is an English keymap, you likely have a kernel config issue.
You will need to rebuild your kernel with the following options:
Code Listing 1.2: Input core support |
<*> Input core support
<*> Keyboard support
<*> Mouse support
(1024) Horizontal screen resolution
(768) Vertical screen resolution
< > Joystick support
<*> Event interface support
|
Code Listing 1.3: Macintosh Device Drivers |
[*] Apple Desktop Bus (ADB) support
[ ] Include MacIO (CHRP) ADB driver
[*] Use input layer for ADB devices
[ ] Support for ADB raw keycodes
[*] Support for mouse button 2+3 emulation
|
This way, you will still be able to use /proc/sys/dev/mac_hid to
emulate buttons 2 and 3 (see next question ).
If, for some reason you do not want to recompile your kernel, append
keyboard_sends_linux_keycodes=1 to the kernel arguments in
yaboot.conf. This will also correct the problem, but might
possibly introduce other problems.
Thanks to Joe McMahon for help with this answer.
I only have one mouse-button. How can I make use of the second and
third one, as ctrl-button does not work?
There is no way to get ctrl-button, like on Mac OS X, working. But
you can map quite any key or combination of keys to emulate the second
and third mouse-button. The values can be obtained with the command
line utility showkey. The mouse button emulation is switched on
using the proc-device. First run echo "1" >
/proc/sys/dev/mac_hid/mouse_button_emulation. Then copy the right
keycodes to mouse_button2_keycode and
mouse_button3_keycode. To keep the settings after reboot,
write them to /etc/sysctl.conf. Here is an example using
F11 and F12:
Code Listing 1.4: Mouse button emulation with F11 and F12 |
# Enable mouse button emulation
dev.mac_hid.mouse_button_emulation = 1
# Set 2nd button to 87 - F11
dev.mac_hid.mouse_button2_keycode = 87
# Set 3rd button to 88 - F12
dev.mac_hid.mouse_button3_keycode = 88
|
Other keys are 100 and 126 for the combinations fn+alt and fn+apple.
Installation is now complete. However, after my machine boots into
Gentoo and I try to emerge anything, I see errors saying it cannot 'stat'
a file. What is wrong?
Check to see that your time is set correctly. Setting your time and
linking /etc/localtime to your proper timezone (in
/usr/share/zoneinfo) will solve your problems. Also make
sure that you have not enabled the Enhanced RTC option in
the Character devices section of the kernel configuration (as
stated in install guide).
2. Laptop Support
How do I enable the full processor speed on my PowerBook while running Linux?
Some processors in PowerBooks start up at slower speed than they are
designed to run. Running at this slower speed conserves battery life
with the tradeoff of performance. The operating system on the machine
must instruct the hardware to run at its full speed. In Mac OS X this is
called "Reduced processor performance" or "CPU Scaling" in Linux. To
check the current speed of your processor while running in Linux, type
cat /proc/cpuinfo. In Mac OS X, you first have to turn off
"Reduce processor performance" in the "Options" tab of the Energy Saver
system preference panel. Then run Apple System Profiler (in
Applications:Utilities).
Warning:
Do not use this method to overclock your machine. Results are
unpredictable if you use an improper value. We are not responsible if
you fry your machine!
|
If Apple System Profiler reports a higher speed than what you
get when running in Linux, you can enable the full speed of the
processor with a simple command. First, your machine needs to be running
kernel 2.4.20-pre9-ben0 or later. Earlier kernels do not have the
code necessary to change the processor speed. Second, you will need to
compile the kernel with CPU Frequency scaling disabled.
Finally, run an appropriate command as shown in the examples below.
Code Listing 2.1: CPU Frequency scaling |
echo "0:667000:1000000:performance" > /proc/cpufreq
echo "0:667000:800000:performance" > /proc/cpufreq
|
Many users will want to add this command to the end of
/etc/conf.d/local.start. This file is sourced every time
your machine starts.
I'm running Gentoo on a PowerPC laptop. What packages should I
install to enable laptop-specific functionality?
There are three main packages you will need to install.
-
pbbuttonsd is a tool that enables the brightness and volume
keys on most ppc laptops. The current versions also work as a
powermanager.
-
gtkpbbuttons gives you a gtk front end for pbbuttonsd
(visual feedback on button presses in X). gtkpbbuttons
requires gtk and should be added to your X session file
(~/.Xsession) for best results (so that it is always
running while in X).
-
powerprefs ties together with pbbuttonsd, and gives you the
ability to edit settings such as power-management, trackpad options
and various other preferences.
These packages can be installed by running the appropriate commands from the
list below:
Code Listing 2.2: Installing laptop-specific packages |
# emerge pbbuttonsd; rc-update add pbbuttonsd default
# emerge gtkpbbuttons
# emerge powerprefs
|
Note:
You should edit your /etc/pbbuttonsd.conf for your
preferences. Especially the behaviour of the Fx-keys, as pbbuttonsd
gives you the availabilty, to use the Fx-keys in the first mode, and the
brightness- and sound-keys with the help of Fn.
|
How can I configure my machine's Airport or other Wi-Fi card?
First, make sure you have support for the airport card compiled into
the kernel, or compiled as a module and loaded. Then, emerge
wireless-tools; iwconfig.
Note:
Airport Extreme cards are not yet supported on Linux.
|
Will the internal modem in an iBook2 or PowerBook work?
Install net-dialin/hcfusbmodem which will provide
/dev/ttySHCF0. Then set up ppp like usual. Further
information about the installation can be found at
http://www.linuxant.com/drivers/hcf/install.html
3. Applications
Is there an easy way to configure X?
Thanks to Gerk, you can do emerge xeasyconf; Xeasyconf. Or
test out Xautoconfig.
How can I enable Direct Rendering (DRM) on rage128 or radeon cards?
emerge xfree (4.3.x) and xfree-drm-4.3.0.
Make sure in your kernel config you have the following options set:
Code Listing 3.1: DRM kernel configuration |
Character devices --->
<*> /dev/agpgart (AGP Support)
[*] Apple UniNorth support
[*] Direct Rendering Manager (XFree86 DRI support)
|
Also make sure to disable both the r128 and radeon drm drivers in the
kernel (the xfree-drm provides much updated versions that are required for
this to work).
Code Listing 3.2: Disable r128 and radeon drivers |
< > ATI Rage 128
< > ATI Radeon
|
Rebuild and install the kernel if necessary. After this, make sure you
are booted from the native framebuffer (i.e. radeonfb or atyfb and
not from offb or ofonly video), and run Xeasyconf.
Important:
You may need to edit your XF86Config-4 file depending
on your card setup. When running Xeasyconf, also please choose the
"auto" option and not "ati" for your video card setup.
|
You can run the command dmesg to see which version of the radeon
drm module is loaded. If all is correct for radeon you should see 1.7.0 or
newer loading, if you see 1.2.x you have the kernel radeon drivers still
compiled into your running kernel or as modules and they are loaded.
Looking in /var/log/Xfree.0.log is a good place to get
detailed information for troubleshooting.
Note:
If/when you do another make modules_install in your current
kernel, or you upgrade to a new kernel you will have to reemerge xfree-drm
again.
|
I recently emerged XFree, but when using it, my international
keyboard layout does not work correctly. The main keys work fine but I am
unable to compose special characters like the "at" sign. The startx output
says something like "could not load keymap, falling back to default
keymap". What is wrong?
Check that the permissions on /var/tmp are set to
drwxrwxrwx. If not, change them by typing chmod a+rwx
/var/tmp. This will allow XFree to load keymaps properly again.
When using OpenGL DRI in XFree or playing movies, the system
sometimes freezes hard unexpectedly. What can I do?
Your system may not cope properly with AGP support. Newer kernels
(2.4.20 or higher) and XFree 4.3 or better should solve this. Until then
the easiest solution is to add the following line to the "Device"
section of /etc/X11/XF86Config-4:
Code Listing 3.3: Forcing PCI mode for AGP-Cards |
Option "ForcePCIMode"
|
How do I get sound output working?
Two things are needed here. First, you have to make sure that you
have the correct kernel options selected. In make menuconfig you
need:
Code Listing 3.4: Kernel options for sound |
<*> Sound card support
<*> PowerMac DMA sound support
|
(or selected as modules and loaded). Second, users who should have
access to the audio devices need to be added to the appropriate group
with the command:
Code Listing 3.5: Adding users to the audio group |
# vigr
|
If the dmasound_pmac module does not load, you probably need to
enable i2c-core in the kernel or as a module.
How do I play Audio CDs?
NewWorld machines have no audio connection between their CD-ROM drive
and their sound hardware. Therefore, audio information must be read as
data and then piped to the sound hardware. This is possible using
xmms and the xmms-cdread plugin, that reads the audio off
the CD over the ATA cable, decodes it in software and sends it to the
sound card over the PCI bus as digital data. If you want 'true'
cd-playing, you have to do the following steps:
First, you will need to rebuild your kernel with the following options:
Code Listing 3.6: Kernel options for playing audio-CDs |
< > Include IDE/ATAPI CDROM support
<M> SCSI emulation support
<M> SCSI support
<M> SCSI CD-ROM support
|
Then, append hdX=ide-scsi to the kernel image section(s) in
/etc/yaboot.conf where hdX is the IDE device
corresponding to your CD player. This is usually hdc. Type
ybin -v to install the new yaboot.conf settings. Edit
/etc/group add any users who should be able to play CDs to
the cdrom group. You will now need to reboot your system for the
kernel changes to take effect.
Upon reboot, su to root and change the permissions of the cd device,
then install xmms:
Code Listing 3.7: Changing permission for cdrom and install xmms-read |
# chown root:cdrom /dev/scsi/host0/bus0/target0/lun0/cd
# chmod 660 /dev/scsi/host0/bus0/target0/lun0/cd
# emerge xmms xmms-cdread
|
Note:
Make sure to use the path corresponding to the CD drive on your machine.
|
To play a CD, fire up xmms and enter /dev/cdrom as the
file you want to play.
Can I run Mac OS or Mac OS X under Gentoo Linux?
Yes, as long as your are running Gentoo Linux/PPC on Apple hardware
(or a Mac-clone). You will need to run Mac-on-Linux. Just emerge
mol. MOL support Mac OS 7.5.2 to 9.2.2, as well as any version of OS X.
It can take over your full screen, or run in a window.
For networking and sound you might install the drivers in the folder
MOL-Install on your Mac OS X-Desktop. If errors with
networking occur, make sure you have the following kernel options
enabled:
For the dhcp server:
- Socket Filtering (CONFIG_FILTER)
- Packet Socket (CONFIG_PACKET)
For NAT:
- Network packet filtering (CONFIG_NETFILTER)
- Connection tracking (CONFIG_IP_NF_CONNTRACK)
- IP tables support (CONFIG_IP_NF_IPTABLES)
- Packet filtering (CONFIG_IP_NF_FILTER)
- Full NAT (CONFIG_IP_NF_NAT)
- MASQUERADE target support (CONFIG_IP_NF_TARGET_MASQUERADE)
Which Portage USE flags do not work on PowerPC machines?
Look at /etc/make.profile/make.defaults for a list.
4. Resources
Can I buy a CD of Gentoo Linux/PPC?
Yes! We sell Gentoo on CD-ROM in our Gentoo
store. You can choose between CDs with precompiled packages for generic
ppc hardware, or optimized for G3 and G4 processors, or a KDE/GNOME LiveCD that
boots directly in a live Gentoo Linux environment.
This FAQ hasn't answered my question. What do I do now?
A good first step is to browse through the relevant documentation on www.gentoo.org. Two
PPC-specific mailing lists
currently exist, gentoo-ppc-dev and gentoo-ppc-user. Gentoo on PPC
(on forums.gentoo.org) is an open bulletin-board for discussion of all
PowerPC issues. Also, there is usually a lively discussion on IRC. Join
us on #gentoo-ppc on irc.freenode.net.
General information about Linux on PowerPC can be found at penguinppc.org. General Linux
information is at www.linuxdoc.org.
The contents of this document are licensed under the Creative Commons - Attribution / Share Alike license.
|