Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
The complete HOWTO install Gentoo on a G4 iBook
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC
View previous topic :: View next topic  
Author Message
zerohead
n00b
n00b


Joined: 26 Nov 2004
Posts: 5

PostPosted: Sun Nov 28, 2004 1:05 am    Post subject: The complete HOWTO install Gentoo on a G4 iBook Reply with quote

Hi,

even when I'm far away from knowing much about Gentoo and I'm still compiling ;-) I'd like to share all the information I used to install Gentoo on a 12" G4 iBook, 800 Mhz, Combo.

I know there lot of great howto's but still I had to google, search the gentoo-forums and asking all the nice people at the gentoo-ppc IRC (thanks to all of you, it's people like you and all you code-geeks out there, that makes the world go round)

Before you start, 3 suggestions:
1) backup up your data, in case you make a Dual-Boot-System
2) hey, you shouldn't read - you should back up your data!
3) read at least the Gentoo-Handbook once:
http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml

Just to give you more background-info and because most stuff I've written down, is the brainwork of others, some good links about Gentoo on iBooks/PPCs:

gentoo linux on iBook:
http://www.desertsol.com/~kevin/ppc/
http://www.mayin.org/aragorn/computers/ibook.html
PPC-Configuration-Database (Great work - THANKS!)
http://ppcconfdb.sourceforge.net/?id=conf
Gentoo Desktop Documentation Resources
http://www.gentoo.org/doc/en/desktop.xml
Thanks to Colin for his Config-files
http://geekounet.org/powerbook/ibookg4.html

If you have any comments and questions about this howto, just post them here, I'll get a notification through email.

Have fun and give something back to the community

Phil

- - - 8< - - - ok, let's go.

Installing Gentoo (2.6.7-r14) on iBook G4, 800 Mhz, Combo

1. Download LiveCD from: http://www.gentoo.org/main/en/mirrors.xml
- Choose a mirror and follow that path /releases/ppc/2004.3/livecd/
- Download: install-ppc-universal-2004.3.iso

2. Burn the .iso-file to a CD using 'Disk Utility'
- Click 'Burn', browse to the image-file and go.

3. if you want to have a DualBoot-System and you don't have a 2nd partition for Gentoo free, backup your stuff and partition your harddisc, so that there is room for gentoo. Install Mac OS X to one partition, leave the other one unformatted.
More information about howto create partition and how to install a dual-boot system can be found at http://people.debian.org/~branden/ibook.html

4. Put the LiveCD we burned in your Drive and shutdown OS X. Start and press the 'c' key to boot from CD.

5. You should now have a Gentoo Environment running from the LiveCD and a something like: livecd root #

6. If you want to have ethernet during install:
Code:
# dhcpcd eth0

for Airport and WEP etc. See Gentoo Handbook
http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml?part=1&chap=3
Check if its working with:
Code:
# ping -c 3 www.google.com

By the way, you'll a US-keyboard-layout, so some keys maybe not on the correct place.

7. Start mac-fdisk, the partition program
Code:
# mac-fdisk /dev/hda

- Print your partition-table with 'p'
- Create a bootstrap-partition with 'b'. First block should be the number of the freespace-partition, followed by 'p' (ex: 2p)
- Create a swap-partition with 'c' and fFrst block '3p' (increase number from step before). Length should be twice the size of your RAM followed by M (ex: 640M). Name: swap
- Create root partition with 'c'. First block '4p' (again increase number). Lenth: '4p' (now use _same_ number) and name: root
- Write table with 'w' and exit with 'q'
- Be sure to write down what's on every partition, like /dev/hda2 bootstrap, /dev/hda3 swap etc.

8. Create filesystem on root
Code:
# mke2fs -j /dev/hda4


9. Activate swap-partition
Code:
# mkswap /dev/hda3

Code:
# swapon /dev/hda3


10. Mount root-partition
Code:
# mkdir /mnt/gentoo

Code:
# mount /dev/hda4 /mnt/gentoo


11. Change folder to your root-disc
Code:
# cd /mnt/gentoo


12. Extract Stage3-tarball
Code:
# tar -xvjpf /mnt/cdrom/stages/stage3-g4-20040926.tar.bz2


13.Installing portage snapshot
Code:
# tar -xvjf /mnt/cdrom/snapshots/portage-20040926.tar.bz2 -C /mnt/gentoo/usr/


14. Copy sources from CD
Code:
# mkdir /mnt/gentoo/usr/portage/distfiles

Code:
# cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles


15. No need to change Compile-Options for a stage3-install ;-)

16. Copy DNS Info
Code:
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf


17. Mounting proc filesystem
Code:
# mount -t proc none /mnt/gentoo/proc


18. Entering new environment
Code:
# chroot /mnt/gentoo /bin/bash

Code:
# env-update

Code:
# source /etc/profile


19. USE-Flags: No changes needes, cause we do a stage3-install ;-)

