하나의 USB 스틱에 있는 여러 ISO 파일을 사용하여 Kickstart 기반 RHEL 설치
Environment
- Red Hat Enterprise Linux (RHEL) 7, 8
- genisoimage
Issue
여러 RHEL
ISO
릴리스와 여러 kickstart 파일이 포함된 범용 설치 USB
스틱을 만드는 방법.
Resolution
-
필요한 모든 파일을 포함할
usb_stick
폴더를 만듭니다.# mount -o loop RHEL-7.6-20181010.0-Server-x86_64-boot.iso /media/ $ mkdir usb_stick $ cp -a /media/isolinux/ usb_stick $ chmod -R u+w usb_stick
-
필요한 모든
RHEL
ISO
파일을usb_stick
에 복사합니다. 예:$ ll usb_stick/*.iso total 12360716 -rw-rw-r-- 1 test test 4203741184 Oct 30 14:33 RHEL-7.0-20140507.0-Workstation-x86_64-dvd1.iso -rw-rw-r-- 1 test test 4497342464 May 13 13:51 RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso -rw-rw-r-- 1 test test 3956277248 Oct 30 14:43 RHEL-7.7-20190723.1-Client-x86_64-dvd1.iso
-
해당
RHEL
을 설치하려면usb_stick/isolinux/isolinux.cfg
에 메뉴 항목을 추가하십시오.... label server menu label Install Red Hat Enterprise Linux 7.6 ^Server menu default kernel vmlinuz append initrd=initrd.img inst.ks=hd:LABEL=RHEL7:/server.cfg inst.stage2=hd:LABEL=RHEL7:/RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso label netinstall menu label Install Red Hat Enterprise Linux 7.6 ^Netinstall Server kernel vmlinuz append initrd=initrd.img inst.ks=hd:LABEL=RHEL7:/netinstall.cfg inst.stage2=hd:LABEL=RHEL7:/RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso label client menu label Install Red Hat Enterprise Linux 7.7 ^Client kernel vmlinuz append initrd=initrd.img inst.ks=hd:LABEL=RHEL7:/client.cfg inst.stage2=hd:LABEL=RHEL7:/RHEL-7.7-20190723.1-Client-x86_64-dvd1.iso label desktop menu label Install Red Hat Enterprise Linux 7.0 ^Workstation kernel vmlinuz append initrd=initrd.img inst.ks=hd:LABEL=RHEL7:/workstation.cfg inst.stage2=hd:LABEL=RHEL7:/RHEL-7.0-20140507.0-Workstation-x86_64-dvd1.iso ...
-
적절한 킥스타트 파일을 생성합니다(예:
usb_stick/minimal.cfg
):# RHEL7 lang en_US keyboard us timezone Europe/Prague --isUtc rootpw a #platform x86, AMD64, or Intel EM64T reboot text bootloader --location=mbr --append="crashkernel=auto" zerombr clearpart --all --initlabel autopart auth --passalgo=sha512 --useshadow firewall --enabled firstboot --disable network --bootproto=dhcp --onboot=on --ipv6=auto --hostname=test %packages @base %end
USB
스틱 폴더에는 다음 파일이 포함되어 있습니다.$ ll usb_stick/ total 44 drwxrwxr-x 4 test test 4096 Oct 30 15:26 . drwxrwxr-x 5 test test 4096 Oct 30 15:05 .. -rw-r--r-- 1 test test 426 Oct 30 14:48 client.cfg drwxr-xr-x 2 test test 4096 Oct 30 15:11 isolinux -rw-r--r-- 1 test test 426 Oct 30 14:48 netinstall.cfg -rw-r--r-- 1 test test 426 Oct 30 14:47 server.cfg -rw-r--r-- 1 test test 426 Oct 30 14:48 workstation.cfg -rw-rw-r-- 1 test test 4203741184 Oct 30 14:33 RHEL-7.0-20140507.0-Workstation-x86_64-dvd1.iso -rw-rw-r-- 1 test test 4497342464 May 13 13:51 RHEL-7.6-20181010.0-Server-x86_64-dvd1.iso -rw-rw-r-- 1 test test 3956277248 Oct 30 14:43 RHEL-7.7-20190723.1-Client-x86_64-dvd1.iso
-
ISO
이미지를 생성합니다(isohybrid
명령을 사용하면USB
스틱을 부팅 가능하게 만듭니다).#!/bin/bash ISO=usb_stick NAME="RHEL7" mkisofs -allow-limited-size -o $ISO.iso \ -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -V "$NAME" \ -boot-load-size 4 -boot-info-table -r -T -J $ISO isohybrid -v $ISO.iso
-
usb_stick.iso
를 물리적USB
스틱에 복사합니다.# dd if=usb_stick.iso of=/dev/<USB stick device name> bs=512k; sync
또는
# cat usb_stick.iso > /dev/<USB stick device name>
면책 조항: 사용자 정의 ISO 이미지 사용은 지원되지 않습니다. 예를 들어, 사용자 정의 ISO 이미지를 사용할 때 anaconda가 실패하면 Red Hat은 문제 조사를 도울 수 없습니다.
Root Cause
Diagnostic Steps
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments