Gentoo 安装

手册地址 http://www.gentoo.org/doc/zh_cn/handbook/handbook-x86.xml

/etc/init.d/sshd start

ifconfig eth0 ${IP地址} broadcast ${广播} netmask ${子网掩码} up
route add default gw ${网关}

vi /etc/resolv.conf

nameserver ${域名服务器1}
nameserver ${域名服务器2}

fdisk /dev/sda

mke2fs /dev/sda1
 mke2fs -j /dev/sda3
mkswap是初始化交换分区的命令

mkswap /dev/sda2
使用swapon命令来激活交换分区:

swapon /dev/sda2

# mount /dev/sda3 /mnt/gentoo
# mkdir /mnt/gentoo/boot
# mount /dev/sda1 /mnt/gentoo/boot

cd /mnt/gentoo
 tar xvjpf stage3-*.tar.bz2
# tar xvjf /mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr

# cp -L /etc/resolv.conf /mnt/gentoo/etc/

 

# mount -t proc none /mnt/gentoo/proc
# mount -o bind /dev /mnt/gentoo/dev

# chroot /mnt/gentoo /bin/bash
# env-update
>> Regenerating /etc/ld.so.cache...
# source /etc/profile
# export PS1="(chroot) $PS1"

emerge gentoo-sources

# cd /usr/src/linux
# make menuconfig


make && make modules_install  会编译模块  (  make bzimage)
cp arch/i386/boot/bzImage /boot/kernel-2.6.24-gentoo-r5

vi /etc/fstab
vi /etc/conf.d/hostname

vi /etc/conf.d/net

config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )
routes_eth0=( "default via 192.168.0.1" )
rc-update add net.eth0 default

passwd

emerge grub
vi /boot/grub/grub.conf

grep -v rootfs /proc/mounts > /etc/mtab
grub-install --no-floppy /dev/sda

reboot


小问题:

grub 配置

关闭 dma   libata.dma=0    

起bash   init =/sbin/bash

只读挂载改读写挂载   mount -o remount,rw /

                                                                (/dev/sda3 /)

menuconfig中 *编入bzimage  M 模块

make modules  ,  make modules_install

你可能感兴趣的:(Gentoo 安装)