2016년 3월 16일 수요일

RedHat kickstart dvd install

준비물 :
1. 운영서버의 /root/anaconda-ks.cfg
2. 설치할 OS의 iso 이미지
3. dvd writer

#1 iso 이미지 마운트

[root@kevdev test]# mount -t iso9660 -o loop /mydata/iso/OS/RHEL/rhel-server-6.4-x86_64-dvd.iso /media


#2 iso 에서 파일 추출

[root@kevdev media]# tar cf - .|(cd /mydata/test/; tar -xf -)
[root@kevdev media]# cd /mydata/test/isolinux


#3 운영서버 anaconda-ks.cfg -> ks.cfg 로 복사
[root@kevdev isolinux]# cp /mydata/temp/anaconda-ks.cfg /mydata/test/isolinux/ks.cfg

[root@kevdev isolinux]# pwd
/mydata/test/isolinux

#4 isolinux.cfg 파일에 label 추가

[root@kevdev isolinux]# vi isolinux.cfg

default vesamenu.c32
#prompt 1
timeout 600

display boot.msg

menu background splash.jpg
menu title Welcome to Red Hat Enterprise Linux 6.4!
menu color border 0 #ffffffff #00000000
menu color sel 7 #ffffffff #ff000000
menu color title 0 #ffffffff #00000000
menu color tabmsg 0 #ffffffff #00000000
menu color unsel 0 #ffffffff #00000000
menu color hotsel 0 #ff000000 #ffffffff
menu color hotkey 7 #ffffffff #ff000000
menu color scrollbar 0 #ffffffff #00000000

#### label 추가 ####
label KickStart
  menu label ^Install from KickStart file
  menu default
  kernel vmlinuz
  append ks=cdrom:/isolinux/ks.cfg initrd=initrd.img ramdisk_size=8192
#### 여기까지 ####
label linux
  menu label ^Install or upgrade an existing system
  kernel vmlinuz
  append initrd=initrd.img

-- snip --

#5 최상위 폴더에서 iso 파일 작성.
[root@kevdev isolinux]# cd /mydata/test

[root@kevdev test]# mkisofs -o /mydata/RHEL-6.4-x86_64-sds-ks.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -J -R -V "RHEL 6.4 SDS KS ISO" -input-charset utf-8 .


Using RELEA000.HTM;1 for  /RELEASE-NOTES-te-IN.html (RELEASE-NOTES-pa-IN.html)
Using RELEA001.HTM;1 for  /RELEASE-NOTES-pa-IN.html (RELEASE-NOTES-or-IN.html)
Using RELEA002.HTM;1 for  /RELEASE-NOTES-or-IN.html (RELEASE-NOTES-gu-IN.html)
Using RELEA003.HTM;1 for  /RELEASE-NOTES-gu-IN.html (RELEASE-NOTES-de-DE.html)
Using RELEA004.HTM;1 for  /RELEASE-NOTES-de-DE.html (RELEASE-NOTES-mr-IN.html)
Using RPM_G000.;1 for  /RPM-GPG-KEY-redhat-beta (RPM-GPG-KEY-redhat-release)
Using RELEA005.HTM;1 for  /RELEASE-NOTES-mr-IN.html (RELEASE-NOTES-si-LK.html)
Using RELEA006.HTM;1 for  /RELEASE-NOTES-si-LK.html (RELEASE-NOTES-it-IT.html)
Using RELEA007.HTM;1 for  /RELEASE-NOTES-it-IT.html (RELEASE-NOTES-as-IN.html)

-- snip --

 99.65% done, estimate finish Thu Mar 17 12:26:53 2016
 99.93% done, estimate finish Thu Mar 17 12:26:53 2016
Total translation table size: 2048
Total rockridge attributes bytes: 424850
Total directory bytes: 653312
Path table size(bytes): 270
Max brk space used 3dc000
1816358 extents written (3547 MB)
[root@kevdev test]#

#6 iso 파일 생성 확인.
[root@kevdev test]# ls -al /mydata
합계 3636876
drwx------. 24 kevin kevin       4096  3월 17 12:26 .
dr-xr-xr-x. 19 root  root        4096  3월  6 15:40 ..
drwxrwxr-x.  4 kevin kevin       4096  8월 14  2013 .AndroidStudioPreview

-- snip --

-rw-r--r--.  1 root  root  3719901184  3월 17 12:46 RHEL-6.4-x86_64-sds-ks.iso

-- snip --

#7 ISO파일을 가상머신에서 테스트 하던가 DVD로 구워 Physical server에서 설치 후
## root login 불가능 시

install DVD rescue boot

chroot /mnt/sysimage

passwd root


## END