【Linux】U盘安装的cfg引导文件配置

两个导引文件
isolinux.cfg文件

default vesamenu.c32
timeout 600display 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 CentOS 7
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 linelabel linuxmenu label ^Install AISAmenu defaultkernel vmlinuzappend vga=normal initrd=initrd.img inst.ks=hd:LABEL=AISA:/isolinux/ks.cfg inst.stage2=hd:LABEL=AISA ramdisk_size=65536 net.ifnames=0 biosdevname=0  ipv6.disable=1 rdloaddriver=igb nomodeset xdriver=vesa brokenmoudles=ast quietmenu end

下半部分是需要修改的,此外还删除了一些多余的选项,这些选项将会指引到安装何种系统上;
照着这个改吧,反正要注意这个AISA也要改对了

label linuxmenu label ^Install AISAmenu defaultkernel vmlinuzappend vga=normal initrd=initrd.img inst.ks=hd:LABEL=AISA:/isolinux/ks.cfg inst.stage2=hd:LABEL=AISA ramdisk_size=65536 net.ifnames=0 biosdevname=0  ipv6.disable=1 rdloaddriver=igb nomodeset xdriver=vesa brokenmoudles=ast quietmenu end

其中指向了了另一个引导文件是ks.cfg

ks.cfg文件,有删改避免泄漏

# File Managed by Puppetinstall  			# ==系统安装阶段==
lang en_US.UTF-8	# 设置系统语言
keyboard us			# 设置键盘
skipx				# 
text				
reboot
rootpw --iscrypted $1$xxxxxx$eeee	# 设置密码
authconfig --enableshadow --enablemd5	
selinux --disabled
timezone Asia/Shanghai	# 设置时区%packages	# ==需要的安装包==
@core
@base
@mail-server
-dovecot
-system-config-httpd
-system-config-printer-gui
-system-config-nfs
-system-config-samba
-ivtv-firmware
@Development tools
ncurses-devel
ntp
%end			# ==所需的安装包范围结束==%post --nochroot --log=/mnt/sysimage/root/ks-post.log  # ==拷贝文件必须在这个阶段==
#!/bin/sh
server_file=/mnt/install/repo/software/server.zip	# U盘目录一定是这/mnt/install/repo/
if [ -e ${server_file} ]; thencp -f ${server_file} /mnt/sysimage/root/
elseecho "server.zip not exist!"
fimgr_file=/mnt/install/repo/software/mgr.zip
if [ -e ${mgr_file} ]; thencp -f ${mgr_file} /mnt/sysimage/root/
elseecho "mgr.zip not exist!"
fi%end 	# ==拷贝文件阶段结束==%post  # 安装阶段,在这里写安装的那些命令
#!/bin/shsed -i 's/net.ifnames=0/net.ifnames=0 rdloaddriver=igb/g' /etc/default/grub
sed -i 's/crashkernel=auto/crashkernel=128M/g' /etc/default/grub
grub2-mkconfig -o /boot/grub2/grub.cfgsystemctl disable systemd-networkd-wait-online.service
systemctl disable multipathd.serviceif [ -e /root/server.zip ]; thenunzip -d /root/install -PrdN06360Ndr /root/server.ziprm -f /root/server.zip
elseecho "/root/server.zip not exist!"
fiif [ -e /root/mgr.zip ]; thenunzip -d /root/install -PrdN06360Ndr /root/mgr.zip rm -f /root/mgr.zip
fiset -x -v -e
exec < /dev/tty3 > /dev/tty3
chvt 3
(echoexport PATH=/usr/local/bin:$PATHif [ -d /root/install/ ]; thenchmod 777 /root/install/kylin_install.shecho "* * * * * root source ~/.bashrc && nohup /root/install/kylin_install.sh >> /root/install_detail 2>&1 &" > /etc/crontabelseecho "/root/install/ not exist"fi) 2>&1 | tee /root/post-kickstart.log%end

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.hqwc.cn/news/188472.html

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

串口通信

1.1 串口简介 在串口中 用0和1表示高低电平 VCC供电 设备A给设备B供电 如果各自都有供电的模块就不需要连接这个线 GND的连线是为了获取相同的电压基准 因为有时候获得电压各自判断的标准不一样 可能获得不一样的电压 如果想A发送数据给B那么蓝线不需要连接 如果想B发送给A那么…

