# build_iso **Repository Path**: duan_pj/build_iso ## Basic Information - **Project Name**: build_iso - **Description**: 构建iso镜像 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 1 - **Created**: 2024-05-31 - **Last Updated**: 2024-10-24 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # build_iso #### 介绍 构建iso镜像 #### 使用说明 1. 添加自定义文件 将文件拷贝到/tmp/cfg_openEuler/usr_file, 使用此目录为跟目录,例如 ```bash usr_file/ └── etc ├── bb └── bb_duan ``` 2. 定制kernel cmdline 修改build_iso中的 image_config_kernel,例如: ```bash image_config_kernel="rd.lvm.lv=openeuler/root rd.lvm.lv=openeuler/swap video=VGA-1:640x480-32@60me console=tty0 crashkernel=1024M,high smmu.bypassdev=0x1000:0x17 smmu.bypassdev=0x1000:0x15 video=efifb:off sched_steal_node_limit=4 kpti=off mitigation=off" ``` 3. 启动时默认执行bash脚本 将文件拷贝到/tmp/cfg_openEuler/usr_install/hook/install_succ_hook 命名为 S00xxxx,例如: ```bash #!/bin/bash ############################################### # Description: wait for reboot # Parameter: param1:wait times # Return: 0-success, 1-failed ############################################### # 增加的内容 touch /mnt/disk/root/aaaa chroot /mnt/disk echo "/root/aaaa" > /root/b exit ############### function INIT_Wait_Reboot() { local count=$1 while [ "${count}" -gt 0 ] do echo -e " ${count} \c" ((count--)) sleep 1 done echo "" } echo "The System will be reboot after 5 seconds." INIT_Wait_Reboot 10 reboot sleep 60 ``` 4、增加软件包设置need_rpms,例如: ```bash need_rpms="mysql nginx" ```