Code: |
!!! Your current profile is deprecated and not supported anymore. !!! Please upgrade to the following profile if possible: default-linux/x86/2004.2/gcc34 To upgrade do the following steps: # emerge -n '>=sys-apps/portage-2.0.51' # cd /etc/ # rm make.profile # ln -s ../usr/portage/profiles/default-linux/x86/2004.2/gcc34 make.profile |
Code: |
/dev/hda1 /boot 10M ext2 /dev/hda2 (For winxp) 5G NTFS /dev/hda3 / 10G reiser4 /dev/hda4 extended /dev/hda5 swap 512M swap /dev/hda6 /home 3G reiser4 /dev/hda7 /data 2G ext3 /dev/hda8 /share 20G fat32 /dev/hda9 (空闲空间以备将来使用, 例如可以用来作 stage4 备份的测试) |
Code: |
# mke2fs /dev/hda1 # mkfs.reiser4 /dev/hda3 # mkfs.reiser4 /dev/hda6 # mke2fs -j /dev/hda7 # mkswap /dev/hda5 # swapon /dev/hda5 # mount /dev/hda3 /mnt/gentoo # mkdir /mnt/gentoo/boot # mount /dev/hda1 /mnt/gentoo/boot |
Code: |
# cd /mnt/gentoo (通过 link2 获得 stage1 压缩包) # tar -xvjpf stage?-*.tar.bz2 (解压完之后可以把 stage1 压缩包删除或是移动到别的目录下保存 - 尽管意义不大) |
Code: |
# mount /dev/hda6 /mnt/gentoo/home # mount -t proc none /mnt/gentoo/proc |
Code: |
CFLAGS="-march=athlon-tbird -O3 -pipe -fomit-frame-pointer" |
Code: |
CXXFLAGS="${CFLAGS} -fvisibility-inlines-hidden" |
Code: |
LDFLAGS="-Wl,-O1" |
Code: |
GENTOO_MIRRORS="ftp://linux.ntcu.net/dists/gentoo/ http://www.zentek-international.com/mirrors/gentoo/ http://gentoo.ccccom.com http://mirror.tucdemonic.org/gentoo/ http://gentoo.math.bme.hu http://gentoo.inode.at/ http://gentoo.mirrors.pair.com/" |
Code: |
SYNC="rsync://rsync.asia.gentoo.org/gentoo-portage" |
Code: |
# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf |
Code: |
# chroot /mnt/gentoo /bin/bash # env-update && source /etc/profile |
Code: |
# emerge sync |
Code: |
# unlink /etc/make.profile # ln -sf /usr/portage/profiles/default-linux/x86/2004.2/gcc34 /etc/make.profile |
Code: |
# emerge --oneshot --nodeps gcc-config |
Code: |
/usr/bin/gcc-config: profile does not exist or invalid setting for /etc/env.d/gcc/i686-pc-linux-gnu-3.4.3 |
Code: |
* Checking gcc for __thread support ...no . Could not find a gcc that supports the __thread directive! - Please update to gcc-3.2.2-r1 or later, and try again !!! ERROR: sys-libs/glibc-2.3.4.20041102 failed! !!! Function check_nptl_support, Line 178 Exitcode 0 !!! No __thread support in gcc! |
Code: |
# gcc gcc-config error: Could not run/locate "gcc" |
Code: |
# cd /usr/portage # scripts/bootstrap.sh |
Code: |
# emerge --oneshot "=automake-1.5" # emerge --oneshot "=automake-1.4_p6" # emerge --oneshot "=automake-1.8.5-r2" # emerge --oneshot "=automake-1.6.3" # emerge --oneshot "=automake-1.7.9" |
Code: |
# emerge system # env-update && source /etc/profile |
Code: |
# ln -sf /usr/share/zoneinfo/Asia/Chongqing /etc/localtime # date |
Code: |
# hwclock --show |
Code: |
# hwclock --hctosys |
Code: |
# nano -w /etc/conf.d/clock (将 CLOCK="UTC" 改成 CLOCK="local") |
Code: |
# date 120610092004 # hwclock --systohc |
Code: |
PORTDIR_OVERLAY=/usr/local/portage |
Code: |
# mkdir -p /usr/local/portage/sys-kernel/morph-sources/ |
Code: |
# ebuild /usr/local/portage/sys-kernel/morph-sources/morph-sources-[版本号].ebuild digest |
Code: |
emerge morph-sources |
Code: |
# cd /usr/src ## 创建指向当前内核源码目录 (以我装的 morph-sources 版本为例) 的 linux 符号链接 (安装显卡驱动时需要用到内核源码) # ln -s linux-2.6.10-morph15 linux # cd linux # make menuconfig # make && make modules_install ## 如果之前未曾挂载 /boot 分区, 那么就 # mount /dev/hda1 /boot ## 把编译好的内核与 System.map 拷到 /boot 分区里 (建议使用版本号, 避免误覆盖!) # cp -i arch/i386/boot/bzImage /boot/kernel-2.6.10 (你喜欢叫它啥名字都可以, 到时在 grub.conf 中配置好就行) # cp -i System.map /boot/System.map-2.6.10 |
Code: |
# emerge udev # emerge hotplug && rc-update add hotplug default ## coldplug 原来是 hotplug 的一部分, 现在独立出来, 负责自动加载非热插拔硬件 (如显卡/声卡/网卡/USB 口/串口...) 的内核模块 # emerge coldplug && rc-update add coldplug default ## 安装 alsa 声卡驱动的工具 # emerge alsa-utils ## 编辑 alsa 配置以让内核加载针对你的网卡的驱动 # nano -w /etc/modules.d/alsa ## 更新刚才的配置到系统里 # modules-update ## 将 alsasound 服务添加到 boot 运行级别 (alsasound 服务负责关机时保存系统的声音设置, 开机时读取声音设置) # rc-update add alsasound boot ## 装显卡驱动 # emerge nvidia-kernel |
Code: |
/dev/hda1 /boot ext2 noauto,noatime 1 1 /dev/hda3 / reiser4 noatime 0 1 /dev/hda5 none swap sw 0 0 /dev/hda6 /home reiser4 noatime 0 2 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 |
Code: |
## 编辑主机名 # nano -w /etc/conf.d/hostname (设置 HOSTNAME 变量, 例如我的 gentux) ## 编辑域名 (domain name) # nano -w /etc/conf.d/domainname (设置 DNSDOMAIN 变量, 例如我的 nkbit.com - 瞎叫的, 这域名不存在哦) |
Code: |
# nano -w /etc/hosts |
Code: |
127.0.0.1 gentux.nkbit.com gentux localhost |
Code: |
127.0.0.1 localhost 127.0.0.1 gentux.nkbit.com gentux |
Code: |
# emerge grub # grub # nano -w /boot/grub/grub.conf |
Code: |
## 系统日志记录器 # emerge syslog-ng && rc-update add syslog-ng default ## Cron 守护进程, 定时执行任务必须. 比如定时 updatedb 以方便 locate 命令寻找文件 # emerge vixie-cron && rc-update add vixie-cron default ## 文件系统工具 # emerge reiser4progs ## 可选: 网络工具 - 如果你象我一样 adsl 上网的话 ## 前两步: -X, -gtk 一来避免为了这俩小工具把 X 装进来 (太耗时), 二来确实不需要这些支持 # echo "net-dialup/rp-pppoe -X" >> /etc/portage/package.use # echo "net-dialup/ppp -gtk" >> /etc/portage/package.use # emerge rp-pppoe && adsl-setup |
Code: |
# passwd # useradd eric -m -G users,wheel,portage,audio,games -s /bin/bash # passwd eric |
Code: |
# emerge splashutils # mount /boot (如果原来没挂载的话) # splash_geninitramfs -v -g /boot/fbsplash-emergence-1024x768 -r 1024x768 emergence # nano -w /boot/grub/grub.conf |
Code: |
default 0 timeout 30 splashimage=(hd0,0)/grub/splash.xpm.gz title=Gentoo Linux 2004.3 (2.6.10-morph15-r1) root (hd0,0) kernel /2.6.10-morph15-r1 root=/dev/hda3 video=vesafb:ywrap,mtrr,1024x768-32@85 splash=silent,theme:emergence initrd (hd0,0)/fbsplash-emergence-1024x768 |
Code: |
# exit (退回 LiveCD 提供的环境 - 记得我们之前 chroot 进到了自己的环境不?) # cd / # umount /mnt/gentoo/proc /mnt/gentoo/boot /mnt/gentoo/home /mnt/gentoo # reboot |
Code: |
eric@gentux ~ $ emerge -pv xorg-x11 These are the packages that I would merge, in order: Calculating dependencies ...done! [ebuild R ] x11-base/xorg-x11-6.8.2 -3dfx +3dnow -bitmap-fonts +cjk -debug -dlloader -dmx -doc -font-server -hardened -insecure-drivers -ipv6 -minimal +mmx +nls +opengl +pam -sdk -sse -static +truetype-fonts -type1-fonts (-uclibc) -xprint +xv 0 kB Total size of downloads: 0 kB |
Code: |
# emerge xorg-x11 |
Code: |
# emerge nvidia-glx |
Code: |
# xorgcfg |
Code: |
# startx |
Quote: |
if i never try anything, i never learn anything.. if i never take a risk, i stay where i am.. |