如何创建一个红帽7.0安装U盘(适用于Centos 7,Oracle Linux 7)
我们在安装最新的红帽7.0和Centos 7.0以及Oracle Linux 7.0的时候,一般是使用光盘来安装。当服务器没有光驱的时候,我们往往需要通过dd直写U盘来实现,不太灵活。为了扩充之前的U盘系统安装盘(参考:如何制作一个通用的多系统安装U盘) ,我特别添加了红帽系列系统的最新版 7.0,这个方法也同样适用于Centos 7.0和Oracle Linux 7.0。下面来看一下制作步骤。
工具准备:
SYSLINUX #最新版是6.03
添加主配置文件:
请参考如何制作一个通用的多系统安装U盘五(制作主配置文件)
以及如何制作一个通用的多系统安装U盘六(Linux相关配置)
在/boot/config/linux.cfg 中添加
labelredhat70x64menulabelInstallRedhatEnterpriseServer7.064Bitkernel/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文件
defaultlinuxtimeout600display/boot/linux/rh7064/boot.msg#Clearthescreenwhenexitingthemenu,insteadofleavingthemenudisplayed.#Forvesamenu,thismeansthegraphicalbackgroundisstilldisplayedwithout#themenuitselfforaslongasthescreenremainsingraphicsmode.menuclearmenubackground/boot/linux/rh7064/splash.pngmenutitleRedHatEnterpriseLinux7.0menuvshift8menurows18menumargin8#menuhiddenmenuhelpmsgrow15menutabmsgrow13#BorderAreamenucolorborder*#00000000#00000000none#Selecteditemmenucolorsel0#ffffffff#00000000none#Titlebarmenucolortitle0#ff7ba3d0#00000000none#Press[Tab]messagemenucolortabmsg0#ff3a6496#00000000none#Unselectedmenuitemmenucolorunsel0#84b8ffff#00000000none#Selectedhotkeymenucolorhotsel0#84b8ffff#00000000none#Unselectedhotkeymenucolorhotkey0#ffffffff#00000000none#Helptextmenucolorhelp0#ffffffff#00000000none#Ascrollbarofsometype?Notsure.menucolorscrollbar0#ffffffff#ff355594none#Timeoutmsgmenucolortimeout0#ffffffff#00000000nonemenucolortimeout_msg0#ffffffff#00000000none#Commandprompttextmenucolorcmdmark0#84b8ffff#00000000nonemenucolorcmdline0#ffffffff#00000000none#Donotdisplaytheactualmenuunlesstheuserpressesakey.Allthatisdisplayedisatimeoutmessage.menutabmsgPressTabforfullconfigurationoptionsonmenuitems.menuseparator#insertanemptylinemenuseparator#insertanemptylinelabellinuxmenulabel^InstallRedHatEnterpriseLinux7.0kernel/boot/linux/rh7064/vmlinuzappendinitrd=/boot/linux/rh7064/initrd.imgrepo=hd:LABEL=OEMDRV:/boot/linux/rh7064quiet#改为通过repo指定iso路径labelcheckmenulabelTestthis^media&installRedHatEnterpriseLinux7.0#menudefaultkernel/boot/linux/rh7064/vmlinuzappendinitrd=/boot/linux/rh7064/initrd.imgrepo=hd:LABEL=OEMDRV:/boot/linux/rh7064rd.live.checkquiet#改为通过repo指定iso路径menuseparator#insertanemptyline#utilitiessubmenumenubegin^TroubleshootingmenutitleTroubleshootinglabelvesamenuindentcount5menulabelInstallRedHatEnterpriseLinux7.0in^basicgraphicsmodetexthelpTrythisoptionoutifyou'rehavingtroubleinstallingRedHatEnterpriseLinux7.0.endtextkernel/boot/linux/rh7064/vmlinuzappendinitrd=/boot/linux/rh7064/initrd.imgrepo=hd:LABEL=OEMDRV:/boot/linux/rh7064xdriver=vesanomodesetquietlabelrescuemenuindentcount5menulabel^RescueaRedHatEnterpriseLinuxsystemtexthelpIfthesystemwillnotboot,thisletsyouaccessfilesandeditconfigfilestotrytogetitbootingagain.endtextkernel/boot/linux/rh7064/vmlinuzappendinitrd=/boot/linux/rh7064/initrd.imgrepo=hd:LABEL=OEMDRV:/boot/linux/rh7064rescuequietlabelmemtestmenulabelRuna^memorytesttexthelpIfyoursystemishavingissues,aproblemwithyoursystem'smemorymaybethecause.Usethisutilitytoseeifthememoryisworkingcorrectly.endtextkernel/boot/linux/rh7064/memtestmenuseparator#insertanemptylinelabellocalmenulabelBootfrom^localdrivelocalboot0xffffmenuseparator#insertanemptylinemenuseparator#insertanemptylinelabelreturntomainmenulabelReturnto^mainmenumenuexitmenuend
注:参数的具体含义请参考之前的系列文章。
其实,红帽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就可以了。最后,预祝大家都能够成功。
声明:本站所有文章资源内容,如无特殊说明或标注,均为采集网络资源。如若本站内容侵犯了原著者的合法权益,可联系本站删除。