Chinaunix首页 | 论坛 | 博客
  • 博客访问: 564518
  • 博文数量: 67
  • 博客积分: 2792
  • 博客等级: 少校
  • 技术积分: 1038
  • 用 户 组: 普通用户
  • 注册时间: 2010-03-13 19:00
文章分类

全部博文(67)

文章存档

2014年(2)

2013年(7)

2012年(1)

2011年(1)

2010年(56)

分类: 系统运维

2013-06-09 14:11:25

一、下载镜像:
下载地址:
使用UltraISO工具制作U盘启动:启动——写入硬盘映像——写入
二、安装:
1.U盘引导后,直接回车启动图形界面
2.alt+ctrl+f1切换到字符界面,使用net-setup eth0来配置网络,
3.配置密码passwd
4./etc/init.d/sshd start
5.使用putty或CRT远程工具登录到系统里
6.分区:
fidsk /dev/sda
第一分区100M,第二分区是自己机器内存的一倍,第三分区自定义
t 2 82 a 1 w
7.格式化:
mkfs.ext3 /dev/sda1
mkswap /dev/sda2
mkfs.ext4 /dev/sda3
8.挂载:
mount /dev/sda3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sda1 /mnt/gentoo/boot
9.拷贝系统:
cp -apvf /mnt/static/* /mnt/gentoo/
10.切换系统:

chroot /mnt/gentoo /bin/bash

env-update && source /etc/profile

11.修改root密码:

passwd

New password: ******

Retype new password: ******

passwd: password updated successfully

12.安装grub到mbr

grub

root (hd0,0)

setup (hd0)

quit
13.清空/etc/conf.d/local.start

cat /dev/null > /etc/conf.d/local.start

14.修改 /etc/fstab

/dev/sda1     /boot   ext3    defaults 1 2

/dev/sda2     none   swap   sw    0 0

/dev/sda3     /         ext4    defaults 0 1

15.复制kernel到/boot分区:

cp /usr/src/linux/System.map /boot/System.map-genkernel-x86_64-3.3.0-gentoo-r1

cp /usr/src/linux/arch/i386/boot/bzImage /boot/kernel-genkernel-x86_64-3.3.0-gentoo-r1

genkernel ramdisk

16.修改grub.conf

编辑 /boot/grub/grub.conf 內容如下

default 0
timeout 10
splashimage=(hd0,0)/boot/grub/splash.xpm.gz


title Gentoo Linux 3.3.0-gentoo-r1
root (hd0,0)
kernel /boot/kernel-genkernel-x86_64-3.3.0-gentoo-r1 root=/dev/ram0 real_root=/dev/sda3
initrd /boot/initramfs-genkernel-x86_64-3.3.0-gentoo-r1

 三、修改系统配置:
1.网卡:

vi /etc/conf.d/net

config_eth0=( "192.168.0.188 netmask 255.255.255.0 brd 192.168.0.255")

routes_eth0=( "default via 192.168.0.1")
2.主机名:
vi /etc/conf.d/hostname
# Set to the hostname of this machine
hostname="Gentoo-graphic"
3.DNS:
vi /etc/resolv.conf
nameserver 202.106.0.20
4.禁止系统启动时自动修改root密码:
注释:高级用户: LiveCD 启动后,出于安全原因,root的登录密码是随机设定的,如果你要使用sshd来进行远程登录LiveCD,你必须键入passwd,根据提示来重新设定 Live CD root 登录密码,否则你将无法通过网络远程登录 LiveCD

vim  /etc/init.d/autoconfig  找到以下内容,注释掉就OK
##svcs="${svcs} $(check_svc ${PASSWD} pwgen)"
----------------------------------------------------------------
                       ##passwd=*)
                       ##      PASSWD="no"
                       ##      PASSWORD="${x#*=}"
                       ##;;
-----------------------------------------------------------------
               ##if ! yesno "${PASSWD}"
               ##then
               ##      echo "root:${PASSWORD}" | chpasswd  > /dev/null 2>&1
               ##fi
               ##if yesno "${SSHD}"
               ##then
                       # If we have passwd= on the command line, we do not run pwgen and we
                       # set the root password to PASSWORD.
                       ##if yesno "${PASSWD}"
                       ##then
                       ##      ewarn "WARNING: You are starting sshd with a scrambled root password!!!"
                       ##      ewarn "WARNING: You need to set a root password to be able to login remotely."
                       ##fi
               ##fi
---------------------------------------------------------------------
四、退出系统,重启






















阅读(4841) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~