20. Timezone, choose the correct one
Code:
# ln -sf /usr/share/zoneinfo/Europe/Berlin /etc/localtime


21. Installing sources
Code:
# emerge gentoo-dev-sources


22. Check link to kernel-sources
Code:
# ls -l /usr/src/linux


23. Kernel Configuration
Code:
# cd /usr/src/linux

Code:
# wget http://geekounet.org/powerbook/files/.config

Code:
# make oldconfig

Now hit Enter a trillion times.

24. Compile
Code:
# make && make modules_install


25. Installing kernel
Code:
# cp vmlinux /boot/kernel-2.6.7


26. Copy System.map
Code:
# cp System.map /boot/System.map-2.6.7


27. Backing up kernel-configuration
Code:
# cp .config /boot/config-2.6.9


28. Optional: Configuring modules
Code:
# find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko'

Code:
# nano -w /etc/modules.autoload.d/kernel-2.6

Code:
# modules-update


29. Creating /etc/fstab
Code:
# nano -w /etc/fstab


30. Setting Hostname, Domainname
Code:
# echo tux > /etc/hostname

Code:
# echo homenetwork > /etc/dnsdomainname

Code:
# rc-update add domainname default


31. Configuring network
Code:
# nano -w /etc/conf.d/net

to have network at boot:
Code:
# rc-update add net.eth0 default

Code:
# nano -w /etc/hosts

ex: 127.0.0.1 tux.homenetwork tux localhost

32. Setting root-password and enable serial console
Code:
# passwd

Code:
# echo "tts/0" >> /etc/securetty


33. Edit System-Configuration file
Code:
# nano -w /etc/rc.conf


34. Installing system-logger
Code:
# emerge metalog

Code:
# rc-update add metalog default


35. Installing a cron daemon
Code:
# emerge vixie-cron

Code:
# rc-update add vixie-cron default


36. File Indexing
Code:
# emerge slocate


37. Networking
Code:
# emerge dhcpcd


37a. Recommended: If you want to save you some trouble, just merge now and skip these steps later.
Code:
# emerge shadow

Code:
# emerge pam

Code:
# emerge tcp-wrappers


38. Bind-mounting the /dev-filesystem
Code:
# exit

Code:
# mount -o bind /dev /mnt/gentoo/dev

Code:
# chroot /mnt/gentoo /bin/bash

Code:
# /usr/sbin/env-update && source /etc/profile


39. Installing yaboot
Code:
# emerge --usepkg --update yaboot

Code:
# chroot /mnt/gentoo /bin/bash

Code:
# /usr/sbin/env-update && source /etc/profile

Code:
# nano -w /etc/yaboot.conf


Mine looks:

## yaboot.conf
boot=/dev/hda2
device=/pci@f4000000/ata-6@d/disk@0:
partition:4
root=/dev/hda4
timeout=30
install=/usr/lib/yaboot/yaboot
magicboot=/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.7
sysmap=/boot/System.map-2.6.7
label=Linux
read-only

macosx=/dev/hda5
enablecdboot
enableofboot
## End of /etc/yaboot.conf

Now write the stuff to disk
Code:
# ybin -v


41. reboot
Code:
# exit

Code:
# cd

Code:
# umount /mnt/gentoo/proc /mnt/gentoo

Code:
# reboot


Unfortunately after all the waiting and compiling the result was a
"PAM Failure, aborting: Critical error - immediate abort"

43. Never give up - what to do against PAM-Failure
Plugin LiveCD and boot
Code:
# mount /dev/hda4 /mnt/gentoo

Code:
# mount -t proc none /mnt/gentoo/proc

Code:
# chroot /mnt/gentoo /bin/bash

Code:
# env-update && source /etc/profile

Code:
# dhcpcd

Code:
# emerge pam

Code:
# emerge shadow


repeat Step 41 (unmounting & reboot)

44. Adding a user for daily use
Code:
# useradd -m -G users,wheel,audio,tty -s /bin/bash john

Code:
# passwd john


45. Updating Portage Tree
Code:
# dhcpcd

Code:
# emerge --sync

Code:
# updatedb


46. Optional: Installing Partition-Programs
Code:
# emerge mac-fdisk

Code:
# emerge parted


47. Optional for german Users: Setting POSIX locale
Code:
# nano /etc/profile

add/change: export LANG="de_DE@euro"

48. Optional: Keyboard Layout for Console
Code:
# nano /etc/rc.conf

add/change: KEYMAP="de-latin1"

49. To get function-keys working
Code:
# emerge pbbuttons

Code:
# cd /etc

Code:
# cp pbbuttons.conf pbbuttons.conf.old

Code:
# wget http://geekounet.org/powerbook/files/pbbuttonsd.conf


50. Setting up Xorg
Code:
# emerge xorg-x11

Go and and get a life, this will take a while/some hours.

51. Reinitialising the environment variables
Code:
# env-update

Code:
# source /etc/profile


52. Getting a correct xorg.conf-file.
Code:
# cd /root

