参考:http://gentoo-wiki.com/HOWTO_Install_Gentoo_on_VMware_4_in_Windows_NT/2K/XP
第一关:虚拟机的网卡
mware有三种模式:
桥接模式:把虚拟机当成一个真正主机,端口全部对外开放。
NAT模式:与host共享网卡上网,如果要ssh必须在vmware 的nat tab中进行端口映射。
host-only模式:与主机完全分离的模式。
最简单最好用的就是nat模式了,如果不把虚拟机当成服务器使用,建议使用NAT模式。
把ssh端口22 映射出来。
第二关:内核配置
配置内核首先要对自己的机器硬件环境非常熟悉,只有配置好了驱动才能正常的使用机子。
可以使用lspci和lsmod,查看检测到的设备以及livecd加载的所有模块。这样才配置内核时可以参考配置。
VMware Tools uses Kernel Loadable Module support to load and unload its driver(s).
Linux Kernel Configuration: kernel loadable module support |
Loadable module support ---> [*] Enable loadable module support [*] Module unloading [*] Automatic kernel module loading |
Linux Kernel Configuration: Intel PCI/ISA Bridge |
Bus options (PCI etc.) ---> [*] PCI Support [*] ISA Support |
Linux Kernel Configuration: LSI Logic SCSI adapter |
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 |
By default, VMware virtual machines provide a BusLogic SCSI controller and a SCSI hard drive. Your new kernel should have these device drivers for them:
Linux Kernel Configuration: BusLogic SCSI |
Device Drivers ---> SCSI device support ---> <*> SCSI device support <*> SCSI disk support SCSI low-level drivers ---> <*> BusLogic SCSI support |
Linux Kernel Configuration: Intel PIIXn chipset and ISO9660 File System |
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 |
You will need to enable the following to get basic packet and TCP/IP support.
Linux Kernel Configuration: Network |
Networking ---> [*] Networking support Networking options ---> <*> Packet socket <*> Unix domain sockets [*] TCP/IP networking |
Linux Kernel Configuration: Network |
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 |
Audio
Linux Kernel Configuration: Sound |
Device Drivers ---> Sound ---> <*> Sound card support Advanced Linux Sound Architecture ---> <*> Advanced Linux Sound Architecture <*> OSS Mixer API <*> OSS PCM (digital audio) API PCI devices ---> <*> (Creative) Ensoniq AudioPCI 1371/1373 |
udev Support
Linux Kernel Configuration: Miscellaneous Things |
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) |
第三关:安装gnome
按照官方文档,安装gnome的时候出现循环依赖。解决办法是:
USE="-qt3 -qt4 -arts -kde X dbus gtk gnome hal avahi" 去掉最后边的avahi。
关于每个use标示的意义可以在/usr/portage/profiles/use.desc中查看。
还有就是use中最好去掉-doc 很容易导致循环依赖。