试用场景: 已有linux系统版本较老,或者新接手的需要重装系统。。。
1. 提取iso文件里的 initrd.img 和 vmlinuz 两个文件,可以用 UltraISO
以 Oracle Linux Release 6 U Boot iso image for x86 (32 bit).iso 为例,这两个文件放在isolinux下
提取出来以后上传到linux机器的 /boot 下
2. 修改 /boot/grub/grub.conf
最初的grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Oracle Linux Server Unbreakable Enterprise Kernel (2.6.39-400.17.1.el6uek.i686)
root (hd0,0)
kernel /vmlinuz-2.6.39-400.17.1.el6uek.i686 ro root=UUID=6ccf7717-fed5-4da0-849a-64fdedf8b314 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16
KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.39-400.17.1.el6uek.i686.img
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-358.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-358.el6.i686 ro root=UUID=6ccf7717-fed5-4da0-849a-64fdedf8b314 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkerne
l=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-358.el6.i686.img
在第一个title的上方添加:
title Kickstart
root (hd0,0)
kernel /vmlinuz
append ks ksdevice=eth0 ks=ftp://10.101.0.17/pub/kik/my.cfg initrd=initrd.img text
或者
title Kickstart
root (hd0,0)
kernel /vmlinuz ks=ftp://10.101.0.17/pub/kik/my.cfg ksdevice=eth0 text
initrd /initrd.img
修改后的 grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/sda3
# initrd /initrd-[generic-]version.img
#boot=/dev/sda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Kickstart
root (hd0,0)
kernel /vmlinuz ks=ftp://10.101.0.17/pub/kik/my.cfg ksdevice=eth0 text
initrd /initrd.img
title Oracle Linux Server Unbreakable Enterprise Kernel (2.6.39-400.17.1.el6uek.i686)
root (hd0,0)
kernel /vmlinuz-2.6.39-400.17.1.el6uek.i686 ro root=UUID=6ccf7717-fed5-4da0-849a-64fdedf8b314 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16
KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.39-400.17.1.el6uek.i686.img
title Oracle Linux Server Red Hat Compatible Kernel (2.6.32-358.el6.i686)
root (hd0,0)
kernel /vmlinuz-2.6.32-358.el6.i686 ro root=UUID=6ccf7717-fed5-4da0-849a-64fdedf8b314 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkerne
l=auto KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd /initramfs-2.6.32-358.el6.i686.img
确定无误后重启机器。然后泡杯茶,
顺利的话十来分钟以后系统就装好了。
阅读(1493) | 评论(0) | 转发(0) |