Kickstart ကိုအသုံးပြုပြီး Custom ISO တွေဖန်တီးပုံ
ကောလိပ်ကျောင်းသားဘဝတုန်းက သင်ရိုးညွှန်းတန်းထဲမှာပါတဲ့ bootable USB လုပ်နည်းတို့၊ Windows ကို unattended installation လုပ်နည်းတို့အပြင် boot menu ကိုပြန်လည်ပြင်ဆင်ပြီး ကိုယ်လိုချင်တဲ့ disk rescue utility ထပ်ပေါင်းထည့်နည်း အကြောင်းတွေကို စာတွေ့ရောလက်တွေ့ပါလေ့လာခဲ့ဘူးပါတယ်။ စာရေးသူလည်း အတော်လေးကို စိတ်ဝင်စားခဲ့တဲ့ အကြောင်းအရာတွေဖြစ်ပါတယ်။ နောင်တချိန်မှာလည်း အဲ့ဒီဘာသာရပ်တွေကိုပဲ အချိန်ပိုင်းကျောင်းဆရာလုပ်တဲ့အချိန်မှာ ကျောင်းသားကျောင်းသူတွေကိုပြန်လည် သင်ကြားပေးခဲ့ပြန်ပါတယ်။ Automation ဆိုတဲ့ ဝေါဟာရကို သေချာထဲထဲဝင်ဝင် နားမလည်ခင်ကတည်း ငပျင်းမို့ တခါလုပ်ပြီးနောက်တခေါက်မလုပ်ရဖို့ ဘယ်လိုနည်းတွေရှိသလဲဆိုတာ အမြဲရှာဖွေနေတတ်ပါတယ်။ အဲ့ဒီအတွက် scripting နဲ့ပတ်သတ်လာရင် အရင်ကတည်း စိတ်ဝင်စားခဲ့တာတော့ အမှန်ပါ။ ကောလိပ်မှာသင်ရတုန်း Perl တို့၊ Bash တို့အပြင် Windows မှာသုံးတဲ့ Batch script တွေနဲ့ လက်တွေ့တွေအများကြီးလုပ်ခဲ့ရပါတယ်။ ဒါဟာ automation မှာအသုံးပြုနိုင်တဲ့ workflow တခုဆိုတာကတော့ အခုနောက်ပိုင်းမှာ ပိုပြီးနားလည်လာခဲ့ပါတယ်။
DevOps တို့၊ CI/CD တို့၊ containerisation တို့အခုနောက်ပိုင်းမှာ တွင်တွင်ကျယ်ကျယ်လေးကို ပြောဆိုအသုံးပြုလာကြပါတယ်။ စာရေးသူကိုယ်တိုင်က ဘယ်အရာမဆို သတိလေးကပ်ပြီး သံသယနဲ့ မြင်တတ်ထင်တတ်လို့လားတော့မသိဘူး၊ နည်းပညာမှာ အခုလိုမျိုး idea အသစ်တွေ၊ tool အသစ်တွေထွက်လာရင် ချက်ချင်းအသုံးပြုလေ့မရှိပဲ ခဏတော့စောင့်ကြည့်တဲ့အကျင့်ရှိပါတယ်။ အထူးသဖြင့် DevOps ဆိုပြီးပြောတဲ့အကြောင်းအရာတွေမှာ အခြေခံအရေးပါတဲ့အချက်တခုဟာ အဲ့ဒါတွေအကုန်လုံးဖြစ်နိုင်ဖို့အတွက်က hardware infrastructure လိုပါတယ်၊ ဒါ့အပြင် အဲ့ဒီ infrastructure တွေမှာ network တွေကိုဘယ်လိုမျိုး တည်ဆောက်ကြသလဲဆိုတဲ့အချက်ပါ။ များသောအားဖြင့်က cluster တွေဖန်တီးလိုက်၊ Kubernetes ဟချလောက်ဆိုလိုက်တာနဲ့ အားလုံးအတွက်အဆင်ပြေစေမယ့် hyperscaler ကြီးတွေဖြစ်လာလေသတည်း။ သို့သော်... ထို cluster ကြီးတွေအတွက် အနောက်မှာဘယ်လိုမျိုး infrastructure ကြီးတွေကို run ထားသလဲဆိုတာကို အကုန်မေ့ပစ်ထားလို့မရပါ။ Bare metal server တွေကို datacentre ကြီးတွေထဲမှာ rack and stack မလုပ်ပဲနဲ့၊ router တွေ switch တွေ firewall လိုမျိုး security device တွေ၊ F5 လိုမျိုး load-balancer တွေ၊ Storage Area Network (SAN) လို့ခေါ်တဲ့ storage array တွေမရှိပဲနဲ့ day 0 deployment ဆိုတာမျိုး မဖြစ်နိုင်ပါ။ အဲ့လိုမှမဟုတ်ပဲနဲ့ public cloud vendor တခုခုကိုအသုံးပြုမယ်ဆိုရင်တော့လည်း premium price တခုကိုပေးပြီး ကျော်လွှာလို့ရနိုင်ပါတယ်။ သို့သော် ရေရှည်အတွက်ဖြစ်နိုင်ပါ့မလား။
နည်းပညာနဲ့ ပတ်သတ်လာရင် အကုန်လုံးကို မသိနိုင်ပေမယ့်လည်း basic rudimentary အကြောင်းအရာတွေအများကြီး ပိုင်နိုင်ထားမှ အကြောင်းအရာ အသစ်အသစ်တွေကို ဆက်လက်လေ့လာရတာလွယ်ပါတယ်။ လက်တွေ့မှာလည်း ကိုယ့်အတွက်ရော လုပ်ငန်းခွင်မှာအသုံးတည့်ပါမှ လိုက်ပါလေ့လာတာမျိုးပါ။ ပိုပြီးဆိုးတာ နည်းပညာလောကမှာက လေ့လာသင်ကြားမှုက ရပ်သွားလို့မရပါဘူး။ သို့သော်တဘက်မှာလည်း ရှိသမျှအကုန်လေ့လာပြီး အကုန်တတ်မြောက်အောင်ကလည်း တော်ရုံမဖြစ်နိုင်ပါ။ တချိန်တုန်းက ရှိသမျှ နည်းပညာ certificate တွေကိုရသလောက် အကုန်လိုက်ဖြေပါတယ်။ ဒီလိုနဲ့များစွာသော certificate တွေကို expired ဖြစ်တဲ့အခါမှာလည်း နောက်တခါ ပြန်လုပ်ရပါတယ်။ အခြားသူတွေအတွက်ဘယ်လိုနေမှန်းမသိပေမယ့် စာရေးသူအတွက်တော့ burnout ဖြစ်တဲ့အခြေအနေမျိုးနဲ့ ကြုံခဲ့ရပါတယ်။ ဒါ့အပြင် သင်ကြားရေးအတွက်လည်း ထင်သလောက် ကိုယ့်အတွက် အလုပ်မဖြစ်လို့ အခြားသောလေ့လာပုံတခုနဲ့ ခရီးဆက်ခဲ့ပါတယ်။ Home lab ကြောင့်စာရေးသူအတွက် အကျိုးများခဲ့ပုံကို ဒီ article https://my.itmatic101.com/others/home-lab-yahikhyin-anupnya မှာလည်း အကျယ်တဝင့်ရှင်းပြခဲ့ဘူးပါတယ်။
နောက်ပိုင်းမှာလည်း cloud solution တွေနဲ့အလုပ်လုပ်တဲ့အခါ စာရေးသူ bootstrap လုပ်တဲ့အပိုင်းတော်တော်များကို လုပ်ငန်းခွင်မှာ တာဝန်ယူပြီးလုပ်ခဲ့ပါတယ်။ Cloud-init ကိုအသုံးပြုပြီး bootstrap automation အတွက် workflow တွေမှာထည့်သွင်းခဲ့ဘူးပါတယ်။ Microsoft Windows မှာတော့ unattended installation ဆိုပြီး လူသိများပါတယ်။ အဓိကလိုရင်းက OS installation တခါလုပ်တိုင်း မေးသမျှမေးခွန်းတွေကို တခုချင်းစီလိုက်ဖြေပြီး click မလုပ်ချင်လို့ပဲဖြစ်ပါတယ်။ Mass deployment လုပ်တဲ့အခါမှ အသုံးပြုတဲ့ bootstrap automation ပုံစံတခုဆိုလည်း မမှားပါဘူး။ အခုနောက်ပိုင်းမှာ cloud-init ဟာနေရာတကာမှာတော်တော်လေးကို အသုံးများပါတယ်။ YAML syntax နဲ့ဖြစ်တဲ့အတွက် လွယ်ကူတာကြောင့် industrial standard တခုအနေနဲ့ cloud မှာရော၊ on-premise မှာပါအသုံးပြုပါတယ်။ သို့သော်... Enterprise Linux လို့ဆိုလိုက်တာနဲ့ Red Hat Enterprise Linux ကိုချက်ချင်းပြေးမြင်ကြမှာပါ။ Kickstart ဟာ RHEL ရဲ့ bootstrap process မှာအသုံးပြုနိုင်ဖို့အတွက် Red Hat ရဲ့ product တခုပါ။ ဒီ article မှာ RHEL ကိုမသုံးပဲနဲ့ AlmaLinux 8 ကိုအသုံးပြုပြီး demo လုပ်ပါ့မယ်။ အကြမ်းဖျင်းအားဖြင့် Rocky Linux နဲ့ AlmaLinux နှစ်ခုဟာ binary-to-binary compatible ဖြစ်တာမို့ RHEL ကိုသုံးမယ်ဆိုရင်လည်း လုပ်ငန်းစဉ်တွေအားလုံးဟာ အတူတူပါပဲ။ Kickstart ကိုသုံးပြီး bare metal hardware တွေကိုပဲ bootstrap လုပ်နိုင်တာမဟုတ်ပဲနဲ့ virtual machine (VM) တွေအတွက် အသုံးပြုချင်တယ်ဆိုလည်းဖြစ်ပါတယ်။
Custom ISO တည်ဆောက်ပုံအဆင့်များ
Build environment တခုပြင်ဆင်ခြင်း
ဒီ custom ISO တွေကိုတည်ဆောက်ဖို့အတွက် ဘယ် Linux distribution ကိုအသုံးပြုပြီး build environment တခုကိုပြင်ဆင်လို့ရပါတယ်။ စာရေးသူက Ubuntu 24.04 LTS သုံးတဲ့အတွက် APT package manager နဲ့လိုအပ်တဲ့ deb package တွေကိုအောက်မှာပြထားသလို အရင် install လုပ်ပါ့မယ်။
# update the package repos
sudo apt update
# for mkisofs utility, install genisoimage package
sudo apt install genisoimage
# for isohybrid utility, install syslinux-utils package
sudo apt install syslinux-utils
# for implantisomd5 utility, install isomd5sum package
sudo apt install isomd5sum
Ubuntu မသုံးပဲနဲ့ RHEL ရဲ့ derivative တခုခုကိုသုံးမယ်ဆိုရင် အောက်မှပြထားတဲ့ package တွေကို install လုပ်ရပါ့မယ်။ စာရေးသူက Fedora 40 ကို VM မှာတင်ပြီး စမ်းသပ်ထားတာဖြစ်ပါတယ်။ ကျန်တဲ့ အပိုင်းတွေ အကုန်လုံးက အတူတူပါပဲ။
sudo dnf install genisoimage
sudo dnf install syslinux
sudo dnf install isomd5sum
နောက်အဆင့်အနေနဲ့ ကိုယ်အသုံးပြုမယ့် AlmaLinux 8 ISO ကိုအောက်မှပြထားသလိုမျိုး လက်ရှိအလုပ်လုပ်မယ့် directory ထဲကို download ဆွဲလိုက်ပါ။ AlmaLinux 8 DVD ISO က 13 GB လောက်ရှိတဲ့အတွက် ကိုယ့် internet speed ပေါ်မူတည်ပြီး အနည်းငယ်တော့ကြာနိုင်ပါတယ်။ ဒါ့အပြင်ကိုယ့်စက်ပေါ်မှာလည်း နည်းဆုံး 50 to 60 GB လောက် storage အပိုရှိဖို့လိုပါလိမ့်မယ်။
mkdir kickstart
cd kickstart
wget https://repo.almalinux.org/almalinux/8.10/isos/x86_64/AlmaLinux-8.10-x86_64-dvd.iso
Download ဆွဲလို့ပြီးတာနဲ့ လိုအပ်တဲ့ directory တွေကိုအောက်မှာပြထားတဲ့အတိုင်းအရင်ပြင်ဆင်ရပါ့မယ်။ ပြီးတာနဲ့ ISO ကို loop device အနေနဲ့ mount လုပ်လိုက်ပြီး DVD ISO ထဲက file တွေ folder တွေအကုန်လုံးကို အောက်မှပြထားသလို extract လုပ်ရယူလိုက်ပါ။ shopt -s dotglob
ဆိုတဲ့ shell command ကိုအရင် run ပြီးတော့မှ copy လုပ်ပါ။ အဲ့ဒီ command က .
နဲ့စတဲ့ hidden file တွေကိုပါထည့်သွင်းကူးယူချင်လို့ဖြစ်ပါတယ်။ အကယ်လို့ ဒီအဆင့်ကိုကျော်သွားတယ် ဆိုရင်တော့ custom ISO ဟာ boot လုပ်တဲ့အခါ လိုအပ်တဲ့ source file တွေကိုမတွေ့တာကြောင့် installation ဆက်လုပ်လို့မရတာဖြစ်ပါလိမ့်မယ်။
mkdir origin-iso
mkdir custom-iso
sudo mount -o loop ./AlmaLinux-8.10-x86_64-dvd.iso ./origin-iso
shopt -s dotglob
sudo cp -avRf ./origin-iso/* ./custom-iso/
sudo chown -R tyla:tyla ./custom-iso
Kickstart configuration
Custom ISO ဖြစ်ဖို့အတွက် အရေးကြီးတဲ့ Kickstart configuration ကိုအောက်ဖော်ပြပါ အတိုင်းလက်ရှိ ကိုယ်အလုပ်လုပ်မယ့် directory ထဲမှာဖန်တီးလိုက်ရအောင်။
#version=ALMALINUX8
# Use text mode for installation
text
# System language and keyboard layout
lang en_US
keyboard us
# Timezone and clock setup
timezone Australia/Melbourne --utc
# Root password (use hashed password for better security)
rootpw --plaintext secret
# Reboot after installation
reboot
# Installation source
cdrom
# Bootloader configuration
bootloader --location=mbr --append="rhgb quiet crashkernel=auto biosdevname=0 net.ifnames=0"
# Clear all partitions and initialize new ones (using LVM)
zerombr
clearpart --all --initlabel
autopart --type=lvm
# System authentication and authorization
authselect select sssd with-sha512 --force
# Network configuration (adjust as needed)
network --bootproto=dhcp --device=eth0 --onboot=yes --hostname=iso.lab
# Disable first boot wizard
firstboot --disable
# Disable firewall and SELinux (optional)
firewall --disabled
selinux --disabled
# Enable essential services
services --enabled="sshd,NetworkManager"
# Package selection (with virtualization environment support)
%packages
@^virtualization-host-environment
kexec-tools
virt-install
virt-viewer
virt-manager
tmux
vim
createrepo
genisoimage
isomd5sum
syslinux
-rhgb
-firewalld
%end
# Post-installation tasks
%post
# Enable and start the libvirtd service for virtualization
systemctl enable --now libvirtd
%end
အထက်မှာမြင်ရသလိုမျိုး Kickstart file မှာ ကိုယ်လိုချင်တဲ့ parameter တွေကိုသတ်မှတ်ပေးလိုက်ပါ။ ရိုးရှင်းတဲ့ configuration တွေကိုအသုံးပြုထားတာဖြစ်တာမို့ အသေးစိတ်မရှင်းလိုတော့ပါ။ အကျဉ်းချုပ်အားဖြင့် QEMU/KVM ကိုသုံးပြီး hypervisor နဲ့ အခြားသောလိုအပ်တဲ့ package တွေကို Kickstart နဲ့ install ကြိုလုပ်ထားတာပါ။ Installation ပြီးတာနဲ့ဘာမှလုပ်စရာမလိုပဲ hypervisor အနေနဲ့ စတင်သုံးလို့ရအောင် ပြင်ဆင်ပုံပဲဖြစ်ပါတယ်။
GRUB menu နဲ့ isolinux configuration
ဒီအဆင့်မှာ GRUB bootloader မှာ boot menu ကိုဘယ်လိုမျိုးပေါ်စေချင်သလဲဆိုတာကိုပြင်ဆင်ပေးရမှာဖြစ်ပါတယ်။ ဒီ configuration file တွေကို အစကနေပြီး ဖန်တီးစရာမလိုပဲနဲ့ ./custom-iso/EFI/BOOT/grub.cfg
နဲ့ ./custom-iso/isolinux/isolinux.cfg
ကနေကူးယူပြီး ကိုယ့်ရဲ့ custom entry ကိုထပ်ပေါင်းထည့်ပေးလိုက်ရုံပါပဲ။ အဲ့ဒီ configuration file နှစ်ခုကို အောက်မှဖော်ပြထားတဲ့အတိုင်းပြင်ဆင်လိုက်ပါ။
set default="1"
function load_video {
insmod efi_gop
insmod efi_uga
insmod video_bochs
insmod video_cirrus
insmod all_video
}
load_video
set gfxpayload=keep
insmod gzio
insmod part_gpt
insmod ext2
set timeout=60
### END /etc/grub.d/00_header ###
search --no-floppy --set=root -l 'AlmaLinux-8-10-x86_64-dvd'
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Custom Install AlmaLinux 8.10' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd inst.ks=hd:LABEL=AlmaLinux-8-10-x86_64-dvd:/ks.cfg
initrdefi /images/pxeboot/initrd.img
}
menuentry 'Install AlmaLinux 8.10' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd quiet
initrdefi /images/pxeboot/initrd.img
}
menuentry 'Test this media & install AlmaLinux 8.10' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd rd.live.check quiet
initrdefi /images/pxeboot/initrd.img
}
submenu 'Troubleshooting -->' {
menuentry 'Install AlmaLinux 8.10 in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd nomodeset quiet
initrdefi /images/pxeboot/initrd.img
}
menuentry 'Rescue a AlmaLinux system' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd inst.rescue quiet
initrdefi /images/pxeboot/initrd.img
}
}
ဒီ grub.cfg မှာထပ်ထည့်ပေါင်းတာဆိုလို အောက်မှာပြထားတဲ့အပိုင်းတခုပဲရှိပါတယ်။ ကျန်တာတွေအားလုံးဟာ သူ့မူရှင်း file ထဲမှာပါတဲ့ content အတိုင်းပဲဖြစ်ပါတယ်။
menuentry 'Custom Install AlmaLinux 8.10' --class fedora --class gnu-linux --class gnu --class os {
linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd inst.ks=hd:LABEL=AlmaLinux-8-10-x86_64-dvd:/ks.cfg
initrdefi /images/pxeboot/initrd.img
}
isolinux.cfg ကိုဒီတခါကြည့်လိုက်ရအောင်။
default vesamenu.c32
timeout 600
display 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 clear
menu background splash.png
menu title AlmaLinux 8.10
menu vshift 8
menu rows 18
menu margin 8
#menu hidden
menu helpmsgrow 15
menu tabmsgrow 13
# Border Area
menu color border * #00000000 #00000000 none
# Selected item
menu color sel 0 #ffffffff #00000000 none
# Title bar
menu color title 0 #ff7ba3d0 #00000000 none
# Press [Tab] message
menu color tabmsg 0 #ff3a6496 #00000000 none
# Unselected menu item
menu color unsel 0 #84b8ffff #00000000 none
# Selected hotkey
menu color hotsel 0 #84b8ffff #00000000 none
# Unselected hotkey
menu color hotkey 0 #ffffffff #00000000 none
# Help text
menu color help 0 #ffffffff #00000000 none
# A scrollbar of some type? Not sure.
menu color scrollbar 0 #ffffffff #ff355594 none
# Timeout msg
menu color timeout 0 #ffffffff #00000000 none
menu color timeout_msg 0 #ffffffff #00000000 none
# Command prompt text
menu color cmdmark 0 #84b8ffff #00000000 none
menu 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 line
menu separator # insert an empty line
label custom
menu label ^Custom Kickstart Installation of AlmaLinux 8.10
menu default
kernel vmlinuz
append initrd=initrd.img biosdevname=0 net.ifnames=0 inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd inst.ks=hd:LABEL=AlmaLinux-8-10-x86_64-dvd:/ks.cfg
label linux
menu label ^Install AlmaLinux 8.10
kernel vmlinuz
append initrd=initrd.img inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd quiet
label check
menu label Test this ^media & install AlmaLinux 8.10
kernel vmlinuz
append initrd=initrd.img inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd rd.live.check quiet
menu separator # insert an empty line
# utilities submenu
menu begin ^Troubleshooting
menu title Troubleshooting
label vesa
menu indent count 5
menu label Install AlmaLinux 8.10 in ^basic graphics mode
text help
Try this option out if you're having trouble installing
AlmaLinux 8.10.
endtext
kernel vmlinuz
append initrd=initrd.img inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd nomodeset quiet
label rescue
menu indent count 5
menu label ^Rescue a AlmaLinux 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 vmlinuz
append initrd=initrd.img inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd inst.rescue quiet
label 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 memtest
menu separator # insert an empty line
label local
menu label Boot from ^local drive
localboot 0xffff
menu separator # insert an empty line
menu separator # insert an empty line
label returntomain
menu label Return to ^main menu
menu exit
menu end
ဒီတခါလည်း အကုန်လုံးနီးပါး နဂိုအတိုင်းဖြစ်ပြီး အောက်မှာပြထားတဲ့အပိုင်းတခုပဲပိုလာတာ တခုရယ်၊ label check
အပိုင်းအောက်မှာ menu default
ဆိုတဲ့ line ကိုဖျက်ပေးလိုက်ပါ။ အဲ့ဒါကို label custom
အောက်မှာထည့်ပေးခြင်းဖြင့် boot menu မှာ ကိုယ့်ရဲ့ custom option ကို default အနေနဲ့ ရွေးထားပြီးသားဖြစ်နေပါလိမ့်မယ်။ ဒါ့ကြောင့် boot တက်တဲ့အခါမှာ menu option တခုကနေ နောက်တခုကိုထပ်ပြောင်းပေးစရာမလိုတော့ပါဘူး။
label custom
menu label ^Custom Kickstart Installation of AlmaLinux 8.10
menu default
kernel vmlinuz
append initrd=initrd.img biosdevname=0 net.ifnames=0 inst.stage2=hd:LABEL=AlmaLinux-8-10-x86_64-dvd inst.ks=hd:LABEL=AlmaLinux-8-10-x86_64-dvd:/ks.cfg
Custom ISO တခုဖန်တီးခြင်း
အားလုံးပြီးရင် နောက်ဆုံးအဆင့်မှာတော့ custom ISO ဖန်တီးဖို့သာကျန်ပါတယ်။ ဘယ်လိုမျိုး ပေါင်းစပ်ပြီး ဖန်တီးသလဲဆိုတာအောက်မှာ ကြည့်လိုက်ရအောင်။
# copy previously prepared kickstart, grub and isolinux config files into its relevant directories as below
cp ./ks.cfg ./custom-iso/
sudo cp -f ./grub.cfg ./custom-iso/EFI/BOOT/grub.cfg
sudo cp -f ./isolinux.cfg ./custom-iso/isolinux/isolinux.cfg
# create iso file based on the ./custom-iso directory with other required parameters
sudo mkisofs -o ./custom.iso -b isolinux/isolinux.bin -J -R -l -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e images/efiboot.img -no-emul-boot -graft-points -V "AlmaLinux-8-10-x86_64-dvd" -joliet-long ./custom-iso
# change ownership of the output iso
sudo chown tyla:tyla ./custom.iso
# modify a bootable ISO image to make it compatible with both legacy BIOS and UEFI (Unified Extensible Firmware Interface) systems
isohybrid --uefi ./custom.iso
# embed a checksum (specifically, an MD5 checksum) into an ISO image, allowing verification of the integrity of the ISO during boot
implantisomd5 ./custom.iso
ရရှိလာတဲ့ custom.iso ကို VM တခုနဲ့ အရင်ဆုံး boot တက်ကြည့်လိုက်ပါ။ အားလုံးအဆင်ပြေရင် USB drive နဲ့ bootable disk လုပ်ပြီး ကိုယ်သုံးချင်တဲ့ စက်ပေါ်မှာတင်အသုံးပြုနိုင်ပါပြီ။
Last updated
Was this helpful?