IPB

Welcome Guest ( Log In | Register )

> Gentoo Linux 的 LiveCD 复制安装及基本配置, 2008.0-r1
猫猫草
post 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 光盘映像文件的种子文件
Attached File  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设置密码,系统安装完毕!
Go to the top of the page
 
+Quote Post

Posts in this topic


Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



Lo-Fi Version Time is now: 2024-12-26 03:22