我们在安装最新的红帽7.0和Centos 7.0以及Oracle Linux 7.0的时候,一般是使用光盘来安装。当服务器没有光驱的时候,我们往往需要通过dd直写U盘来实现,不太灵活。为了扩充之前的U盘系统安装盘(参考:) ,我特别添加了红帽系列系统的最新版 7.0,这个方法也同样适用于Centos 7.0和Oracle Linux 7.0。下面来看一下制作步骤。
工具准备:
SYSLINUX #最新版是6.03
添加主配置文件:
请参考
以及
在/boot/config/linux.cfg 中添加
label redhat70x64menu label Install Redhat Enterprise Server 7.0 64Bitkernel /boot/syslinux/vesamenu.c32append /boot/linux/rh7064/isolinux.cfg /boot/config/mainmenu.cfg
拷贝文件:
拷贝ISO中的isolinux目录和p_w_picpaths目录内容到U盘相应目录。我这里是/boot/linux/rh7064。
修改/boot/linux/rh7064/isolinux.cfg文件
default linuxtimeout 600display /boot/linux/rh7064/boot.msg# Clear the screen when exiting the menu, instead of leaving the menu displayed.# For vesamenu, this means the graphical background is still displayed without# the menu itself for as long as the screen remains in graphics mode.menu clearmenu background /boot/linux/rh7064/splash.pngmenu title Red Hat Enterprise Linux 7.0menu vshift 8menu rows 18menu margin 8#menu hiddenmenu helpmsgrow 15menu tabmsgrow 13# Border Areamenu color border * #00000000 #00000000 none# Selected itemmenu color sel 0 #ffffffff #00000000 none# Title barmenu color title 0 #ff7ba3d0 #00000000 none# Press [Tab] messagemenu color tabmsg 0 #ff3a6496 #00000000 none# Unselected menu itemmenu color unsel 0 #84b8ffff #00000000 none# Selected hotkeymenu color hotsel 0 #84b8ffff #00000000 none# Unselected hotkeymenu color hotkey 0 #ffffffff #00000000 none# Help textmenu color help 0 #ffffffff #00000000 none# A scrollbar of some type? Not sure.menu color scrollbar 0 #ffffffff #ff355594 none# Timeout msgmenu color timeout 0 #ffffffff #00000000 nonemenu color timeout_msg 0 #ffffffff #00000000 none# Command prompt textmenu color cmdmark 0 #84b8ffff #00000000 nonemenu color cmdline 0 #ffffffff #00000000 none# Do not display the actual menu unless the user presses a key. All that is displayed is a timeout message.menu tabmsg Press Tab for full configuration options on menu items.menu separator # insert an empty linemenu separator # insert an empty linelabel linux menu label ^Install Red Hat Enterprise Linux 7.0 kernel /boot/linux/rh7064/vmlinuz append initrd=/boot/linux/rh7064/initrd.img repo=hd:LABEL=OEMDRV:/boot/linux/rh7064 quiet #改为通过repo指定iso路径label check menu label Test this ^media & install Red Hat Enterprise Linux 7.0# menu default kernel /boot/linux/rh7064/vmlinuz append initrd=/boot/linux/rh7064/initrd.img repo=hd:LABEL=OEMDRV:/boot/linux/rh7064 rd.live.check quiet #改为通过repo指定iso路径menu separator # insert an empty line# utilities submenumenu begin ^Troubleshooting menu title Troubleshootinglabel vesa menu indent count 5 menu label Install Red Hat Enterprise Linux 7.0 in ^basic graphics mode text help Try this option out if you're having trouble installing Red Hat Enterprise Linux 7.0. endtext kernel /boot/linux/rh7064/vmlinuz append initrd=/boot/linux/rh7064/initrd.img repo=hd:LABEL=OEMDRV:/boot/linux/rh7064 xdriver=vesa nomodeset quietlabel rescue menu indent count 5 menu label ^Rescue a Red Hat Enterprise Linux system text help If the system will not boot, this lets you access files and edit config files to try to get it booting again. endtext kernel /boot/linux/rh7064/vmlinuz append initrd=/boot/linux/rh7064/initrd.img repo=hd:LABEL=OEMDRV:/boot/linux/rh7064 rescue quietlabel memtest menu label Run a ^memory test text help If your system is having issues, a problem with your system's memory may be the cause. Use this utility to see if the memory is working correctly. endtext kernel /boot/linux/rh7064/memtestmenu separator # insert an empty linelabel local menu label Boot from ^local drive localboot 0xffffmenu separator # insert an empty linemenu separator # insert an empty linelabel returntomain menu label Return to ^main menu menu exitmenu end
注:参数的具体含义请参考之前的系列文章。
其实,红帽7的ISO和之前的6.x相似,只是经过了一个特殊的处理。添加了
inst.stage2=hd:LABEL=RHEL-7.0\x20Server.x86_64
标签。inst.stage2是指定 install.img 的路径的。如果没有指定的话,Anaconda会从本地、inst.repo或repo或method参数给出的路径来查找。而且新版的7.0已经不推荐使用method参数了,代替method的是repo或inst.repo参数。所以,我们只要用repo或inst.repo来取代inst.stage2就可以了。最后,预祝大家都能够成功。