Springboot升级为3.0.6

版本升级 Springboot升级为3.0.6 版本从原来的2.7.12换成了3.0.6 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>3.0.6</version><relativePath/> <…

Python系列:如何提高python程序代码的健壮性

前言 在编程的时候,我们难免会遇到一些不可靠的情况,比如网络请求失败,数据库连接超时等等。这些不确定性会让我们的程序容易出现各种错误和异常。那么如何来增加程序的容错性和健壮性呢? 可能大多数人会想到使用try except来进行异常捕捉进行失败重试(Retry)。虽然try-esc…

什么是好用的HR人才测评?

对于HR来说&#xff0c;选用一个合适的测评工具&#xff0c;我想不外乎以下几点&#xff1a; 1、成本可控 不是所有的HR都能申请到足够的资金&#xff0c;去做专业的人才测评&#xff0c;尤其是中小企业&#xff0c;这可是一笔不小 的开支。即使是基层普通岗位的成本&#xf…

【Spring】IoC容器的一些总结与补充

文章目录 1. 创建容器的两种方式相对路径导入绝对路径导入 2. 获取Bean的三种方式getBean后强转类型getBean内写明类别根据类别获取bean 3. 容器层次结构4. BeanFactory5. bean的总结6. 注入的总结 1. 创建容器的两种方式 相对路径导入 ApplicationContext ctx new ClassPat…

【计算机网络学习之路】网络基础1

文章目录 前言一. 计算机网络发展局域网和广域网 二. 网络协议三. OSI七层模型四. TCP/IP四层&#xff08;五层&#xff09;模型五. 计算机体系结构与网络协议栈六. 协议形式及局域网通信数据包封装与分用 七. 跨网络通信八. MAC地址与网络通信的理解结束语 前言 本系列文章是…

C语言再学习 -- 编程规范

C语言编程规范这部分一直想总结一下。现在终于付诸行动了。 其实之前讲过一些面试题&#xff0c;参看&#xff1a;嵌入式面试知识点总结 – C语言篇 里面已经有包含一部分了&#xff0c;比如《高质量C C编程指南》.林锐着.pdf。 此次主要参考 华为技术有限公司c语言编程规范 …

欧科云链研究院:DeFi 将要纳税?美国国税局召开听证会

出品&#xff5c;欧科云链研究院 作者&#xff5c;Matthew Lee 北京时间 11月15日&#xff0c;美国国税局&#xff08;IRS&#xff09;召开了一场备受瞩目的听证会&#xff0c;讨论扩大加密货币资产的征税范围。此次听证会囊括了诸多关键议题&#xff0c;包括用户隐私、必须报…

Arduino项目式编程教学前言

前言–先聊聊我的经历 在停更数年之后&#xff0c;还是打算重新开启Arduino编程教学这一项目&#xff1b;这几年间&#xff0c;我从Arduino编程开发教学&#xff0c;转到C及python教学&#xff0c;又到如今的高中数学教学&#xff0c;跨度竟如此之大&#xff0c;但始终未脱离教…

23111702[含文档+PPT+源码等]计算机毕业设计javaweb高校宿舍管理系统寝室管理

文章目录 **软件开发环境及开发工具&#xff1a;****项目功能介绍&#xff1a;****论文截图&#xff1a;****实现&#xff1a;****代码片段&#xff1a;** 编程技术交流、源码分享、模板分享、网课教程 &#x1f427;裙&#xff1a;776871563 软件开发环境及开发工具&#xff…

ubuntu20.04在docker下运行ros-noetic

经常折腾虚拟机各双系统 &#xff0c; 想着不如把docker利用起来&#xff0c;下面算是一个初学者使用docker运行ros的记录&#xff1a; 1. 安装 使用官方安装脚本自动安装 curl -fsSL https://test.docker.com -o test-docker.shsudo sh test-docker.sh验证是否安装成功 doc…

upload-labs关卡9(基于win特性data流绕过)通关思路

文章目录 前言一、靶场需要了解的知识1::$data是什么 二、靶场第九关通关思路1、看源码2、bp抓包修改后缀名3、检查是否成功上传 总结 前言 此文章只用于学习和反思巩固文件上传漏洞知识&#xff0c;禁止用于做非法攻击。注意靶场是可以练习的平台&#xff0c;不能随意去尚未授…