教你通过网络安装Centos系统


当前第2页 返回上一页

1、修改default,增加一项ks;如果想在菜单项时间短一些,可以修改timeout时间。

1

2

3

4

5

6

7

8

9

10

label ks

  menu label ^Install system based ks

  menu default

  kernel vmlinuz

  append initrd=initrd.img

text ks=http://172.16.100.67/ks.cfg

label linux

  menu label ^Install or upgrade an existing system

  kernel vmlinuz

  append initrd=initrd.img

2、修改ks.cfg文件,指定从http服务器加载安装程序

1

2

3

4

# Kickstart file automatically generated by anaconda.

#version=DEVELinstall#cdromurl --url=http://172.16.100.67/centos6.6/lang en_US.UTF-8keyboard usnetwork --onboot no --device eth0 --bootproto dhcp --noipv6rootpw  --iscrypted $6$3.bn6KZ9zigMQq.Z$V/Q8xF2asfM8KCWm6GsjhYBvTTmMM6B50i6A/AFFx38xkg1sP2kL.ECBAda4SLwG6itOZhLXG/41sgRCJBLf11firewall --service=sshauthconfig --enableshadow --passalgo=sha512selinux --enforcingtimezone --utc Asia/Shanghaibootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"# The following is the partition information you requested# Note that any partitions you deleted are not expressed# here so unless you clear all partitions first, this is# not guaranteed to workclearpart --all

part /boot --fstype=ext4 --size=200part / --fstype=ext4 --size=7000part swap --size=2000

#repo --name="CentOS"  --baseurl=cdrom:repodata/ --cost=100reboot%packages --nobase@core%end

3、开启dchpd、tftpd、httpd,关闭iptable、selinux,就可以完成自动安装了。

后续:

在安装的时候出现一个问题,提示this device may need to be reinitialized。

解决方法:

在ks文件中增加zeromb就可以了,#号这一行,可有可无,不影响。

1

2

# Clear the Master Boot Record

 zeromb

配置修改为:

1

2

3

4

5

6

7

8

9

10

11

12

url --url=http://172.16.100.67/centos6.6/

lang en_US.UTF-8

keyboard us

network --onboot no --device eth0 --bootproto dhcp --noipv6

rootpw  --iscrypted $6$3.bn6KZ9zigMQq.Z$V/Q8xF2asfM8KCWm6GsjhYBvTTmMM6B50i6A/AFFx38xkg1sP2kL.ECBAda4SLwG6itOZhLXG/41sgRCJBLf11

firewall --service=ssh

authconfig --enableshadow --passalgo=sha512

selinux --enforcing

timezone --utc Asia/Shanghai

bootloader --location=mbr --driveorder=sda --append="crashkernel=auto rhgb quiet"

zerombr

PEX部分内容来自于:https://www.cnblogs.com/sunhongleibibi/archive/2017/11/17/7851382.html

以上就是教你通过网络安装Centos系统的详细内容,更多文章请关注木庄网络博客

返回前面的内容

相关阅读 >>

教你通过网络安装centos系统

更多相关阅读请进入《Centost》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...