Gnuraghe

Header

: It / Gentoo in un iBook G3 Dual USB

Body

Tutorial & Articoli: Gentoo in un iBook G3 Dual USB

Gentoo

Ho seguito il manuale ufficiale http://www.gentoo.org/doc/it/handbook/handbook-ppc.xml.

Qui riporto in maniera utile e concisa tutti i passi.

1. A proposito dell'installazione di Gentoo

Questa vuole essere una guida veloce su come installare Gentoo Linux sul portatile Apple iBook G3 500Mhz Dual-USB 12" [October 2001] (ultima release uscita nell'ottobre 2001)

Alcune info sulla CPU:

 # cat /proc/cpuinfo 
processor	: 0
cpu		: 750CXe
clock		: 499.999000MHz
revision	: 34.21 (pvr 0008 2215)
bogomips	: 33.28
timebase	: 16640000
platform	: PowerMac
model		: PowerBook4,1
machine		: PowerBook4,1
motherboard	: PowerBook4,1 MacRISC2 MacRISC Power Macintosh
detected as	: 257 (iBook 2)
pmac flags	: 0000001b
L2 cache	: 256K unified
pmac-generation	: NewWorld
Memory		: 256 MB

Alcune info sulle PCI:

 # lspci -k
0000:00:0b.0 Host bridge:
    Apple Computer Inc. UniNorth/Pangea AGP
	Kernel driver in use: agpgart-uninorth
	Kernel modules: uninorth-agp
0000:00:10.0 VGA compatible controller:
    ATI Technologies Inc Rage Mobility M3 AGP 2x (rev 02)
	Subsystem: ATI Technologies Inc Rage Mobility M3 AGP 2x
	Kernel driver in use: aty128fb
0001:10:0b.0 Host bridge:
    Apple Computer Inc. UniNorth/Pangea PCI
	Kernel modules: uninorth-agp
0001:10:17.0 Class ff00:
    Apple Computer Inc. KeyLargo/Pangea Mac I/O
	Kernel driver in use: macio
0001:10:18.0 USB Controller:
    Apple Computer Inc. KeyLargo/Pangea USB
	Kernel driver in use: ohci_hcd
0001:10:19.0 USB Controller:
    Apple Computer Inc. KeyLargo/Pangea USB
	Kernel driver in use: ohci_hcd
0002:20:0b.0 Host bridge:
    Apple Computer Inc. UniNorth/Pangea Internal PCI
	Kernel modules: uninorth-agp
0002:20:0e.0 FireWire (IEEE 1394):
    Apple Computer Inc. UniNorth/Pangea FireWire
	Subsystem: Apple Computer Inc. UniNorth/Pangea FireWire
	Kernel driver in use: ohci1394
	Kernel modules: ohci1394
0002:20:0f.0 Ethernet controller:
    Apple Computer Inc. UniNorth/Pangea GMAC (Sun GEM)
	Kernel driver in use: gem

2. Scelta della modalità di installazione

Scaricare l'immagine install-powerpc-universal-2008.0.iso e masterizzarla su un CD e inserire questo nel lettore del portatile.

Avviare il portatile e premere il tasto [C] sinchè non appare la schermata dove scrivere:

 Gentoo Linux Installation LiveCD
 ...
 boot: ppc32

Caricare la keymap:

 # ls /usr/share/keymaps/i386/qwerty@@
# loadkeys it.map.gz

3. Configurazione della rete

Nessuna rete! Staccare il portatile dallla rete internet e proseguire l'installazione.

4. Preparazione dei dischi

 # mac-fdisk /dev/hda
   i        per cancellare tutto
     y  
   b        per creare una partizione Apple_Bootstrap
     2p
   c        per creare una partizione swap
     3p
     512M
     swap
   c        per creare una partizione di Root
     4p
     4p
     root
   w        scrivi tabella partizioni
   p        stampa a video la tabella delle partizioni
        #                type name     length  base     size
