Skip to content. | Skip to navigation

FreeSMUG

Sections
Personal tools
You are here: Home Members Gand's Home Install Gentoo PPC on iBook G4 933mhz
Document Actions

Install Gentoo PPC on iBook G4 933mhz

by Gand last modified 2004-07-05 03:31 AM

My PPC gentoo install tracked

I follow step by step the Gentoo PPC handbook : Updated June 11, 2004

01.07.2004

Boot-up OSX CD-Rom
go to Apple/Disk Utility
go to Partition and create 2 partitions
the first one Free
the second one HFS+ to run OSX installation as you want.
Now boot from GentooCD

3.b. Automatic Network Detection
Code Listing 4: /sbin/ifconfig for a working network configuration
# /sbin/ifconfig


Code Listing 15: Using dhcpcd
# dhcpcd eth0

# /sbin/ifconfig

It works :)

4. Preparing the Disks
4.c. Default: Using mac-fdisk (Apple/IBM) Partition your Disk

Code Listing 1: Starting mac-fdisk
# mac-fdisk /dev/hda

d ->2
b ->2p (handbook say 1p but 1p is the Partition map!)
c ->3p ->512M->swap
c ->4p ->4p -> root
w ->y ->q

hda1

Apple

63

@

1

31,5k

Partition Map

hda2

bootstrap

1600

@

64

800,0K

NewWorld bootblock

hda3

swap

1048576

@

1664

512,0M

Linux swap

hda4

root

34863552

@

1050240

16,6G

Linux native

hda5

Apple_HFS

42226352

@

35913792

20,1G

HFS

hda6


16

@

78140144

8,0K

Free space

4.e. Creating Filesystems
Code Listing 3: Applying a filesystem on a partition
# mke2fs -j /dev/hda4

Code Listing 4: Creating a Swap signature
# mkswap /dev/hda3

Code Listing 5: Activating the swap partition
# swapon /dev/hda3

4.f. Mounting
Code Listing 6: Mounting partitions
# mkdir /mnt/gentoo
# mount /dev/hda4 /mnt/gentoo

Code Listing 7: Creating the /mnt/gentoo/proc mountpoint
# mkdir /mnt/gentoo/proc
# mount -t proc none /mnt/gentoo/proc

Code Listing 8: Bind-mounting the /dev-filesystem
# mkdir /mnt/gentoo/dev
# mount -o bind /dev /mnt/gentoo/dev

5. Installing the Gentoo Installation Files
5.a. Installing a Stage Tarball
Code Listing 2: Setting the date/time
# date 070115342004

5.b. Default: Using a Stage from the Internet
Code Listing 3: Going to the Gentoo mountpoin
# cd /mnt/gentoo

Code Listing 4: Surfing to the mirror listing with lynx
# lynx http://www.gentoo.org/main/en/mirrors.xml
# lynx http://mirror.switch.ch/mirror/gentoo/releases/ppc/2004.1/stages/ppc/stage1-ppc-2004.1.tar.bz2

Code Listing 6: Checking integrity of a stage tarball
# md5sum -c stage1-ppc-2004.1.tar.bz2.md5
stage1-ppc-2004.1.tar.bz2: OK

Code Listing 7: Unpacking the stage
# tar -xvjpf stage?-*.tar.bz2

5.e. Configuring the Compile Options
Code Listing 15: Opening /etc/make.conf
# nano -w /mnt/gentoo/etc/make.conf

make.conf file is:

  CHOST="powerpc-unknown-linux-gnu"
  CFLAGS="-mcpu=7450 -O2 -pipe -maltivec -mabi=altivec -mpowerpc-gfxopt"
  CXXFLAGS="${CFLAGS}"
  ACCEPT_KEYWORDS="~ppc"
  VIDEO_CARDS=radeon
  MAKEOPTS="-j2"

6. Installing the Gentoo Base System
6.a. Chrooting
Code Listing 1: Selecting fast mirrors
# mirrorselect -a -D -s4 -o | grep -ve `^Netselect` >> /mnt/gentoo/etc/make.conf

Code Listing 2: Copy over DNS information
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

Code Listing 3: Chrooting into the new environment
# chroot /mnt/gentoo /bin/bash
# env-update

--- `profiles/arch.list` is empty or not aviable.
Empty portage tree?
Caching service dependencies... [ok]
Regenerating /etc/ld.so.cache...

# source /etc/profile

Code Listing 4: Updating Portage
# emerge sync

6.d. Progressing from Stage2 to Stage3

Code Listing 13: View what `emerge system` will do
# emerge --pretend system | less

# emerge system

