|
Install Gentoo on a Powerbook G3 (fireware)
by YGC (mailygc@126.com)
下面是我在我的PowerBook G3上安装Gentoo的全过程。。
自己做一个备忘录,也给想在Powerbook上装Gentoo的做一个参考。
以下为基本的安装过程,详细请参考Gentoo的文档
http://www.gentoo.org/doc/en/handbook/handbook-ppc.xml
基本的安装步骤如下:
用2004.3LiveCD进入。
1.配置网络
#net-setup eth0
回答它几个问题就行了。
2.分区
#mac-fdisk /dev/hda
以下是我的分区。
- /dev/hda
- # type name length base ( size ) system
- /dev/hda1 Apple_partition_map Apple 63 @ 1 ( 31.5k) Partition map
- /dev/hda2 Apple_Bootstrap bootstrap 1600 @ 64 (800.0k) NewWorld bootblock
- /dev/hda3 Apple_UNIX_SVR2 / 12582912 @ 1664 ( 6.0G) Linux native
- /dev/hda4 Apple_UNIX_SVR2 swap 1048576 @ 12584576 (512.0M) Linux swap
- /dev/hda5 Apple_UNIX_SVR2 /home 6007728 @ 13633152 ( 2.9G) Linux native
- Block size=512, Number of Blocks=19640880
- DeviceType=0x0, DeviceId=0x0
复制代码
3.建立文件系统
#mke2fs -j /dev/hda3
#mkswap /dev/hda4
#mke2fs -j /dev/hda5
#swapon /dev/hda4
4.挂载分区
#mount /dev/hda3 /mnt/gentoo
5.解开Stage Tarball用Portgage
#cd /mnt/gentoo
#tar xvjpf /mnt/cdrom/stages/stage3-*g3*.tar.bz2
#tar xvjf portage-20040926.tar.bz2 -C /mnt/gentoo/usr
6.设置编译选项
以下是我的make.conf
- # These settings were set by the catalyst build script that automatically built this stage
- # Please consult /etc/make.conf.example for a more detailed example
- #CFLAGS="-O2 -mtune=G3 -fno-strict-aliasing -pipe"
- CFLAGS="-O3 -pipe -mcpu=750 -fno-strict-aliasing -mpowerpc-gfxopt -mmultiple -mstring"
- CHOST="powerpc-unknown-linux-gnu"
- CXXFLAGS="${CFLAGS}"
- #LDFLAGS="-Wl,-O1"
- LDFLAGS="-Wl,-O1 -Wl,--enable-new-dtags -Wl,--sort-common -s"
- MAKEOPTS="-j2"
- #PORTDIR_OVERLAY="/usr/local/portage"
- ACCEPT_KEYWORDS="~ppc"
- GENTOO_MIRRORS="ftp://gg3.net/pub/linux/gentoo/ http://gentoo.mirrors.tds.net/gentoo http://mirror.etf.bg.ac.yu/gentoo http://mirror.datapipe.net/gentoo http://mirror.averse.net/pub/gentoo/"
- #####ftp://ftp.sjtu.edu.cn/sites/gentoo ftp://ftp.lzusiyu.org/mirror/gentoo"
- ######SYNC="rsync://ftp.tsinghua.edu.cn/mirror/gentoo/gentoo-portage rsync://ftp.lzusiyu.org/mirror/gentoo/portage
- #######rsync://eelinux.3322.org/pub/mirror/gentoo/portage rsync://ftp.sjtu.edu.cn/sites/gentoo/gentoo-portage"
- USE="acpi cjk nls ppc freetype fbdev f77 java ncurses gpm gtk gtk2 -gnome qt -kde rage128 dvd alsa -arts mmx clisp"
- LINGUAS="zh_CN"
复制代码
7.进入gentoo
#mount -t proc none /mnt/gentoo/proc
#chroot /mnt/gentoo /bin/bash
#env-update && source /etc/profile
8.更新系统
#emerge sync
#emerge --update world
9.安装内核
#emerge gentoo-dev-sources
#cd /usr/src/linux
#make menuconfig
#make all && make menuconfig
#cp vmlinux /boot/kernel-2.6.10
#cp System.map /boot/System.map-2.6.10
#cp .config /boot/config-2.6.10
以下是我的内核选项配置.......
#find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko'
#nano -w /etc/modules.autoload.d/kernel-2.6
在这文件里加入开机自动载入的模块
#modules-update
10.配置系统
a.fstab
#nano /etc/fstab
下面是我的配置。
- # <fs> <mountpoint> <type> <opts> <dump/pass>
- /dev/hda3 / ext3 noauto,noatime 1 1
- /dev/hda4 none swap sw 0 0
- /dev/hda5 /home ext3 noatime 0 1
- /dev/cdroms/cdrom0 /mnt/cdrom auto noauto,user 0 0
- none /proc proc defaults 0 0
- none /dev/shm tmpfs defaults 0 0
复制代码
b.网络信息
# echo tux > /etc/hostname
# echo homenetwork > /etc/dnsdomainname
# echo nis.homenetwork > /etc/nisdomainname
# rc-update add domainname default
配置网络
#nano /etc/conf.d/net
#nano /etc/resolv.conf
#rc-update add net.eth0 default
c.安装系统工具
#emerge metalog
#rc-update add metalog default
#emerge vixie-cron
#rc-update add vixie-cron default
11.配置启动
#emerge yaboot
#nano yaboot.conf
下面是我的配置文件。
- ## yaboot.conf generated by yabootconfig 1.0.7
- ##
- ## 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=/pci@f2000000/mac-io@17/ata-4@1f000/disk@0:
- partition=3
- root=/dev/hda3
- timeout=30
- install=/usr/lib/yaboot/yaboot
- magicboot=/usr/lib/yaboot/ofboot
- #initrd=/boot/initrd-1024x768
- #append="video=atyfb:1024x768-32 splash=silent"
- image=/boot/kernel-gentoo-2.6.10
- label=2.6.10
- root=/dev/hda3
- sysmap=/boot/System.map-gentoo-2.6.10
- read-only
复制代码
12.重启系统
#exit
#umount /mnt/gentoo/proc /mnt/gentoo/dev /mnt/gentoo
#reboot |
|