Linux觀念
- 鳥哥私房菜 - 第 11 堂課:基礎設定、備份、檔案壓縮打包與工作排程
- 鳥哥私房菜 - 第 13 堂課:服務管理與開機流程管理
- 第 2 堂課 - SELinux 初探與網路基礎
- 第 3 堂課 - LACP 與 bonding/team 及 IPv6 簡易設定
- 第 4 堂課 - 認識與建置防火牆
- 第 5 堂課 - 區域網路的 DHCP server 建置
- 第 7 堂課 - 身份識別伺服器與內部檔案系統伺服器
- The 𝐋𝐢𝐧𝐮𝐱 𝐒𝐭𝐨𝐫𝐚𝐠𝐞 𝐒𝐭𝐚𝐜𝐤 𝐃𝐢𝐚𝐠𝐫𝐚𝐦 shows the layout of the the Linux storage stack. Diagram by Thomas-Krenn.
- 關於 · 每位程式開發者都該有的記憶體知識
- Check if Computer Uses UEFI or Legacy BIOS [Linux & Windows]
- Ventoy教學:製作能當Linux&Windows開機碟又當資料碟的USB隨身碟 · Ivon的部落格
- 紀錄使用Linux系統二年後的心得 · Ivon的部落格
- 我全都要!Distrobox使用教學,透過容器安裝其他Linux發行版的套件 · Ivon的部落格
- NCNU OpenSource - LSA 課程介紹
- :star:LPIC
- FHS
磁碟分割與檔案系統
- unix - How to get the number of physical disks in Linux? - Super User
- [Linux] Linux LVM 磁區擴增 disk extending (以 Redhat 為例) - 清新下午茶
- 了解LVM並於Ubuntu擴充伺服器磁碟空間 · GitHub
- 節省工具箱 Jason Tools: [技術文章] Proxmox VE 儲存架構表
- Linux 硬碟空間不足怎麼辦?排查與清理的完整指南 - Clarence 的科技學習實戰筆記
磁碟分割
接近物理層的硬體上做第一層的抽象化 - 鳥哥私房菜 - 第二章、主機規劃與磁碟分割 - 在Linux系統中,每個裝置都被當成一個檔案來對待 - Linux核心支援的硬體裝置與檔名 - 整顆磁碟的第一個磁區特別的重要,因為他記錄了整顆磁碟的重要資訊 - MBR (Master Boot Record) - 第一個磁區 512bytes 會有這兩個資料 - 主要開機記錄區(Master Boot Record, MBR):可以安裝開機管理程式的地方,有446 bytes - 分割表(partition table):記錄整顆硬碟分割的狀態,有64 bytes - 每組分割表僅有 16bytes, 最多4組 - 主要(Primary)或延伸(Extended)分割槽 - 延伸分割最多只能1組 - GPT (GUID partition table) - 在磁區的定義上面, 大多會使用所謂的邏輯區塊位址(Logical Block Address, LBA)來處理 - 與 MBR 僅使用第一個 512bytes 區塊來紀錄不同, GPT 使用了 34 個 LBA 區塊來紀錄分割資訊 - 如何結合目錄樹的架構(邏輯上)與磁碟內(物理層面)的資料 - 掛載: 利用一個目錄當成進入點,將磁碟分割槽的資料放置在該目錄下; 也就是說,進入該目錄就可以讀取該分割槽 - 進入點的目錄我們稱為『掛載點』
檔案系統
了解磁碟分割後,引入作業系統概念,做第二層的抽象化(檔案系統) 可以將檔案系統想成作業系統要管理實際檔案時所需要的資料結構 分割槽和檔案系統的為多對多關係
``` bash= df -hT
- [鳥哥私房菜 - 第七章、Linux 磁碟與檔案系統管理](https://linux.vbird.org/linux_basic/centos7/0230filesystem.php)
- 磁碟分割完畢後還需要進行格式化(format),之後作業系統才能夠使用這個檔案系統。 為什麼需要進行『格式化』呢?這是因為每種作業系統所設定的檔案屬性/權限並不相同, 為了存放這些檔案所需的資料,因此就需要將分割槽進行格式化
- 常聽到的LVM與軟體磁碟陣列(software raid), 這些技術可以將一個分割槽格式化為多個檔案系統(例如LVM),也能夠將多個分割槽合成一個檔案系統(LVM, RAID)
- 目前我們在格式化時已經不再說成針對 partition 來格式化了, 通常我們可以稱呼一個可被掛載的資料為一個檔案系統而不是一個分割槽
- 將檔案系統與目錄樹結合的動作我們稱為『掛載』
- 較新的作業系統的檔案資料除了檔案實際內容外, 通常含有非常多的屬性,例如 Linux 作業系統的檔案權限(rwx)與檔案屬性(擁有者、群組、時間參數等)。 檔案系統通常會將這兩部份的資料分別存放在不同的區塊,權限與屬性放置到 inode 中,至於實際資料則放置到 data block 區塊中。 另外,還有一個超級區塊 (superblock) 會記錄整個檔案系統的整體資訊,包括 inode 與 block 的總量、使用量、剩餘量等。
- superblock:記錄此 filesystem 的整體資訊,包括inode/block的總量、使用量、剩餘量, 以及檔案系統的格式與相關資訊等;
- inode:記錄檔案的屬性,一個檔案佔用一個inode,同時記錄此檔案的資料所在的 block 號碼;
- block:實際記錄檔案的內容,若檔案太大時,會佔用多個 block 。
- [鳥哥私房菜 - 第 15 堂課:Linux 系統的準備 (Optional)](https://linux.vbird.org/linux_basic_train/centos8/unit15.php)
The `tmpfs` and `devtmpfs` devices are file systems in system memory.
All files that are written to the tmpfs or devtmpfs file system disappear after a system reboot.
human-readable options
- The -h option reports in KiB (210), MiB (220), or GiB (230)
- the -H option reports in SI units: KB (103), MB (106), or GB (109)
#### /tmp
- [linux - When does /tmp get cleared? - Server Fault](https://serverfault.com/questions/377348/when-does-tmp-get-cleared)
- [How to use systemd-tmpfiles-clean to automatically remove the old logs in the directory - Red Hat Customer Portal](https://access.redhat.com/solutions/6964016)
- [Linux下关于/tmp目录的清理规则 - 爱吃甜食的boy - 博客园](https://www.cnblogs.com/samtech/p/9490166.html)
- /usr/lib/systemd/system/systemd-tmpfiles-clean.timer
- /usr/lib/systemd/system/systemd-tmpfiles-clean.service
- /usr/lib/tmpfiles.d/tmp.conf
- [tmpfiles.d](https://www.freedesktop.org/software/systemd/man/latest/tmpfiles.d.html)
- [Ubuntu Manpage: tmpfiles.d - Configuration for creation, deletion and cleaning of volatile and temporary](https://manpages.ubuntu.com/manpages/bionic/man5/tmpfiles.d.5.html)
- [/tmp临时目录定期清理机制 — Cloud Atlas 0.1 文档](https://cloud-atlas.readthedocs.io/zh_CN/latest/linux/redhat_linux/systemd/tmp_directory_cleanup_periodically.html)
#### mount
The /mnt directory exists for use as a temporary mount point.
If a directory to use as a mount point is not empty, then the existing files are hidden and not accessible when a file system is mounted there.
The original files are accessible again after the mounted file system is unmounted.
It is recommended to use an unchanging device identifier to mount file systems consistently.
One stable identifier that is associated with a file system is its universally unique identifier (UUID).
This UUID is stored in the file system superblock and remains the same until the file system is re-created.
``` bash=
# lists the full path of the device, the UUIDs and mount points, and the partition's file-system type
lsblk -fp
System shutdown and reboot procedures unmount all file systems automatically.
Unmounting is not possible when the mounted file system is in use. - For the umount command to succeed, all processes must stop accessing data under the mount point.
``` bash= mount UUID="efd314d0-b56e-45db-bbb3-3f32ae98f652" /mnt/data cd /mnt/data umount /mnt/data
lists all open files and the processes that are accessing the file system.
lsof /mnt/data cd umount /mnt/data
### LVM
- [4.3.7. Activating and Deactivating Volume Groups Red Hat Enterprise Linux 4 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/4/html/cluster_logical_volume_manager/vg_activate)
- [Chapter 5. LVM Configuration Examples Red Hat Enterprise Linux 7 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html/logical_volume_manager_administration/lvm_examples#doc-wrapper)
- [“Logical volume vg/lv contains a filesystem in use” – while removing LVM filesystem – The Geek Diary](https://www.thegeekdiary.com/logical-volume-vg-lv-contains-a-filesystem-in-use-while-removing-lvm-filesystem/)
- [Can not remove Logical Volume, message "Logical volume contains a filesystem in use" returned - Red Hat Customer Portal](https://access.redhat.com/solutions/2961861)
``` bash=
# deactive
vgchange -a n my_volume_group
# activce
vgchange -a y my_volume_group
RAID and LVM
RAID 可以將檔案系統容量增加,也有效能增加與容錯的機制,但是就是沒有辦法在既有的檔案系統架構下,直接將容量放大的機制。
LVM 最重要的任務就是進行裝置的容量放大與縮小,前提是在該裝置下的檔案系統能夠支援放大與縮小才行。 目前在 CentOS 8 上面主要的兩款檔案系統中, ext4 可以放大與縮小,但是 xfs 檔案系統則僅能放大而已。因此使用上需要特別注意。
RAID 主要的目的在效能與容錯 (容量只是附加的),而 LVM 重點在彈性管理檔案系統 (最好不要考量 LVM 內建的容錯機制)。 若需要兩者的優點,則可以在 RAID 上面建置 LVM。
Resize
- How to resize a logical volume with 5 simple LVM commands | Enable Sysadmin
- How to reduce XFS file system - Red Hat Customer Portal
- Chapter 6. Modifying the size of a logical volume Red Hat Enterprise Linux 8 | Red Hat Customer Portal
- How to Shrink/Reduce XFS partition size on LVM > Blog-D without Nonsense
- How to Reduce / Shrink the Size of a LVM Partition Formatted with XFS Filesystem? - YallaLabs
- How To Resize LVM Software RAID1 Partitions (Shrink & Grow)
- Shrinking LVM physical volume running on software RAID - KobelNET Blog
- Resize root partition (or how to remove the default /home partition) on CentOS 7 online · GitHub
Shrink xfs system on LVM on RAID
- ubuntu 18.04 - How to move mounted and mapped logical volume from one volume group/physical volume to another - Stack Overflow
- CentOS / RHEL 7 : How to boot into Rescue Mode or Emergency Mode – The Geek Diary
/tmp ``` bash=
enter into Resure mode after reboot
umount /tmp
remove mount point /tmp on the /etc/fstab
sed -i '/\/tmp/d' /etc/fstab
deactive and remove logic volume
lvchange -an -v /dev/rhel/tmp lvremove -vf /dev/rhel/tmp reboot
normal mode
lvcreate -L 600G -n tmp rhel mkfs.xfs -f /dev/rhel/tmp sed -i -e '$a/dev/mapper/rhel-tmp /tmp xfs defaults 0 0' /etc/fstab reboot
### Ramdisk
- [Create a RAM disk in Linux | JamesCoyle.net Limited](https://www.jamescoyle.net/how-to/943-create-a-ram-disk-in-linux)
- [The Difference Between a tmpfs and ramfs RAM Disk | JamesCoyle.net Limited](https://www.jamescoyle.net/knowledge/951-the-difference-between-a-tmpfs-and-ramfs-ram-disk)
- [專題五 - 建立 rootfs 的無磁碟 Linux 系統環境](https://dic.vbird.tw/network_project/unit05.php)
- [ramfs, tmpfs, rootfs, initramfs的区别](https://flyflypeng.tech/%E5%86%85%E6%A0%B8/2017/06/14/ramfs-rootfs-initramfs%E7%9A%84%E5%8C%BA%E5%88%AB.html)
- [linux - What sets the size of tmpfs? What happens when its full? - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/205174/what-sets-the-size-of-tmpfs-what-happens-when-its-full)
- The default is half of your physical RAM without swap
ramfs is the older file system type and is largely replaced in most scenarios by tmpfs
- it creates an in memory file system which uses the same mechanism and storage space as Linux file system cache
- it cannot be limited in size like a disk base file system which is limited by it’s capacity.
- it will continue using memory storage until the system runs out of RAM and likely crashes or becomes unresponsive.
- you cannot see the size of the file system in df and it can only be estimated by looking at the cached entry in free command
tmpfs is a more recent RAM file system which overcomes many of the drawbacks with ramfs.
- You can specify a size limit in tmpfs which will give a ‘disk full’ error when the limit is reached.
- This behaviour is exactly the same as a partition of a physical disk.
- tmpfs may use SWAP space.
## 網路
- [networking - what is the difference between eth1 and eno1? - Super User](https://superuser.com/questions/1053003/what-is-the-difference-between-eth1-and-eno1)
## NFS
- [nfs(5) - Linux man page](https://linux.die.net/man/5/nfs)
- [Additional mounting considerations - Amazon Elastic File System](https://docs.aws.amazon.com/efs/latest/ug/mounting-fs-mount-cmd-general.html)
- [NFS vs CIFS - 檔案系統之間的區別 - AWS](https://aws.amazon.com/tw/compare/the-difference-between-nfs-and-cifs/)
- [Chapter 3. Mounting NFS shares Red Hat Enterprise Linux 8 | Red Hat Customer Portal](https://access.redhat.com/documentation/zh-tw/red_hat_enterprise_linux/8/html/managing_file_systems/mounting-nfs-shares_managing-file-systems#common-nfs-mount-options_mounting-nfs-shares)
- [An NFS client hangs on various operations, including "df". Hard vs Soft NFS mounts. | Support | SUSE](https://www.suse.com/support/kb/doc/?id=000020830)
- [Where are NFS defaults specified? - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/310178/where-are-nfs-defaults-specified)
- [fstab(5) - Linux manual page](https://man7.org/linux/man-pages/man5/fstab.5.html)
- [Chapter 110. Using Ansible to automount NFS shares for IdM users Red Hat Enterprise Linux 8 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_identity_management/using-ansible-to-automount-nfs-shares-for-idm-users_configuring-and-managing-idm)
- [NFS 效能 - IBM 說明文件](https://www.ibm.com/docs/zh-tw/aix/7.3?topic=management-nfs-performance)
- [The nfsstat -s command - IBM Documentation](https://www.ibm.com/docs/en/aix/7.3?topic=server-nfsstat-s-command)
- [Causes of slow access times for NFS - IBM Documentation](https://www.ibm.com/docs/en/aix/7.2?topic=troubleshooting-causes-slow-access-times-nfs)
- [Using nfsstat and nfsiostat to troubleshoot NFS performance issues on Linux | Enable Sysadmin](https://www.redhat.com/sysadmin/using-nfsstat-nfsiostat)
- [RHEL NFS Client: slow NFS performance with \`noac\` NFS mount option - Red Hat Customer Portal](https://access.redhat.com/solutions/83723)
- [1893329 – Mounting NFS home dirs at boot fails](https://bugzilla.redhat.com/show_bug.cgi?id=1893329)
- [Chapter 28. Mounting file systems on demand Red Hat Enterprise Linux 8 | Red Hat Customer Portal](https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_file_systems/assembly_mounting-file-systems-on-demand_managing-file-systems#proc_using-systemd-automount-to-mount-a-file-system-on-demand-with-etc-fstab_assembly_mounting-file-systems-on-demand)
- [systemd.mount](https://www.freedesktop.org/software/systemd/man/systemd.mount.html)
- [networking - systemd: failed to mount NFS share: mount.nfs: Network is unreachable until later in boot process - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/459731/systemd-failed-to-mount-nfs-share-mount-nfs-network-is-unreachable-until-late)
- soft,retrans=5,timeo=30,retry=2
- [systemd - (Ubuntu 19.04) NFS share won't automount at boot: 'mount.nfs: Network is unreachable' - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/542925/ubuntu-19-04-nfs-share-wont-automount-at-boot-mount-nfs-network-is-unreach)
- [fstab与systemd.mount自动挂载的一点研究和见解 · zhangguanzhang's Blog](https://zhangguanzhang.github.io/2019/01/30/fstab/#/findmnt)
- [Reboot hangs when NFS share is mounted and lost connection to NFS server during I/O operation in Red Hat Enterprise Linux. - Red Hat Customer Portal](https://access.redhat.com/solutions/3339001)
- [NFS hard and soft mounts - IBM Documentation](https://www.ibm.com/docs/en/spectrum-protect/8.1.9?topic=considerations-nfs-hard-soft-mounts)
- [How to log NFS related messages in "/var/log/messages"? - Red Hat Customer Portal](https://access.redhat.com/solutions/137313)
- firewall
- [Configuring the NFS server to run behind a firewall](https://access.redhat.com/documentation/zh-tw/red_hat_enterprise_linux/8/html/deploying_different_types_of_servers/exporting-nfs-shares_deploying-different-types-of-servers#assembly_configuring-the-nfs-server-to-run-behind-a-firewall_exporting-nfs-shares)
- server is gone
- [How to unmount NFS when server is gone? - Ask Ubuntu](https://askubuntu.com/questions/292043/how-to-unmount-nfs-when-server-is-gone)
- server not responding
- [RHEL mount hangs: nfs: server [...] not responding, still trying - Red Hat Customer Portal](https://access.redhat.com/solutions/28211)
- [How to increase the number of threads created by the NFS daemon in RHEL 4, 5, 6, 7 and 8? - Red Hat Customer Portal](https://access.redhat.com/solutions/2216)
- [Correct nfs server not responding error in EFS | AWS re:Post](https://repost.aws/knowledge-center/efs-fix-nfs-server-not-responding)
- noresvport
- NFS client hangs
- [NFS client hang problem analysis - IBM Documentation](https://www.ibm.com/docs/en/zos/2.4.0?topic=aids-nfs-client-hang-problem-analysis)
- [An NFS client hangs on various operations, including "df". Hard vs Soft NFS mounts. | Support | SUSE](https://www.suse.com/support/kb/doc/?id=000020830)
- [Dell Unity: ls command hung on RHEL 8.4 client when mounting Unity NFS export via NFSv4 (User Correctable) | Dell US](https://www.dell.com/support/kbdoc/en-us/000202521/dell-emc-unity-ls-command-hung-on-rhel-8-4-client-in-a-user-correctable)
- [Why does the command 'df' hang on a RHEL NFS client when the NFS server is unavailable? - Red Hat Customer Portal](https://access.redhat.com/solutions/23338)
- [linux - Mount nfs hangs client - Unix & Linux Stack Exchange](https://unix.stackexchange.com/questions/404066/mount-nfs-hangs-client)
``` bash=
# on the server
nfsstat -s
# on the client
nfsstat -m
nfsstat -c
nfsiostat
``` bash=
on the server
firewall
sudo firewall-cmd --zone=public --list-all sudo firewall-cmd --add-service=nfs --permanent sudo firewall-cmd --reload sudo systemctl restart nfs-server
Test
``` bash=
# on the client
sudo systemctl stop opt_shared.mount
sudo sed -i 's/167.22.10.1/167.22.10.2/g' /etc/fstab
sudo systemctl daemon-reload
systemctl status opt_shared.mount
TTY
- 用 Python 控制其他行程的 TTY 終端裝置 · John Engineering Stuff
- Bash output 討論 >file 2>&1 與 2>&1 > file 的差異 | hwchiu learning note
Privilege Escalation
CPU
- 三分钟速览cpu,socket,core,thread等术语之间的关系-腾讯云开发者社区-腾讯云
- Socket vs. Core, CPU vs. Thread: The Evolution of x86 Architecture Terms - VMware Professional Services
- cluster computing - What is socket, core, threads, CPU? - Stack Overflow
- cpu - Any way to check the clock speed of my processor? - Ask Ubuntu
- What is the correct way to view your CPU speed on Linux? - Unix & Linux Stack Exchange
- linux - How to determine ARMv8 CPU's frequency? - Stack Overflow
- Check CPU Temp on Linux {3 Methods} | phoenixNAP KB
- Cpu EDC is high - AMD Community
- 被误解的CPU利用率、超线程、动态调频 —— CPU 性能之迷 Part 1 – Mark Zhu 的博客
- 谁动了我的 CPU 频率 —— CPU 性能之迷 Part 2 – Mark Zhu 的博客
- Multi-core Processors: Does each 'core' run at the full clock speed or some fraction of the full clock frequency? - Quora
cat /proc/cpuinfo
cat /proc/cpuinfo | egrep '^processor|^physical|^core id'
numactl --hardware
lscpu
cpupower frequency-info
cpupower -c all frequency-info
lshw -c cpu
lshw -json -c cpu
tuning
- 鳥哥私房菜 - 高效能電腦的程序優化
- SLES 15 SP5 | System Analysis and Tuning Guide | Power management
- Balancing Power and Performance in the Linux Kernel
- kernel.org/doc/Documentation/cpu-freq/intel-pstate.txt
- intel_pstate CPU Performance Scaling Driver — The Linux Kernel documentation
- CPU Performance Scaling — The Linux Kernel documentation
- For this reason, CPUFreq allows scaling drivers to bypass the governor layer and implement their own performance scaling algorithms. That is done by the intel_pstate scaling driver.
- CPU frequency scaling - ArchWiki
- HPC Cluster Tuning Guide on Intel® Xeon® processor platforms
- For HPC clusters, the goal is to reduce workload runtimes for applications using MPI libraries and high-performance fabrics
- linux - Cannot set CPU frequency - Unix & Linux Stack Exchange
- 18.04 - How to update CPU frequency policy? - Ask Ubuntu
- windows - Intel CPU using low clock for no reason - Super User
- 再谈CPU的电源管理(如何做到稳定全核睿频?) | C0reFast记事本
- Maximum CPU frequency is not maintained on Intel CPUs - Red Hat Customer Portal
- Max CPU Frequency Reported by cpupower Differs Between intel_pstate and acpi_cpufreq drivers - Red Hat Customer Portal
- linux - How to set specific cpu frequency when using intel_pstate - Stack Overflow
- Maximum CPU frequency is not maintained on Intel CPUs - Red Hat Customer Portal
- HWP uses hardware information (aperf/mperf counters) to determine the "best" frequency for the cpus.
- For example, if a user requested 800MHz, the hardware using system temperature information, states of other CPUs and other factors may determine that a better frequency for the workload is really 900MHz and will raise the frequencies temporarily to that value.
- 服务器的能耗控制以及高性能模式配置(Dell) | C0reFast记事本
- CPU frequency always at 200Mhz [Solved] / Kernel & Hardware / Arch Linux Forums
- intel-pstate
- 更換CPU driver - HackMD
- linux - HOW TO FORCEFULLY DISABLE intel_pstate? intel_pstate is enabled on reboot even with intel_pstate=disable option in grub - Stack Overflow
- cpu - Permanently setting intel pstate driver to "passive" - Ask Ubuntu
- 從Grub設定修改CPU效能調整驅動參數 – Musicha ___音創筆電
- SLES 15 SP2 | 管理指南 | 開機載入程式 GRUB 2
- 編輯 /etc/default/grub 後,請使用 grub2-mkconfig -o /boot/grub2/grub.cfg 更新主要組態檔案
- Chapter 17. Tuning CPU frequency to optimize energy consumption Red Hat Enterprise Linux 8 | Red Hat Customer Portal
- intel cpu
grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_driver
grep . /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
grep . /sys/devices/system/cpu/cpu0/cpufreq/*
turbostat
driver - acpi-cpufreq - intel_pstate
Hardware P-States (HWP)
Driver
Init System
Boot method + Install target
Bootable ISO with mount ISO method
- Disk installation with autoinstall
- Live CD
grub
Live CD for redhat => Failure
- eight-livecd/ks/el8-livemedia-minimal.ks at master · alphacc/eight-livecd
- lorax/docs/fedora-livemedia.ks at master · weldr/lorax
- 1722595 – When building an image with livemedia-creator and a kickstart, redhat-logos must be manually added to kickstart
- Kickstart for Rocky 8.7 with e16 and icewm DE’s - Rocky Linux Help & Support - Rocky Linux Forum
- Directory not found after successful ISO build · Issue #1146 · weldr/lorax
- Building Discovery Image on EL8 - Development - TheForeman
# livemedia-creator
sudo dnf install lorax
# kvm
grep -E '(vmx|svm)' /proc/cpuinfo
sudo dnf install qemu-kvm libvirt virt-install
lsmod | grep kvm
sudo systemctl start libvirtd
sudo systemctl enable libvirtd
rhel9.ks
lang en_US.UTF-8
keyboard us
timezone UTC --isUtc
auth --useshadow --passalgo=sha512
selinux --enforcing
firewall --enabled --service=ssh
services --enabled=sshd,NetworkManager
shutdown
# System bootloader configuration
bootloader --location=none
# Clear blank disks or all existing partitions
clearpart --all --initlabel
rootpw rootme
# Disk partitioning information
reqpart
part / --size=6656
%packages
@core
kernel
dracut-live
redhat-logos
memtest86+
efibootmgr
grub2-efi
grub2
shim
syslinux
%end
%post --log=/var/log/kickstart-post.log
# Optional post-install scripts
echo "LiveCD without GNOME created successfully!" > /etc/motd
%end
livemedia-creator --iso /tmp/rhel-9.3-x86_64-dvd.iso \
--ks=rhel9.ks --make-iso --releasever=9 \
--volid=MyLiveCD \
--resultdir=/var/tmp/livecd --nomacboot
livemedia-creator --iso /tmp/rhel-9.3-x86_64-dvd.iso \
--ks=rhel9.ks --make-iso --releasever=9 \
--iso-only --iso-name=MyLiveCD.iso --volid=MyLiveCD \
--resultdir=/var/tmp/livecd --nomacboot
PXE boot
ipxe