前期准备:
1、rhel-server-5.8-x86_64.iso镜像文件(根据需要,也有用最新的rhel5.10的)
2、老毛桃U盘工具V2014超级装机版
3、kickstart文件 ks.cfg(根据自己所需要制作的kickstart文件)
4、16g U盘一个
步骤:
1、插入u盘
2、打开老毛桃,如下所示
3、选择磁盘驱动器为u盘,执行格式化,然后写入
4、u盘制作完毕后,考入ks.cfg文件拷到U盘下面
5、在u盘里创建iso文件夹,把rhel-server-5.8-x86_64.iso 拷贝到iso文件夹下面
6、记得修改ks.cfg文件中,安装媒介为u盘中的iso镜像文件 如下yellow色部分为修改部分:(原来的ks.cfg文件可能是cdrom,改成harddrive --partition=/dev/sda4 --dir=/iso/)
附录:某ks.cfg文件 1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
| # Kickstart fileautomatically generated by anaconda.
#Install OSinstead of upgrade
install
#Usehard drive installation media
harddrive--partition=/dev/sda4 --dir=/iso/
#Skip redhatinstallation key
key --skip
#System language
lang en_US.UTF-8
#System keyboard
keyboard us
#Sytem timezone
timezoneAsia/Shanghai
xconfig --startxonboot
network --deviceeth0 --onboot no --bootproto dhcp
network --deviceeth1 --onboot no --bootproto dhcp
#Root password
rootpw--iscrypted $1$Sr67m5kn$FDh6nSLdFNnQIxnLqmmNa0
#Reboot afterinstallation
#reboot
firewall--disabled
authconfig --enableshadow--enablemd5
selinux--disabled
bootloader--location=mbr --driveorder=cciss/c0d0 --append="rhgb quiet"
# The followingis the partition information you requested
# Note that anypartitions you deleted are not expressed
# here so unlessyou clear all partitions first, this is
# not guaranteedto work
clearpart --all--drives=cciss/c0d0
part /boot--fstype ext3 --size=100 --ondisk=cciss/c0d0
part pv.100000--size=100 --grow --ondisk=cciss/c0d0
volgroup vg00--pesize=32768 pv.100000
logvol swap--fstype swap --name=lv_swap --vgname=vg00 --size=32768
logvol /--fstype ext3 --name=lvol0 --vgname=vg00 --size=51200
logvol /var--fstype ext3 --name=lvol1 --vgname=vg00 --size=10240
logvol /usr--fstype ext3 --name=lvol2 --vgname=vg00 --size=5120
logvol /tmp--fstype ext3 --name=lvol3 --vgname=vg00 --size=5120
%packages
@admin-tools
@base
@chinese-support
@core
@development-libs
@development-tools
@editors
@gnome-desktop
@graphical-internet
@legacy-software-development
@system-tools
@text-internet
@base-x
kexec-tools
iscsi-initiator-utils
fipscheck
device-mapper-multipath
sgpio
python-dmidecode
imake
emacs
audit
xorg-x11-utils
xorg-x11-server-Xnest
xorg-x11-server-Xvfb
-nspluginwrapper
%post
# Changerunlevel configuration of services.
chkconfig anacronoff
chkconfigarptables_jf off
chkconfig atdoff
chkconfig autofsoff
chkconfig cupsoff
chkconfigcups-config-daemon off
chkconfigfirstboot off
chkconfighaldaemon off
chkconfig isdnoff
chkconfig kudzuoff
chkconfig netfsoff
chkconfignfslock off
chkconfig pcmciaoff
chkconfigportmap off
chkconfigrpcgssd off
chkconfigrpcidmapd off
chkconfigsendmail off
chkconfig smartdoff
chkconfig snmpdoff
chkconfigavahi-daemon off
#delete unuseduser
userdel adm
userdel lp
userdel sync
userdel shutdown
userdel halt
userdel news
userdel uucp
userdel operator
userdel gopher
|
7、在HP Gen8服务器上插上u盘 开机自检后先按F8,做raid1+0(根据自己需要,raid1,raid1+0,raid5) 做完raid退出后,按F11,再按3,选择从u盘启动
8、在安装界面出来后输入linux ks=hd:sda4:/ks.cfg 回车 如下图 (如果某些机器没做raid,而且就一块硬盘,那么机器的硬盘是sda,那么u盘就是sdb,通常是sdb4)
然后就坐等安装了
技术扩展:
linux下如何用dd命令制作rhel的u盘安装盘。
自带笔记本:硬盘为sda, 第一个插入的u盘为sdb,一般是sdb4,第二个sdc。。。以此类推
(xxx/xxx/为iso镜像所在的路径)
1
| dd if=xxx/xxx/rhel-server-5.8—x86_64.iso of=/dev/sdb
|
写入需要等一会,写完了后;
1
2
3
4
5
6
7
8
9
10
11
| mount /dev/sdb4 /mnt
#挂载u盘到/mnt下
mkdir /mnt/iso
#在u盘下创建iso目录
cp xxx/xxx/rhel-server-5.8-x86_64.iso /mnt/iso
#拷贝iso镜像到u盘的iso目录下
cp yyy/yyy/ks.cfg /mnt
#拷贝kickstart文件到u盘下
|
ok制作完毕然后可以用u盘来安装系统了
|