/dev/hda1 Apple_partition_map Apple       63 @ 1       31.5k
/dev/hda2     Apple_Bootstrap bootstrap 1600 @ 64     800.0k
/dev/hda3     Apple_UNIX_SVR2 swap   1048576 @ 1664   512.0M
/dev/hda4     Apple_UNIX_SVR2 root  28447872 @ 1050240 13.6G
Block size=512, Number of Blocks=29498112
DeviceType=0x0, DeviceId=0x0
   q        esci

File System:

 # mkswap /dev/hda3
 # swapon /dev/hda3
 # mke2fs -j /dev/hda4

Montare la partizione principale

 # mount /dev/hda4 /mnt/gentoo

5. Copia dei file di installazione di Gentoo

Impostare la Data (MeseGiornoOreMinutiAnno):

 # date MMDDhhmmYYYY

Stage 3:

 # tar -xvjpf /mnt/cdrom/stages/stage3-ppc-2008.0.tar.bz2

Installare Portage:

 # tar -xvjf /mnt/cdrom/snapshot/portage-2008.0.tar.bz2 -C /mnt/gentoo/usr

Codice sorgente CD:

 # mkdir /mnt/gentoo/usr/portage/distfiles'
 # cp /mnt/cdrom/distfiles/* /mnt/gentoo/usr/portage/distfiles

6. Installazione del sistema base Gentoo

Configurazione opzioni di compilazione (meglio 750 che powerpc in mcpu e mtune), aggiunta mirror, flag USE, VIDEO e INPUT:

 # nano -w /mnt/gentoo/etc/make.conf
CFLAGS="-Os -mcpu=750 -mtune=750 -fno-strict-aliasing -pipe"
CXXFLAGS="${CFLAGS}"
CHOST="powerpc-unknown-linux-gnu"
MAKEOPTS="-j2"

GENTOO_MIRRORS="http://gentoo.inode.at"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"

USE="X alsa -aqua -bluetooth bzip2 -doc dri -examples      \
 -gnome -kde minimal -mono -oci8 ogg opengl -oracle -pcmcia\
 -perl php -plasma -ruby -samba svg -szip theora usb       \
 -videos vorbis -yahoo zlib"

INPUT_DEVICES="evdev synaptics"
VIDEO_CARDS="rage128"

Montaggio proc e dev:

 # mount -t proc none /mnt/gentoo/proc
 # mount -o bind /dev /mnt/gentoo/dev

Chroot: entrare nel nuovo ambiente:

 # chroot /mnt/gentoo /bin/bash
 # env-update
 # source /etc/profile
 # export PS1="(chroot) $PS1"

Locale:

 # nano -w /etc/locale.gen
en_US.UTF-8 UTF-8
 # locale-gen

7. Configurazione del Kernel

Time zone:

 # cp /usr/share/zoneinfo/Europe/Rome /etc/localtime

Kernel:

 # emerge gentoo-sources
 # ls -l /usr/src/linux

Configurazione Kernel

 # emerge pciutils
 # lscpi
 # lsmod
 # cd /usr/src/linux
 # make pmac32_defconfig
 # make menuconfig