Code:
# wget http://geekounet.org/powerbook/files/xorg-g4.conf


53. Using the mouse under X / Recompiling kernel (fast)
Check if trackpad is working:
Code:
# cat /dev/input/mice

maybe you need to switch to another console, if the screen went mad
CTRL+C to exit, if you want to be sure reboot.
make.conf should have CONFIG_MAC_EMUMOUSEBTN=y, because we forgott that:
Code:
# cd /usr/src/linux

Code:
# make menuconfig

Device Drivers -> Macintosh, emulate 2nd & 3rd button = yes
Code:
# cp vmlinux /boot/kernel-2.6.7

Code:
# cp System.map /boot/System.map-2.6.7

Code:
# cp .config /boot/config-2.6.9

Code:
# nano /etc/sysctl.conf file

add: dev.mac_hid.mouse_button_emulation = 1
add: dev.mac_hid.mouse_button2_keycode = 68
add: dev.mac_hid.mouse_button3_keycode = 87

54. Continue with xorg
Code:
# X -configure /root/xorg-g4.conf

if it worked, exit it by Ctrl-Alt-Backspace
Code:
# cp /root/xorg-g4.conf /etc/X11/xorg.conf

Now you can start X with
Code:
# startx


55. Optional: a german keyboard in X
Code:
# nano /etc/X11/xorg.conf

for german, add to: Identifier "Keyboard0"
add: Option "XkbLayout" "de"

56. Before Installing KDE
Code:
# emerge tcp-wrappers


57. Installing KDE
Code:
# nano /etc/make.conf

add: USE="kde qt"
Code:
# merge kdebase

If you've skipped the emerging of tcp-wrappers, you'll get this:
make: *** No rule to make target '//usr/lib/libwrao.a', needed by 'portmap'- Stop.
!!! ERROR: net-nds/portmap-5b-r8 failed.
!!! Function src_compile, Line 58 Exitcode 2

58. If config-files are updated after doing an emerge
Code:
# emerge --help config

Code:
# find /etc -iname '.cfg????_*'

should show: /etc/fonts/.cfg0000_fonts.conf and /etc/.cfg0000_make.conf.example
Code:
# env-update

with -3 you can overwrite the old ones. Make sure that you didn't edit these configfiles before, because then you have to compare them manually. Have fun ...

59. Continue with KDE
Code:
# echo "exec startkde" > ~/.xinitrc

Code:
# startx

Go through the setup process
My network was broken after reboot, and I was unable to get a valid IP from my DHCP-router using
Code:
# dhcpcd
(that worked before)
Solution:
Code:
# dhcpcd -h name eth0

If you're using Airport, PPPoE etc. try to use the -h option too. If you don't know what this is for: man dhcpcd

60. Installing additional KDE-packages
Code:
# emerge kdeadmin

Code:
# emerge kdenetwork

Code:
# emerge kdegraphics

Code:
# emerge kdemultimedia

Code:
# emerge kdenetwork

Code:
# emerge kdepim

Code:
# emerge kdeutils


To be continued ...[/url]
Back to top
View user's profile Send private message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Sun Nov 28, 2004 2:02 pm    Post subject: Reply with quote

What did you managed to work?

VGA OUT?
sleep?
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
zerohead
n00b
n00b


Joined: 26 Nov 2004
Posts: 5

PostPosted: Sun Nov 28, 2004 2:36 pm    Post subject: What did you managed to work. Reply with quote

Just working on setting up GNOME now.
I'll add further steps to this howto as soon as the worked on my iBook

Next will be:
- Sleep
more about how to setup sleep can be found at
https://forums.gentoo.org/viewtopic.php?t=254232
- VGA Out
You'll find some infos about that in the above topic, too. But it seems that you know that topic, since you post to it ;-)
Stay tuned we'll get this work.
- Sound
Back to top
View user's profile Send private message
aronchi
Tux's lil' helper
Tux's lil' helper


Joined: 23 Nov 2004
Posts: 94

PostPosted: Sun Nov 28, 2004 2:53 pm    Post subject: Reply with quote

Thanks for your work. I've asked that because I didn't yet managed to get VGA-OUT working.

I think it would useful if you write also your pc configuration (video card, processor, etc).

Thanks again, I'm waiting for you :)
_________________
Alessandro Ronchi Home Page
SOASI: Sviluppo Software e Sistemi Open Source Forlì
Back to top
View user's profile Send private message
zerohead
n00b
n00b


Joined: 26 Nov 2004
Posts: 5

PostPosted: Sun Nov 28, 2004 3:51 pm    Post subject: Reply with quote

Something bad happened. My harddrive died at least some partitions were lost. Still checking that.
My configuration:
- iBook G4, 800 Mhz, 256 KB L2 Cache
- 256 MB RAM (DDR 266 Mhz)
- 30 GB Ultra-ATA-Harddisk
- 12" LCD
- ATI Radeon Mobility 9200 with 32 MB
- ComboDrive
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on PPC All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum