银河麒麟高级服务器v10 sp1 iso镜像定制

这篇具有很好参考价值的文章主要介绍了银河麒麟高级服务器v10 sp1 iso镜像定制。希望对大家有所帮助。如果存在错误或未考虑完全的地方,请大家不吝赐教,您也可以点击"举报违法"按钮提交疑问。

一 、下载银河麒麟高级服务器镜像

https://www.kylinos.cn/support/trial.html?pid=1

二 、使用VMware Workstation 16安装Kylin V10 SP1 服务器原版系统

      安装选择最小化安装

三 、制作ISO过程操作记录

1 虚拟机下挂载原版镜像

1) 查看光盘是否已挂载

ls -l /dev/cdrom |grep cd

2) 将ISO所在的/dev/cdrom挂载到/media

mount /dev/cdrom /media

2 安装制作发行版的工具

yum -y install createrepo mkisofs isomd5sum rsync

3 同步光盘文件到制作ISO的目录

#同步/media下的文件到/ISO路径下,除了Packagesrepodata文件夹

/usr/bin/rsync -a --exclude=Packages/ --exclude=repodata/ /media/ /ISO/

# /ISO/文件夹下新建Packagesrepodata文件夹

mkdir -p /ISO/{Packages,repodata}

4 拷贝当前系统已安装的软件包到/ISO/Packages目录下(最好还是拷贝全量的原Packages下的安装包,或者是yum安装过后再生成install.log否则依赖包会不完整)

1) 生成install.log

rpm -qa >> /root/install.log

2) 拷贝已安装rpm

awk '{print $0}'  /root/install.log |xargs -i cp /media/Packages/{}.rpm /ISO/Packages/

5 配置yum下载指定软件包列表(rpms_list.txt)的所有依赖包

#!/bin/sh  

for line in `cat /root/rpms_list.txt`

    do

       echo "download file>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>and it's denpendies"$line

     yum install -y --downloadonly --downloaddir=/root/test/ $line

#或者先安装yum -y install yum-utilsyumdownloader $line

    done

#yum查找.so或者某个依赖在哪个rpm包中

yum provides {.so名或者依赖名字}

#拷贝包到指定目录

cp /root/test/* /ISO/Packages/

6 修改isolinux.cfg文件(legacy模式)

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 Kylin Linux Advanced Server V10
menu vshift 8
menu rows 18
menu margin 8
#menu hidden
menu helpmsgrow 15
menu tabmsgrow 13
menu width 80

# 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 linux
  menu default
  menu label ^Install Kylin Linux Advanced Server V10
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=Kylin-Server-10 inst.ks=cdrom:/isolinux/ks.cfg video=efifb:on quiet

label check
  menu label Test this ^media & install Kylin Linux Advanced Server V10
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=Kylin-Server-10 rd.live.check video=efifb:on quiet

menu separator # insert an empty line

# utilities submenu
menu begin ^Troubleshooting
  menu title Troubleshooting

label vesa
  menu indent count 5
  menu label Install Kylin Linux Advanced Server V10 in ^basic graphics mode
  text help
        Try this option out if you're having trouble installing
        Kylin Linux Advanced Server V10.
  endtext
  kernel vmlinuz
  append initrd=initrd.img inst.stage2=hd:LABEL=Kylin-Server-10 nomodeset video=efifb:on quiet

label rescue
  menu indent count 5
  menu label ^Rescue a Kylin Linux Advanced Server 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=Kylin-Server-10 rescue console=tty1 video=efifb:on 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

inst.ks为ks.cfg文件位置;
inst.stage2为安装介质位置,hd:LABEL为介质标签,例如Kylin-Server-10。这个和后续生成ISO镜像文件的命令genisoimage的参数-V有关。
最好是把所有hd:LABEL后面的值都替换为一个后面会用到的字符串,如Kylin-Server-10

7 修改EFI/BOOT/grub.cfg文件(UEFI模式)

set default="0"
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 'Kylin-Server-10'

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Install Kylin Linux Advanced Server V10' --class fedora --class gnu-linux --class gnu --class os {
        linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Kylin-Server-10 inst.ks=cdrom:/isolinux/ks.cfg video=efifb:on quiet
        initrdefi /images/pxeboot/initrd.img

}
menuentry 'Test this media & install Kylin Linux Advanced Server V10' --class fedora --class gnu-linux --class gnu --class os {
        linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Kylin-Server-10 rd.live.check video=efifb:on quiet
        initrdefi /images/pxeboot/initrd.img
}
submenu 'Troubleshooting -->' {
        menuentry 'Install Kylin Linux Advanced Server V10 in basic graphics mode' --class fedora --class gnu-linux --class gnu --class os {
                linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Kylin-Server-10 nomodeset video=efifb:on quiet
                initrdefi /images/pxeboot/initrd.img
        }
        menuentry 'Rescue a Kylin Linux Advanced Server system' --class fedora --class gnu-linux --class gnu --class os {
                linuxefi /images/pxeboot/vmlinuz inst.stage2=hd:LABEL=Kylin-Server-10 rescue console=tty1 video=efifb:on quiet
                initrdefi /images/pxeboot/initrd.img
        }
}

8 修改自动化安装配置文件

cp /root/anaconda-ks.cfg /ISO/isolinux/ks.cfg

在%packages与%end中间加入自定义的脚步及命令

%post
mkdir -p /media/cdrom
mount -o loop /dev/sr0 /media/cdrom        
sh /media/cdrom/soft/mlnx.sh

systemctl disable systemd-networkd-wait-online.service
systemctl disable multipathd.service
systemctl disable tmp.mount
systemctl mask tmp.mount
systemctl stop systemd-tmpfiles-setup-dev.service
systemctl disable systemd-tmpfiles-setup-dev.service
systemctl mask systemd-tmpfiles-setup-dev.service

### do kylin post action
if [ -e /bin/.kylin-post-actions ];then
  /bin/bash -x /bin/.kylin-post-actions &> /var/log/.kylin-post-actions.log
fi

%end

9 制作修改comps文件


1) 进入/ISO目录,将“*-x86_64-comps.xml”文件拷贝到/ISO/repodata路径下,并重命名成comps.xml。
cp /media/repodata/*-x86_64-comps.xml  /ISO/repodata/comps.xml

2) 编辑comps文件

(1) 添加定制rpm包  (以ruby为例)

   <group>
    <id>ruby_pkgs</id>
    <name>ruby_pkgs</name>
    <name xml:lang="zh_CN">ruby</name>
    <name xml:lang="zh_TW">ruby</name>
    <name xml:lang="zh_HK">ruby</name>
    <description>ruy一种简单快捷的面向对象脚本语言。</description>
    <description xml:lang="zh_CN">ruy一种简单快捷的面向对象脚本语言。</description>
    <description xml:lang="zh_TW">ruy一种简单快捷的面向对象脚本语言。</description>
    <description xml:lang="zh_HK">ruy一种简单快捷的面向对象脚本语言。</description>
    <default>false</default>
    <uservisible>false</uservisible>
    <packagelist>

      <!--add by kylin:ying-->
       <packagereq type="default">readline</packagereq>
       <packagereq type="default">ruby</packagereq>
       <packagereq type="default">ruby-devel</packagereq>
       <packagereq type="default">rubygem-io-console</packagereq>
       <packagereq type="default">rubygem-json</packagereq>
       <packagereq type="default">rubygem-openssl</packagereq>
       <packagereq type="default">rubygem-psych</packagereq>
       <packagereq type="default">rubygem-rdoc</packagereq>
       <packagereq type="default">rubygems</packagereq>
       <packagereq type="default">ruby-help</packagereq>
       <packagereq type="default">ruby-irb</packagereq>
       <packagereq type="default">jdk1.8</packagereq>
       <packagereq type="default">tcsh</packagereq>        
    </packagelist>
  </group>

根据rpms_list.txt拼接packagereq

#!/bin/sh
for line in `cat rpms_list.txt`
    do
        echo " <packagereq type=\"default\">"$line"</packagereq>" >> /root/package.txt
    done
(2) 在指定的环境中添加定制的groupid 

<environment>
    <id>minimal-environment</id>
    <name>Minimal Install</name>
    <name xml:lang="zh_CN">最小安装</name>
    <name xml:lang="zh_TW">最小安裝</name>
    <name xml:lang="zh_HK">最小安裝</name>
    <description>Basic functionality.</description>
    <description xml:lang="zh_CN">基本功能。</description>
    <description xml:lang="zh_TW">基本功能。</description>
    <description xml:lang="zh_HK">基本功能。</description>
    <display_order>1</display_order>
    <grouplist>
      <groupid>core</groupid>
      <groupid>ruby_pkgs</groupid>        
    </grouplist>
    <optionlist>
      <!-- Add by kylin -->
      <groupid>debugging</groupid>
      <!-- End by kylin -->
      <groupid>standard</groupid>
    </optionlist>
  </environment>

10 切换到ISO/路径下,由comps.xml生成repodata包。注意当有新包加入,或者更新comps.xml文件,均需要重新生成repodata文件夹


createrepo -g repodata/comps.xml ./

11 制作ISO镜像,注意参数中的-V,和上面的isolinux.cfg文件保持一致

cd /ISO
genisoimage -joliet-long -V Kylin-Server-10 -o Kylin-Server-10.iso -input-charset utf-8 -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -cache-inodes -T -eltorito-alt-boot -e images/efiboot.img -no-emul-boot /ISO

12 制作镜像MD5值


implantisomd5 /ISO/Kylin-Server-10.iso文章来源地址https://www.toymoban.com/news/detail-457881.html

13 接下来安装系统,若配置自动安装则启动时全自动安装

到了这里,关于银河麒麟高级服务器v10 sp1 iso镜像定制的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处: 如若内容造成侵权/违法违规/事实不符,请点击违法举报进行投诉反馈,一经查实,立即删除!

领支付宝红包 赞助服务器费用

相关文章

  • 银河麒麟服务器v10 sp1 安装 redis

    1、下载redis安装包 https://download.redis.io/releases/ 本文下载redis-7.0.11.tar.gz包,请按照自己需求下载相应文件。 2、将下载后的.tar.gz压缩包上传到到服务器自定义文件夹下 本人上传为系统的下载文件夹下,可以直接上传至指定目录下: 使用cp复制文件到指定目录下:  root@xxx-pc:

    2024年02月12日
    浏览(44)
  • 银河麒麟服务器v10 sp1 nginx 部署项目

    上一篇:银河麒麟服务器v10 sp1 nginx开机自动启动_csdn_aspnet的博客-CSDN博客  由于项目为前后端分离,前端项目使用nginx部署,VUE项目打包后上传至银河麒麟服务器: 8063 为前端项目文件目录,修改配置 ,默认配置没有处理:  sudo systemctl stop nginx.service  sudo systemctl status ngi

    2024年02月15日
    浏览(36)
  • 银河麒麟服务器操作系统 V10 SP1 开启SSH服务

    此处显示已经安装了openssh。 如果此处没有任何输出显示,表示没有安装openssh 当发现没有安装openssh时,使下面的命令安装openssh: 如图所示,已经开启sshd服务。 如果显示未开启sshd服务,使用下列命令开启sshd服务 使用下面的命令查看ssh服务是否开机启动 如上图所示,ssh已经

    2023年04月22日
    浏览(34)
  • 银河麒麟V10SP1高级服务器版本离线RPM方式升级openssl openssh 自动化升级系统补丁实战实例全网唯一

    银河麒麟高级服务器操作系统简介: 银河麒麟高级服务器操作系统V10是针对企业级关键业务,适应虚拟化、云计算、大数据、工业互联网时代对主机系统可靠性、安全性、性能、扩展性和实时性等需求,依据CMMI5级标准研制的提供内生本质安全、云原生支持、自主平台深入优

    2024年02月15日
    浏览(74)
  • 银河麒麟服务器 v10 sp1 安装 .Net6.0

    系统版本、架构:  如果系统自带.netcore3,先卸载系统自带的.netcore3:  卸载.netcore3: 我的系统没有自带.netcore3,也没有yum命令。 下载二进制文件安装SDK: 下载 .NET 6.0 (Linux、macOS 和 Windows) 下载后将文件dotnet-sdk-6.0.411-linux-x64.tar.gz,上传至银河麒麟服务器: 我的第一步给文

    2024年02月12日
    浏览(49)
  • 银河麒麟V10SP1服务器系统同步外网源到本地

    系统环境:Kylin Linux Advanced Server release V10(SP1)/(Tercel)-aarch64-Build20/20210518 本文同步的是外网ARM的yum源仓库,若需要同步X86的yum源仓库,则需要修改yum配置文件的架构为X86,其他配置不变。 a)确定系统版本及网络情况 b)关闭系统防火墙和 selinux a)备份原yum配置文件 b)yum配

    2024年01月24日
    浏览(68)
  • 银河麒麟服务器v10 sp1 .Net6.0 上传文件错误

    上一篇:银河麒麟服务器v10 sp1 部署.Net6.0 http https_csdn_aspnet的博客-CSDN博客 .NET 6之前,在Linux服务器上安装 libgdiplus 即可解决,libgdiplus是System.Drawing.Common原生端跨平台实现的主要提供者,是开源mono项目。地址:GitHub - mono/libgdiplus: C-based implementation of the GDI+ API 因此,解决方法

    2024年02月12日
    浏览(31)
  • 银河麒麟服务器操作系统 V10 SP1 防火墙(firewalld)指令

    systemctl status firewalld (或者: systemctl status firewalld.service ,或者: systemctl is-active firewalld )active(running):表示防火墙已经开启。 1、开启: systemctl start firewalld 查看状态: systemctl status firewalld 2、关闭: systemctl stop firewalld 查看状态: systemctl status firewalld 3、重启: systemc

    2024年02月13日
    浏览(56)
  • 银河麒麟服务器V10SP1双内核更改低版本内核为第一引导项

    需要保留新内核的情况下使操作系统在下次启动默认加载的是旧内核。 1.1 UEFI传统的Legacy BIOS启动 grub引导文件路径不一致,先需要查看系统是UEFI启动还是传统的Legacy BIOS启动

    2024年02月03日
    浏览(40)
  • 银河麒麟服务器v10 sp1 部署 redis 及redis gui 客户端工具

    上一篇:银河麒麟服务器v10 sp1 redis开机自动启动_csdn_aspnet的博客-CSDN博客 本文介绍另一种redis安装方式及客户端工具安装。 Redis 是一种内存数据模型存储,可用作数据库、缓冲区和消息传递中继。它是开源的(BSD 许可)。字符串、散列、列表、集合、具有范围搜索的排序集

    2024年02月11日
    浏览(41)

觉得文章有用就打赏一下文章作者

支付宝扫一扫打赏

博客赞助

微信扫一扫打赏

请作者喝杯咖啡吧~博客赞助

支付宝扫一扫领取红包,优惠每天领

二维码1

领取红包

二维码2

领红包