File system --->
    Pseudo Filesystems --->
        [*] /proc/kcore support
        [*] Virtual memory file sy...
    Partition Types --->
        [*] Advanced partition sel...
        [*] Macintosh partition map
        [*] PC BIOS (MSDOS partiti...
    <*> Second extended fs support
    <*> Ext3 journaling file syste...
    [*] Ext3 POSIX Access Control ...
    [*] Ext3 extended attributes
    [*] Miscellaneous filesystems ...
        <M> Apple Macintosh file s...
        <M> Apple Extended HFS fil...
Device Drivers --->
    [*] Network device support --->
        [*] Etherent (10 or 100Mbi...
            <*> MACE (Power Mac et...
            <*> Sun GEM support
            [*] EISA, VLB, PCI and...
            [ ] AMD Pcnet32 PCI su...
            { } Generic Media Inde...
        < > PPP (point-to-point pr...
    Graphics support --->
        < > nVidia Framebuffer Sup...
        Console display driver sup...
            {*} 3dfx Banshee/Voodo...
        <M> /dev/agpgart (AGP Supp...
       (16) Maximum number of GPUs
        <M> Direct Rendering Manag...
        [*] Open Firmware frame bu...
        [*] Apple "control" displa...
        [*] Apple "platinum" displ...
        [*] Apple "valkyrie" displ...
        [ ] Chips 65550 display su...
        [ ] TMS Twin Turbo display...
        < > Matrox acceleration
        < > ATI Radeon display sup...
        <*> ATI Rage128 display su...
            [*] Support for backli...
        {*} Support for frame buff...
            [ ] Enable Video Mode ...
            [ ] Enable Tile Blitti...
        <M> Direct Rendering Manag...
            <M> ATI Rage 128

Compilazione e Installazione del Kernel (circa 2 ore):

 # cd /usr/src/linux
 # make && make modules_install

 # cp vmlinux /boot/kernel-2.6.24-gentoo-r3

8. Configurazione del sistema

Fstab:

 # nano -w /etc/fstab
/dev/hda3   none        swap   sw                   0 0
/dev/hda4   /           ext3   noatima              0 1
/dev/cdrom  /mnt/cdrom  auto   noauto,ro,user       0 0
proc        /proc       proc   defaults             0 0
shm         /dev/shm    tmpfs  nodev,nosuid,noexec  0 0

Rete:

 # nano -w /etc/conf.d/hostname
HOSTNAME="saldigna"
 # nano -w /etc/conf.d/net
config_eth0=("dhcp")
dns_domain_lo="homenetwork"
 # nano -w /etc/hosts
127.0.0.1 saldigna.homenetwork saldigna localhost
::1       saldigna.homenetwork saldigna localhost
 # rc-update add net.eth0 default

Password di Root:

 # passwd

Informazioni di sistema

 # nano -w /etc/rc.conf
UNICODE="yes"
EDITOR="/bin/nano"

Keymap:

 # nano -w /etc/conf.d/keymaps
KEYMAP="it"
SETWINDOWKEYS="no"
EXTENDED_KEYMPAS=""
DUMPKEYS_CHARSET=""

Clock:

 # nano -w /etc/conf.d/clock
CLOCK="local"
TIMEZONE="Europe/Rome"
CLOCK_OPTS=""
CLOCK_SYSTOHC="no"
SRM="no"
ARC="no"

9. Installazione degli strumenti di sistema

Logger

 # emerge syslog-ng
 # rc-update add syslog-ng default

Cron

 # emerge vixie-cron
 # rc-update add vixie-cron default'

Client DHCP

 # emerge dhcpcd

10. Configurazione del Bootloader

 # exit
 # '''mount -o bind /sys /mnt/gentoo/sys
 # chroot /mnt/gentoo /bin/bash
 # /usr/sbin/env-update && source /etc/profile
 # emerge yaboot
 # exit
 # 'yabootconfig --chroot /mnt/gentoo
 ... on /dev/hda2 to boot Linux from /dev/hda4? y
 ...eate simple /mnt/gentoo/etc/yaboot.conf...? y
 ...a kernel image: /boot/kernel-2.6.24-gentoo-r3

 # '''nano -w /etc/yaboot.con"
boot=/dev/hda2
device=hd:
partition=4
delay=10
timeout=40
install=/src/lib/yaboot/yaboot
magicboot/usr/lib/yaboot/ofboot

image=/boot/kernel-2.6.24-gentoo-r3
    label=Linux
    root=/dev/hda4
    read-only
 # mkofboot -v
 # ybin -v

Riavvio:

 # umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo sys

 # reboot

Alcuni dettagli

TuxMobile

Footer

All trademarks and copyrights on this page are owned by their respective owners