Gentoo Linux 的 LiveCD 复制安装及基本配置, 2008.0-r1 |
Gentoo Linux 的 LiveCD 复制安装及基本配置, 2008.0-r1 |
2008-09-09 09:20:22, Tue
Post
#1
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
用 LiveCD 启动
附件中是 Gentoo Linux 2008.0-r1 的 LiveCD for i686 光盘映像文件的种子文件 livecd_i686_installer_2008.0_r1.rar ( 60.47k ) Number of downloads: 291 分区及格式化 将各分区按照预定计划 mount 到 /mnt/gentoo/ 下( /mnt/gentoo/ 视为新系统根目录) 然后 代码 # cp -af /mnt/livecd/* /mnt/gentoo/ 代码 # cp -af /boot/* /mnt/gentoo/boot/ 代码 # mkdir -p /mnt/gentoo/usr/local/portage 代码 # cd /mnt/gentoo/boot # ln -s kernel-genkernel-x86-2.6.15-gentoo-r5 vmlinuz # ln -s System.map-genkernel-x86-2.6.15-gentoo-r5 System.map # ln -s initramfs-genkernel-x86-2.6.15-gentoo-r5 initrd.img # cd /mnt/gentoo/etc # rm localtime # ln -s ../usr/share/zoneinfo/PRC localtime # rm /mnt/gentoo/etc/runlevels/default/pwgen 其中最后一步是防止系统每次启动后自动修改root密码,造成无法登录的状况。 修改/mnt/gentoo/etc/make.conf,以IBM T30笔记本为例 代码 CFLAGS="-Os -march=pentium4m -pipe -msse2 -mfpmath=sse" CXXFLAGS="${CFLAGS}" CHOST="i686-pc-linux-gnu" PORTDIR_OVERLAY="/usr/local/portage" 根据分区情况修改/mnt/gentoo/etc/fstab,示例如下 代码 /dev/sda5 / reiserfs noatime /dev/sda1 /boot reiserfs noatime,noauto,nosuid /dev/sda6 /usr reiserfs noatime /dev/sda7 none swap sw 0 0 /dev/sda8 /var reiserfs noatime /dev/sda9 /opt reiserfs noatime /dev/sda10 /home reiserfs noatime,nosuid 修改/mnt/gentoo/etc/conf.d/clock 代码 CLOCK="local" 修改/mnt/gentoo/etc/conf.d/hostname,示例 代码 HOSTNAME="slove" 修改/mnt/gentoo/boot/grub/grub.conf,示例 代码 timeout 5 default 0 title=Gentoo Linux 2008.0 root (hd0,0) kernel /vmlinuz root=/dev/ram0 real_root=/dev/sda5 ramdisk_size=8192 vga=791 initrd /initrd.img title=Gentoo Linux 2008.0 Without X root (hd0,0) kernel /vmlinuz root=/dev/ram0 real_root=/dev/sda5 ramdisk_size=8192 nox initrd /initrd.img 将grub安装到MBR,示例 代码 # grub-install -root-directory=/mnt/gentoo -no-floppy /dev/sda 修改/mnt/gentoo/etc/shadow,将root后面两个“:”之间的"*"或"X"去掉,然后reboot。 重启后用root登录,用passwd设置密码,系统安装完毕! |
|
|
2008-09-09 19:36:13, Tue
Post
#2
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
选择最快镜像站点
在联网状态下(注:以后的操作内容,如无特别声明,均需在联网状态下进行) 代码 # mirrorselect -D -s 5 -b 10 会自动选择最快的5个镜像站点,并自动存入/etc/make.conf,在未来运行emerge时,会有明显的效率提升 |
|
|
2008-09-09 20:07:30, Tue
Post
#3
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
安装 lzma 工具
代码 # emerge lzma-utils 否则许多包会因无法解压而在安装时报错 |
|
|
2008-09-10 16:11:41, Wed
Post
#4
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
安装 Pyrex
(a language for writing Python extension modules) 代码 # emerge pyrex 否则一些包会无法生成自动安装脚本而失败 |
|
|
2008-09-10 16:14:10, Wed
Post
#5
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
安装 Xfce 桌面环境下的屏幕保护程序和密码锁定器
代码 # emerge xscreensaver # emerge xlockmore |
|
|
2008-09-10 16:14:27, Wed
Post
#6
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
更新 newt 包
代码 # emerge newt 否则 portimage 包无法正常更新(应该是BUG) |
|
|
2008-09-10 16:15:01, Wed
Post
#7
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
占位留待更新
|
|
|
2008-09-10 16:15:17, Wed
Post
#8
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
安装 crossdev
多种交叉编译环境的准全自动构建器 代码 # emerge crossdev
|
|
|
2008-09-10 16:16:44, Wed
Post
#9
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
安装gentoolkit包
代码 # emerge gentoolkit 否则无法在系统更新后进行完全清理 |
|
|
2008-09-10 16:18:56, Wed
Post
#10
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
全面更新系统
代码 # emerge --sync 代码 # emerge --update --deep --newuse world # emerge --depclean # revdep-rebuild 根据机器性能,这需要花费数小时到一两天的时间,期间如计算机关闭或网络连接中断,则可能需要手工清理 /var/tmp 目录内容 此后的更新中,不应再使用 --newuse ,否则自行添加的软件包将被卸载 |
|
|
2008-09-10 16:19:28, Wed
Post
#11
|
|
猫猫猫 Group: Power Cat Posts: 626 Joined: 2006-12-8 Member No.: 2 |
清理不再使用的包
代码 # emerge --depclean # revdep-rebuild |
|
|
Lo-Fi Version | Time is now: 2024-12-26 03:39 |