您的位置:首页 > 职场人生

Gentoo_install_on_VMware~

2009-06-02 21:28 274 查看
20090214_by&Frost
参考:http://www.gentoo.org/doc/zh_cn/handbook/handbook-x86.xml
情人节—还是陪我宝贝电脑过,很无聊的发现尝试在VMware上安装GenToo时,总是报乱78糟的错误、、、烦!、、、发现有时候自己真的废话好多、、、却在该说的时候总不说出口。悲ing~~~
朋友总是建议写点blog、、、觉得更是无聊+无聊。。。。。。。
以上纯属本人牢骚
首先down下liveCD ISO镜像
VMware VM􀃆CD-ROM􀃆Use ISO image
启动VMware F2选择BOIS 光盘启动
进入系统 配置root密码,启用sshd # 为了方便从宿主机连接
配置网络 ifconfig eth0 。。。。(略)# 需要连接公网
创建分区 (略)# 见官方
/dev/sda1 /boot ext3 defaults,noatime 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext3 noatime 0 1
!!!注意,kernel-2.6.27似乎把ext2 忽略了,所以建议 /boot 分区选用ext3,很奇怪的是居然最后也能启动系统,却在启动进度能看到无法识别的文件系统,不爽、、、
安装GenToo 官方文件
确认系统日期正确
# cd /mnt/gentoo
下载 Stage3 文件
# links http://www.gentoo.org/main/en/mirrors.xml
解开stage
# tar xjfp stage3-*.tar.bz2
安装 portage 快照
# links http://www.gentoo.org/main/en/mirrors.xml
# tar xfj portage-latest.tar.bz2 –C /mnt/gentoo/usr
设置 /etc/make.conf # 没觉得有多大用,默认&&跳过
选择镜像站点,需要从上面同步东东的,所以选择近点的服务器
GENTOO_MIRRORS变量
# mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
RSYNC 镜像站点
# mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf
cp DNS 信息 cp /etc/resolv.conf /mnt/gentoo/etc
挂载/proc和/dev文件系统,进入新系统 # 官方原话
将/proc文件系统挂载到/mnt/gentoo/proc,这样chroot后的环境里安装时也可以获取内核提供的相关信息,然后以bind方式挂载/dev文件系统。
代码 1.4: 挂载/proc和/dev
# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev
代码 1.5: chroot到新环境里
# chroot /mnt/gentoo /bin/bash
# env-update
>> Regenerating /etc/ld.so.cache...
# source /etc/profile
# export PS1="(ch) $PS1"
更新Protage树 # 没耐心等,跳过
# emerge –sync
选择正确的Profile # 继续跳过
配置USER 变量
# nano –w /etc/make.conf
USE="-gtk -gnome qt3 qt4 kde dvd alsa cdr"
制定 locale 设置 UTF 支持
# nano –w /etc/locale.gen
en_US ISO-8859-1
en_US.UTF-8 UTF-8
设置时区信息
# cp /usr/share/zoneinfo/GMT /etc/localtime
安装源码
# emerge gentoo-sources
配置内核!! (关键)
# cd /usr/src/linux
# make menuconfig
选择正确的处理器类别
Processor type and features --->
(Change according to your system)
(Athlon/Duron/K7) Processor family
选择需要的文件系统
File systems --->
Pseudo Filesystems --->
[*] /proc file system support
[*] Virtual memory file system support (former shmfs)
!!! ext3 reiserfs 什么的自己选了
启用SMP支持
Processor type and features --->
[*] Symmetric multi-processing support
注意: 在多核心系统中,处理器的数目相当于核心的数目。
启用USB接口的输入设备支持
Device Drivers --->
[*] HID Devices--->
<*> USB Human Interface Device (full HID) support
Loadable module support --->
[*] Enable loadable module support
[*] Module unloading
[*] Automatic kernel module loading
Bus options (PCI etc.) --->
[*] PCI Support
[*] ISA Support
Device Drivers --->
Fusion MPT device support --->
<*> Fusion MPT (base + ScsiHost) drivers
OR
<*> Fusion MPT ScsiHost drivers for SPI [kernel 2.6.13]
Device Drivers --->
SCSI device support --->
<*> SCSI device support
<*> SCSI disk support
SCSI low-level drivers --->
<*> SYM53C8XX Version 2 SCSI support
Device Drivers --->
SCSI device support --->
<*> SCSI device support
<*> SCSI disk support
SCSI low-level drivers --->
<*> BusLogic SCSI support
Device Drivers --->
ATA/ATAPI/MFM/RLL support --->
<*> Enhanced IDE/MFM/RLL disk/cdrom/tape/floppy support
<*> Include IDE/ATAPI CDROM support
[*] PCI IDE chipset support
[*] Generic PCI bus-master DMA support
<*> Intel PIIXn chipsets support
File systems --->
CD-ROM/DVD Filesystems --->
<*> ISO 9660 CDROM file system support
[*] Microsoft Joliet CDROM extensions
Networking --->
[*] Networking support
Networking options --->
<*> Packet socket
<*> Unix domain sockets
[*] TCP/IP networking
Device Drivers --->
Network Device support --->
[*] Network device support
Ethernet (1000Mbit) --->
[*] Intel(R) PRO/1000 Gigabit Ethernet support
Device Drivers --->
Network Device support --->
[*] Network device support
Ethernet (10 or 100Mbit) --->
[*] Ethernet (10 or 100Mbit)
[*] EISA, VLB, PCI and on board controllers
<*> AMD PCnet32 PCI support
File Systems --->
Pseudo filesystems --->
<*> /proc file system support
< > /proc/kcore support
<*> Sysctl support (/proc/sys)
<*> sysfs file system support
<*> Virtual memory file system support (former shm fs)
其它的东东爱选啥选啥。。。喜欢就噢噢了
编译内核
# make && make modules_install && make install
!!!
# cp arch/i386/boot/bzImage /boot/kernel-*gentoo-*
查看所有可用的模块
# find /lib/modules/<kernel version>/ -type f -iname '*.o' -or -iname '*.ko'
例如,要自动加载12w9m.ko模块,编辑kernel-2.6文件然后写入模块的名字。
# nano -w /etc/modules.autoload.d/kernel-2.6
12w9m
配置文件系统
# nano –w /etc/fstab # nano 很恶心!!!
/dev/sda1 /boot ext3 defaults,noatime 1 2
/dev/sda2 none swap sw 0 0
/dev/sda3 / ext3 noatime 0 1
Cron syslog dhcp。。。没那闲情弄 ~_~ 还是跳过
基本可用的系统差不多了,先让系统起来再说。免得前面的活白干了。最恨浪费时间的东西!!
配置引导程序
选用GRUB # 习惯,很难改、、、不喜欢LILO
# emerge grub
# nano –w /boot/grub/grub.conf
default 0
timeout 7
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Gentoo Linux 2.6.27-r8
root (hd0,0)
kernel /boot/kernel-2.6.27-gentoo-r8 root=/dev/sda3
initrd /boot/vmlinux
创建/etc/mtab
# grep –v rootfs /proc/mounts > /etc/mtab # 官网学的,这招喜欢
安装grub
# grub –no-flopy
grub> root (hd0,0) (指定您的/boot目录所在分区)
grub> setup (hd0) (将GRUB安装到硬盘主引导记录)
grub> quit (退出GRUB shell)
重启系统
# exit 退出老早前的 chroot
exit 之前记得 passwd 下、、、我最初就没做这步,郁闷的发现系统都起来了。可是user:root之后、password:???那个⊙﹏⊙b
汗那。。。。。。
# umount /mnt/gentoo/boot
# umount /mnt/gentoo/dev
# umount /mnt/gentoo/proc
# umount /mnt/gentoo
可以reboot了
如果gentoo 起来、可以暗爽下 慢慢配置些 cron syslog dhcp 什么的了。
照这样配置若还有问题、、、报kernel panic 什么的鬼东西、、、怪下自己RP了。。。

附件:http://down.51cto.com/data/2352811
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  职场 vmware 休闲 gentoo