ERROR (#1) emerging hfsplusutils-1.0.4-r1

see thread in forum.gentoo.org italian:
http://forums.gentoo.org/viewtopic.php?t=192084

ERROR (#1):

  >>> Source unpacked.
  aclocal
  autoconf
  autoheader
  automake -a
  automake-1.5: configure.in: installing `./install-sh'
  automake-1.5: configure.in: installing `./mkinstalldirs'
  automake-1.5: configure.in: installing `./missing'
  configure.in: 224: required file `./ltmain.sh' not found
  automake-1.5: configure.in: installing `./depcomp'
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/depend2.am: AMDEP does not appear in AM_CONDITIONAL
  /usr/share/automake-1.5/am/lang-compile.am: AMDEP does not appear in AM_CONDITIONAL
  make: *** [all] Error 1

  !!! ERROR: sys-fs/hfsplusutils-1.0.4-r1 failed.
  !!! Function src_compile, Line 35, Exitcode 2
  !!! (no error message)

# emerge sync

# emerge portage

IMPORTANT: 1 config files in /etc need updating

# etc-update
'# automake –version' -> 1.8.5

# emerge system

Same error emerging di hfsplusutils-1.0.4-r1

# export WANT_AUTOMAKE=1.8 this fix automake 1.5 error but:

ERROR (#2):

  >>> Source unpacked.
  aclocal
  /usr/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
  autoconf
  autoheader
  automake -a
  configure.in: installing `./install-sh'
  configure.in: installing `./missing'
  configure.in:27: installing `./config.guess'
  configure.in:27: installing `./config.sub'
  configure.in:72: required file `./ltmain.sh' not found
  libhfsp/src/Makefile.am: installing `./depcomp'
  libhfsp/src/Makefile.am:30: `CFLAGS' is a user variable, you should not override it;
  libhfsp/src/Makefile.am:30: use `AM_CFLAGS' instead.
  libhfsp/src/Makefile.am:30: `CFLAGS' is a user variable, you should not override it;
  libhfsp/src/Makefile.am:30: use `AM_CFLAGS' instead.
  make: *** [all] Error 1

  !!! ERROR: sys-fs/hfsplusutils-1.0.4-r1 failed.
  !!! Function src_compile, Line 35, Exitcode 2
  !!! (no error message)

Errors in CFLAGS
# nano /var/tmp/portage/hfsplusutils*/work/*/libhfsp/src/Makefile.am

changing CFLAGS with AM_CFLAGS

# ebuild /usr/portage/sys-fs/hfsplusutils/hfsplusutils-1.0.4-r1.ebuild merge

ERROR (#3):

  aclocal
  /usr/share/aclocal/glib.m4:8: warning: underquoted definition of AM_PATH_GLIB
  run info '(automake)Extending aclocal'
  or see http://sources.redhat.com/automake/automake.html#Extending%20aclocal
  autoconf
  autoheader
  automake -a
  configure.in:72: required file `./ltmain.sh' not found
  make: *** [all] Error 1

  !!! ERROR: sys-fs/hfsplusutils-1.0.4-r1 failed.
  !!! Function src_compile, Line 36, Exitcode 2
  !!! (no error message)

See thread in forum.gentoo.org Gentoo on Power PC:
http://forums.gentoo.org/viewtopic.php?t=192978


-02.07.2004-

Now I use stage 3

On handbook PPC is # emerge ppc-development-source
instead is

# emerge gentoo-dev-sources


-------
genlop --pretend xfree-drm
xorgcfg
-------


03.07.2004

7. Configuring the Kernel
7.a. Timezone
Code Listing 1: Setting the timezone information
# ls /usr/share/zoneinfo
(Suppose you want to use GMT)
# ln -sf /usr/share/zoneinfo/GMT /etc/localtime

7.b. Installing the Sources
Choosing a Kernel
Code Listing 2: Installing a kernel source
# emerge gentoo-dev-sources

Code Listing 3: Viewing the kernel source symlink
# ls -l /usr/src/linux
lrwxrwxrwx 1 root root 12 Oct 13 11:04 /usr/src/linux -> linux-2.6.1

Code Listing 4: Changing the kernel source symlink
# rm /usr/src/linux
# cd /usr/src
# ln -s linux-2.6.7-gentoo-r7 linux

7.c. Manual Configuration
Code Listing 5: Invoking menuconfig
# cd /usr/src/linux
# make menuconfig

Activating Required Options
Code Listing 6: Selecting experimental code/drivers:

  Code maturity level options --->
  [*] Prompt for development and/or incomplete code/driver

  File systems --->

  [*] Virtual memory file system support (former shm fs)
  [*] /proc file system support
  [*] /dev file system support (EXPERIMENTAL)
  [*] Automatically mount at boot

  (Select one or more of the following options as needed by your system)

  <*> Reiserfs support
  <*> Ext3 journalling file system support
  <*> JFS filesystem support
  <*> Second extended fs support
  <*> XFS filesystem support

  network (to fix problem with eth0 card)
  <*> Sun GEM support

  File Systems --->

  [*] HFS Support

Compiling and Installing
Code Listing 12: Compiling the kernel
(Apple/IBM) # make dep && make vmlinux modules modules_install

Code Listing 13: Installing the kernel
(Apple/IBM) # cp vmlinux /boot/kernel-2.4.24' (old verson)
(Apple/IBM) # cp vmlinux /boot/kernel-2.6.7

Code Listing 14: Copying the system map
# cp System.map /boot/System.map-2.4.24 (old version)
# cp System.map /boot/System.map-2.6.7

Code Listing 15: Backing up your kernel configuration
# cp .config /boot/config-2.4.24 (old version)
# cp .config /boot/config-2.6.7

8. Configuring your System
8.a. Filesystem Information
Creating /etc/fstab
Code Listing 1: Opening /etc/fstab
# nano -w /etc/fstab

Code Listing 5: A full /etc/fstab example:

  /#dev/hda2         /boot       ext2    noauto,noatime 1 2
  /dev/hda3          none        swap    sw             0 0
  /dev/hda4          /           ext3    noatime        0 1

  none               /proc       proc    defaults       0 0

  none               /dev/shm    tmpfs   defaults       0 0

  /dev/cdroms/cdrom0 /mnt/cdrom  auto    noauto,user    0 0

8.b. Networking Information
Code Listing 8: Setting the hostname
# echo tux > /etc/hostname

Code Listing 9: Setting the domainname
# echo homenetwork > /etc/dnsdomainname

Code Listing 10: Setting the NIS domainname
# echo nis.homenetwork > /etc/nisdomainname

Code Listing 11: Adding domainname to the default runlevel
# rc-update add domainname default

Configuring your Network
Code Listing 12: Opening /etc/conf.d/net for editing
# nano -w /etc/conf.d/net

Code Listing 14: Examples for /etc/conf.d/net:

  (For DHCP)

  iface_eth0="dhcp"

Automatically Start Networking at Boot
Code Listing 15: Adding net.eth0 to the default runlevel
# rc-update add net.eth0 default

8.c. System Information
Code Listing 22: Opening /etc/rc.conf
# nano -w /etc/rc.conf

9. Configuring the Bootloader
Code Listing 1: Installing yaboot
# emerge --usepkg --update yaboot*

Code Listing 3: /etc/yaboot.conf:

  ## /etc/yaboot.conf
  ## our bootstrap partition:

  boot=/dev/hda3

  device=hd:
  partition=4

  delay=5

  defaultos=macosx

  timeout=30

  install=/usr/lib/yaboot/yaboot

  magicboot=/usr/lib/yaboot/ofboot

  #image=/boot/vmlinux
  image=/boot/kernel-2.6.7

  label=Linux
    root=/dev/hda4
    sysmap=/boot/System.map
    sysmap=/boot/System.map-2.6.7
    read-only

  #macos=/dev/hda13
  macosx=/dev/hda5
  enablecdboot
  enableofboot


# mkofboot -v (only first time)
# ybin -v (to update yaboot.conf)

10. Installing Necessary System Tools
10.a. System Logger
Code Listing 1: Installing a system logger
# emerge syslog-ng
# rc-update add syslog-ng default

11. Finalizing your Gentoo Installation
11.a. User Administration
Code Listing 1: Setting the root password
# passwd

Adding a User for Daily Use
Code Listing 3: Adding a user for day-to-day use
# useradd john -m -G users,wheel,audio -s /bin/bash
# passwd john
Password: (Enter the password for john)
Re-enter password: (Re-enter the password to verify)

11.b. Reboot and Enjoy
Rebooting
Code Listing 4: Rebooting the system
# exit
# cd /
# umount /mnt/gentoo/boot /mnt/gentoo/proc /mnt/gentoo
# reboot

Reboot has success :)


04/07/2004

# emerge gnome 01,30 – 9,45

# emerge xorg-x11 10,30 -12,00

# emerge -k xchat 13,00 – 13,05

# cat /proc/cpuinfo

processor:

0

cpu:

7455, altivec supported

clock:

931MHz

revision:

3.3 (pvr 8001 0303)

bogomips:

[HH].MM.SS">

939.35.00

machine:

PowerBook6,3

motherboard:

PowerBook6,3 MacRISC3 Power Macintosh

detected as:

287 (iBook G4)

pmac flags:

0000000a

L2 cache:

256K unified

memory:

256MB

pmac-generation:

NewWorld

# cat /proc/partitions

0

39070080

hda

1

31

hda1

2

800

hda2

3

524288

hda3

4

17431776

hda4

5

21113176

hda5

6

8

hda6

MeDevil> Leonida, to start gnome session run: # gdm

Really thank to all #gentoo on irc.azzurra.org that kindly answered to al my newbie (silly) questions

linux user 360000

Next page


Powered by Plone CMS, the Open Source Content Management System

This site conforms to the following standards: