日期:2014-05-16  浏览次数:20637 次

有关linux安装脚本kickstart的编写
我之前制作的linux自动安装iso已经成功了,现在想对其进行一些定制修改,比如,更改grub图片等。

我在ks.cfg的%post段里面是这样写的:
%post --nochroot

# Move the contents of the tar into their new locations

cp -fRp /config/boot/grub/splash.xpm.gz /mnt/sysimage/boot/grub/ 
cp -fRp /config/etc/rc.d/init.d/network /mnt/sysimage/etc/rc.d/init.d/
cp -fRp /config/etc/issue /mnt/sysimage/etc/
cp -fRp /config/etc/issue.net /mnt/sysimage/etc/
cp -fRp /config/etc/motd /mnt/sysimage/etc/
cp -fRp /config/etc/redhat-release /mnt/sysimage/etc/
cp -fRp /config/etc/resolv.conf /mnt/sysimage/etc/


%post

/sbin/chkconfig --level 345 httpd on
/sbin/chkconfig --level 345 mysqld on
/sbin/chkconfig --level 345 bluetooth off
/sbin/chkconfig --level 345 sendmail off
/sbin/chkconfig --level 345 finger off
/sbin/chkconfig --level 345 lpd off

而我iso里面的config目录的tree是这样的:
.
|-- boot
| `-- grub
| `-- splash.xpm.gz
`-- etc
  |-- issue
  |-- issue.net
  |-- motd
  |-- rc.d
  | `-- init.d
  | `-- network
  |-- redhat-release
  `-- resolv.conf

照说应该没有问题,可是我这些文件怎么都不能复制到新安装好的系统中去,请大大们指点指点! 
 

------解决方案--------------------
看Kickstart Log, 有条件的话, 在安装过程中通过console, 按Alt+F2/F3/F4切换到其它Console去实时看输出.