CentOS逐步自动化装机系列

基于http服务的半自动化安装

System Environment

[root@centos8 ~]#cat /etc/redhat-release
CentOS Linux release 8.4.2105
[root@centos8 ~]#uname -r
4.18.0-305.3.1.el8.x86_64

CentOS8配置

# 安装必须软件
yum install -y httpd && systemctl enable --now httpd
# 在httpd的默认发布目录中创建挂载镜像的文件夹
mkdir -pv /var/www/html/{7,ks}

#挂载CentOS7的光盘镜像

mount /dev/sr0 /var/www/html/7/

编写自动化应答文件

由于CentOS8上没有图形化的编写自动化应答文件了,在centos7上编写即可

[root@centos7 ~]#yum install -y system-config-kickstart

报错

如果有提示报错如下

file /usr/share/dbus-1/services/org.freedesktop.PackageKit.service from install of gnome-software-3.28.2-3.el7.x86_64 conflicts with file from package gnome-packagekit-3.14.3-5.el7.x86_64

解决:

[root@centos7 ~]#yum remove gnome-packagekit-3.14.3-5.el7.x86_64
[root@centos7 ~]#yum install -y system-config-kickstart

运行

软件是图形化的界面,在xshell中运行需要开启Xmanager - Passive

[root@centos7 ~]#export DISPLAY=10.0.0.1:0.0
[root@centos7 ~]#system-config-kickstart

按照提示一步一步配置就好了

报错

若报错仓库包找不到
在这里插入图片描述
解决:
打开yum的repo配置文件
[Base]更改为[development]即可
配置完毕点击右上角的file 保存文件

生成的配置文件如下

[root@centos7 ~]#cat /root/centos7.cfg

#platform=x86, AMD64, 或 Intel EM64T
#version=DEVEL
# Install OS instead of upgrade
install
# Keyboard layouts
keyboard 'us'
# Root password
rootpw --plaintext 123456
# System language
lang en_US
# System authorization information
auth  --useshadow  --passalgo=sha512
# Use text mode install
text
firstboot --disable
# SELinux configuration
selinux --disabled

# Firewall configuration
firewall --disabled
# Network information
network  --bootproto=dhcp --device=eth0
# Reboot after installation
reboot
# System timezone
timezone Africa/Abidjan
# Use network installation
url --url="http://10.0.0.5/7/"
# System bootloader configuration
bootloader --append="net.ifnames=0" --location=mbr
# Clear the Master Boot Record
zerombr
# Partition clearing information
clearpart --all --initlabel
# Disk partitioning information
part / --fstype="xfs" --size=10000
part /boot --fstype="xfs" --size=1000
part swap --fstype="swap" --size=2048

%post
mkdir /etc/yum.repos.d/bak
mv /etc/yum.repos.d/*.repo /etc/yum.repos.d/bak
cat > /etc/yum.repos.d/base.repo <<EOF
[BaseOS]
[Base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=0

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
enabled=1

#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/extras/$basearch/
gpgcheck=0
enabled=1

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=0
enabled=0
EOF
%end

%packages
@development
%end

复制配置文件到CentOS8

scp ks7.cfg 10.0.0.5:/var/www/html/ks/centos7.cfg

测试

新建虚拟机

挂载网络安装的启动镜像CentOS-7-x86_64-NetInstall-2009.iso
开机启动在grub菜单界面按下esc
出现boot提示符 输入 linux ks=http://10.0.0.5/ks/centos7.cfg
回车即可

PXE

System Version

[root@centos7 ~]#cat /etc/redhat-release
CentOS Linux release 7.2.1511 (Core)
[root@centos7 ~]#uname -r
3.10.0-327.el7.x86_64

解决依赖服务


cobbler

安装
由于cobbler依赖python2,centos8默认没有python2,所以在centos7上安装

[root@centos7 ~]#yum install cobbler -y

启动
连同依赖的服务一并启动,
DHCP服务启动时,若是在vmware中测试,要把vmware的DHCP服务停掉

[root@centos7 ~]#systemctl enable --now cobblerd httpd tftp dhcpd
Created symlink from /etc/systemd/system/multi-user.target.wants/cobblerd.service to /usr/lib/systemd/system/cobblerd.service.
Created symlink from /etc/systemd/system/multi-user.target.wants/httpd.service to /usr/lib/systemd/system/httpd.service.
Job for dhcpd.service failed because the control process exited with error code. See "systemctl status dhcpd.service" and "journalctl -xe"

配置

[root@centos7 ~]#cobbler check
The following are potential configuration items that you may want to fix:

1 : The 'server' field in /etc/cobbler/settings must be set to something other than localhost, or kickstarting features will not work.  Thiolvable hostname or IP for the boot server as reachable by all machines that will use it.
2 : For PXE to be functional, the 'next_server' field in /etc/cobbler/settings must be set to something other than 127.0.0.1, and should ma boot server on the PXE network.
3 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:
    https://github.com/cobbler/cobbler/wiki/Selinux
4 : Some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you onlx86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this messles in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobblommand is the easiest way to resolve these requirements.
5 : enable and start rsyncd.service with systemctl
6 : debmirror package is not installed, it will be required to manage debian deployments and repositories
7 : The default password used by the sample templates for newly installed machines (default_password_crypted in /etc/cobbler/settings) is sler' and should be changed, try: "openssl passwd -1 -salt 'random-phrase-here' 'your-password-here'" to generate new one
8 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use the

Restart cobblerd and then run 'cobbler sync' to apply changes.

[root@centos7 ~]#vim /etc/cobbler/settings
server: 10.0.0.16
next_server: 10.0.0.16

openssl生成cobbler密码,

[root@centos7 ~]#openssl passwd -1 123456
$1$LMXARhmD$bMrkaetRhr.nfxOSyF.TC/

把生成的密码写入配置文件

[root@centos7 ~]#vim /etc/cobbler/settings
default_password_crypted: "$1$LMXARhmD$bMrkaetRhr.nfxOSyF.TC/"

重启服务

[root@centos7 ~]#systemctl restart cobblerd.service
[root@centos7 ~]#cobbler check
The following are potential configuration items that you may want to fix:

1 : SELinux is enabled. Please review the following wiki page for details on ensuring cobbler works correctly in your SELinux environment:
    https://github.com/cobbler/cobbler/wiki/Selinux
2 : Some network boot-loaders are missing from /var/lib/cobbler/loaders, you may run 'cobbler get-loaders' to download them, or, if you only want to handle x86/x86_64 netbooting, you may ensure that you have installed a *recent* version of the syslinux package installed and can ignore this message entirely.  Files in this directory, should you want to support all architectures, should include pxelinux.0, menu.c32, elilo.efi, and yaboot. The 'cobbler get-loaders' command is the easiest way to resolve these requirements.
3 : enable and start rsyncd.service with systemctl
4 : debmirror package is not installed, it will be required to manage debian deployments and repositories
5 : fencing tools were not found, and are required to use the (optional) power management features. install cman or fence-agents to use them

Restart cobblerd and then run 'cobbler sync' to apply changes.

获取一些配置文件

cobbler get-loaders

记录报错

Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/README already exists, not overwriting existing content, use --force if you wish to update
Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/COPYING.elilo already exists, not overwriting existing content, use --force if you wish to update
Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/COPYING.yaboot already exists, not overwriting existing content, use --force if you wish to update
Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/COPYING.syslinux already exists, not overwriting existing content, use --force if you wish to update
Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/elilo-ia64.efi already exists, not overwriting existing content, use --force if you wish to update
Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/yaboot already exists, not overwriting existing content, use --force if you wish to update
Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/pxelinux.0 already exists, not overwriting existing content, use --force if you wish to update
Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/menu.c32 already exists, not overwriting existing content, use --force ifyou wish to update
Mon Aug 30 12:56:12 2021 - INFO | path /var/lib/cobbler/loaders/grub-x86.efi already exists, not overwriting existing content, use --force if you wish to update
Mon Aug 30 12:56:12 2021 - INFO | downloading https://cobbler.github.io/loaders/grub-0.97-x86_64.efi to /var/lib/cobbler/loaders/grub-x86_64.efi
Mon Aug 30 12:56:12 2021 - INFO | Exception occured: <class 'urlgrabber.grabber.URLGrabError'>
Mon Aug 30 12:56:12 2021 - INFO | Exception value: [Errno 14] curl#35 - "TCP connection reset by peer"
Mon Aug 30 12:56:12 2021 - INFO | Exception Info:
  File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 82, in run
    rc = self._run(self)
   File "/usr/lib/python2.7/site-packages/cobbler/remote.py", line 176, in runner
    return self.remote.api.dlcontent(self.options.get("force",False), self.logger)
   File "/usr/lib/python2.7/site-packages/cobbler/api.py", line 735, in dlcontent
    return grabber.run(force)
   File "/usr/lib/python2.7/site-packages/cobbler/action_dlcontent.py", line 73, in run
    urlgrabber.grabber.urlgrab(src, filename=dst, proxies=proxies)
   File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 773, in urlgrab
    return default_grabber.urlgrab(url, filename, **kwargs)
   File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1220, in urlgrab
    return _run_callback(opts.failfunc, opts)
   File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1071, in _run_callback
    return cb(obj)
   File "/usr/lib/python2.7/site-packages/urlgrabber/grabber.py", line 1065, in _do_raise
    raise obj.exception

Mon Aug 30 12:56:12 2021 - ERROR | ### TASK FAILED ###

解决:

[root@centos7 cobbler]#rm -rf /var/log/cobbler/tasks/*

然后重新执行命令即可

[root@centos7 loaders]#cobbler get-loaders
task started: 2021-08-30_125721_get_loaders
task started (id=Download Bootloader Content, time=Mon Aug 30 12:57:21 2021)
path /var/lib/cobbler/loaders/README already exists, not overwriting existing content, use --force
path /var/lib/cobbler/loaders/COPYING.elilo already exists, not overwriting existing content, use -
path /var/lib/cobbler/loaders/COPYING.yaboot already exists, not overwriting existing content, use
path /var/lib/cobbler/loaders/COPYING.syslinux already exists, not overwriting existing content, us
path /var/lib/cobbler/loaders/elilo-ia64.efi already exists, not overwriting existing content, use
path /var/lib/cobbler/loaders/yaboot already exists, not overwriting existing content, use --force
path /var/lib/cobbler/loaders/pxelinux.0 already exists, not overwriting existing content, use --fo
path /var/lib/cobbler/loaders/menu.c32 already exists, not overwriting existing content, use --forc
path /var/lib/cobbler/loaders/grub-x86.efi already exists, not overwriting existing content, use --
path /var/lib/cobbler/loaders/grub-x86_64.efi already exists, not overwriting existing content, use
*** TASK COMPLETE ***
[root@centos7 ~]#tree /var/lib/tftpboot/
/var/lib/tftpboot/
|-- boot
|-- centos7
|   |-- initrd.img
|   `-- vmlinuz
|-- etc
|-- grub
|-- images
|-- images2
|-- ppc
|-- pxelinux.0
|-- pxelinux.cfg
|   `-- default
|-- s390x
|-- splash.png
`-- vesamenu.c32

9 directories, 6 files

执行同步

[root@centos7 loaders]#cobbler sync
task started: 2021-08-30_131419_sync
task started (id=Sync, time=Mon Aug 30 13:14:19 2021)
running pre-sync triggers
cleaning trees
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/images
copying bootloaders
copying: /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
copying: /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
copying: /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
copying: /usr/share/syslinux/memdisk -> /var/lib/tftpboot/memdisk
copying: /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying: /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
copying distros to tftpboot
copying images
generating PXE configuration files
generating PXE menu structure
rendering TFTPD files
generating /etc/xinetd.d/tftp
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.manage_genders
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

[root@centos7 loaders]#tree /var/lib/tftpboot/
/var/lib/tftpboot/
|-- boot
|   `-- grub
|       `-- menu.lst
|-- centos7
|   |-- initrd.img
|   `-- vmlinuz
|-- etc
|-- grub
|   |-- efidefault
|   |-- grub-x86_64.efi
|   |-- grub-x86.efi
|   `-- images -> ../images
|-- images
|-- images2
|-- memdisk
|-- menu.c32
|-- ppc
|-- pxelinux.0
|-- pxelinux.cfg
|   `-- default
|-- s390x
|   `-- profile_list
|-- splash.png
|-- vesamenu.c32
|-- vmlinuz
`-- yaboot

11 directories, 15 files

DHCP

#主配置文件修改为接管DHCP服务
[root@centos7 ~]#vim /etc/cobbler/settings
manage_dhcp: 1

[root@centos7 ~]#systemctl restart cobblerd

[root@centos7 ~]#vim /etc/cobbler/dhcp.template
subnet 10.0.0.0 netmask 255.255.255.0 {
     option routers             10.0.0.160;
     option domain-name-servers 223.5.5.5;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        10.0.0.180 10.0.0.190;
     default-lease-time         21600;
     max-lease-time             43200;
     next-server                $next_server;
     class "pxeclients" {
          match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
          if option pxe-system-type = 00:02 {
                  filename "ia64/elilo.efi";
          } else if option pxe-system-type = 00:06 {
                  filename "grub/grub-x86.efi";
          } else if option pxe-system-type = 00:07 {
                  filename "grub/grub-x86_64.efi";
          } else if option pxe-system-type = 00:09 {
                  filename "grub/grub-x86_64.efi";
          } else {
                  filename "pxelinux.0";
          }
     }

}

同步配置

[root@centos7 ~]#cobbler sync
task started: 2021-08-30_132502_sync
task started (id=Sync, time=Mon Aug 30 13:25:02 2021)
running pre-sync triggers
cleaning trees
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/images
removing: /var/lib/tftpboot/grub/grub-x86.efi
removing: /var/lib/tftpboot/grub/grub-x86_64.efi
removing: /var/lib/tftpboot/grub/efidefault
removing: /var/lib/tftpboot/s390x/profile_list
copying bootloaders
copying: /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
copying: /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
copying: /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
copying: /usr/share/syslinux/memdisk -> /var/lib/tftpboot/memdisk
copying: /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying: /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
copying distros to tftpboot
copying images
generating PXE configuration files
generating PXE menu structure
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
rendering TFTPD files
generating /etc/xinetd.d/tftp
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout:
received on stderr:
running: service dhcpd restart
received on stdout:
received on stderr: Redirecting to /bin/systemctl restart  dhcpd.service

running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.manage_genders
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

[root@centos7 ~]#cat /etc/dhcp/dhcpd.conf
# ******************************************************************
# Cobbler managed dhcpd.conf file
# generated from cobbler dhcp.conf template (Mon Aug 30 05:25:03 2021)
# Do NOT make changes to /etc/dhcpd.conf. Instead, make your changes
# in /etc/cobbler/dhcp.template, as /etc/dhcpd.conf will be
# overwritten.
# ******************************************************************

ddns-update-style interim;

allow booting;
allow bootp;

ignore client-updates;
set vendorclass = option vendor-class-identifier;

option pxe-system-type code 93 = unsigned integer 16;

subnet 10.0.0.0 netmask 255.255.255.0 {
     option routers             10.0.0.160;
     option domain-name-servers 223.5.5.5;
     option subnet-mask         255.255.255.0;
     range dynamic-bootp        10.0.0.180 10.0.0.190;
     default-lease-time         21600;
     max-lease-time             43200;
     next-server                10.0.0.160;
     class "pxeclients" {
          match if substring (option vendor-class-identifier, 0, 9) = "PXEClient";
          if option pxe-system-type = 00:02 {
                  filename "ia64/elilo.efi";
          } else if option pxe-system-type = 00:06 {
                  filename "grub/grub-x86.efi";
          } else if option pxe-system-type = 00:07 {
                  filename "grub/grub-x86_64.efi";
          } else if option pxe-system-type = 00:09 {
                  filename "grub/grub-x86_64.efi";
          } else {
                  filename "pxelinux.0";
          }
     }

}

# group for Cobbler DHCP tag: default
group {
}

导入镜像

#挂载CentOS7的光盘
[root@centos7 ~]#mount /dev/sr0 /mnt/
mount: /dev/sr0 is write-protected, mounting read-only

#导入
[root@centos7 ~]#cobbler import --name=centos-7.2-x86_64 --path=/mnt/ --arch=x86_64
task started: 2021-08-30_145748_import
task started (id=Media import, time=Mon Aug 30 14:57:48 2021)
Found a candidate signature: breed=redhat, version=rhel6
Found a candidate signature: breed=redhat, version=rhel7
Found a matching signature: breed=redhat, version=rhel7
Adding distros from path /var/www/cobbler/ks_mirror/centos-7.2-x86_64:
creating new distro: centos-7.2-x86_64
trying symlink: /var/www/cobbler/ks_mirror/centos-7.2-x86_64 -> /var/www/cobbler/links/centos-7.2-x86_64
creating new profile: centos-7.2-x86_64
associating repos
checking for rsync repo(s)
checking for rhn repo(s)
checking for yum repo(s)
starting descent into /var/www/cobbler/ks_mirror/centos-7.2-x86_64 for centos-7.2-x86_64
processing repo at : /var/www/cobbler/ks_mirror/centos-7.2-x86_64
need to process repo/comps: /var/www/cobbler/ks_mirror/centos-7.2-x86_64
looking for /var/www/cobbler/ks_mirror/centos-7.2-x86_64/repodata/*comps*.xml
Keeping repodata as-is :/var/www/cobbler/ks_mirror/centos-7.2-x86_64/repodata
*** TASK COMPLETE ***

查看镜像

[root@centos7 ~]#ls /var/www/cobbler/ks_mirror
centos-7.2-x86_64  config

到此已经可以实现自动化安装了,ks应答文件cobbler会默认配置一个

使用UEFI引导测试

更改配置文件

[root@centos7 ~]#vim /etc/cobbler/pxe/efidefault.template
timeout=100

#同步配置
[root@centos7 ~]#cobbler sync
task started: 2021-08-30_150801_sync
task started (id=Sync, time=Mon Aug 30 15:08:01 2021)
running pre-sync triggers
cleaning trees
removing: /var/www/cobbler/images/centos-7.2-x86_64
removing: /var/lib/tftpboot/pxelinux.cfg/default
removing: /var/lib/tftpboot/grub/images
removing: /var/lib/tftpboot/grub/grub-x86.efi
removing: /var/lib/tftpboot/grub/grub-x86_64.efi
removing: /var/lib/tftpboot/grub/efidefault
removing: /var/lib/tftpboot/images/centos-7.2-x86_64
removing: /var/lib/tftpboot/s390x/profile_list
copying bootloaders
copying: /var/lib/cobbler/loaders/pxelinux.0 -> /var/lib/tftpboot/pxelinux.0
copying: /var/lib/cobbler/loaders/menu.c32 -> /var/lib/tftpboot/menu.c32
copying: /var/lib/cobbler/loaders/yaboot -> /var/lib/tftpboot/yaboot
copying: /usr/share/syslinux/memdisk -> /var/lib/tftpboot/memdisk
copying: /var/lib/cobbler/loaders/grub-x86.efi -> /var/lib/tftpboot/grub/grub-x86.efi
copying: /var/lib/cobbler/loaders/grub-x86_64.efi -> /var/lib/tftpboot/grub/grub-x86_64.efi
copying distros to tftpboot
copying files for distro: centos-7.2-x86_64
trying hardlink /var/www/cobbler/ks_mirror/centos-7.2-x86_64/images/pxeboot/vmlinuz -> /var/lib/tftpboot/images/centos-7.2-x86_64/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos-7.2-x86_64/images/pxeboot/initrd.img -> /var/lib/tftpboot/images/centos-7.2-x86_64/initrd.img
copying images
generating PXE configuration files
generating PXE menu structure
copying files for distro: centos-7.2-x86_64
trying hardlink /var/www/cobbler/ks_mirror/centos-7.2-x86_64/images/pxeboot/vmlinuz -> /var/www/cobbler/images/centos-7.2-x86_64/vmlinuz
trying hardlink /var/www/cobbler/ks_mirror/centos-7.2-x86_64/images/pxeboot/initrd.img -> /var/www/cobbler/images/centos-7.2-x86_64/initrd.img
Writing template files for centos-7.2-x86_64
rendering DHCP files
generating /etc/dhcp/dhcpd.conf
rendering TFTPD files
generating /etc/xinetd.d/tftp
processing boot_files for distro: centos-7.2-x86_64
cleaning link caches
running post-sync triggers
running python triggers from /var/lib/cobbler/triggers/sync/post/*
running python trigger cobbler.modules.sync_post_restart_services
running: dhcpd -t -q
received on stdout:
received on stderr:
running: service dhcpd restart
received on stdout:
received on stderr: Redirecting to /bin/systemctl restart  dhcpd.service

running shell triggers from /var/lib/cobbler/triggers/sync/post/*
running python triggers from /var/lib/cobbler/triggers/change/*
running python trigger cobbler.modules.manage_genders
running python trigger cobbler.modules.scm_track
running shell triggers from /var/lib/cobbler/triggers/change/*
*** TASK COMPLETE ***

验证是否生成启动菜单

[root@centos7 ~]#head -n 2 /var/lib/tftpboot/grub/efidefault
default=0
timeout=100

调试虚拟机启动界面为UEFI启动模式
在这里插入图片描述

Loading…

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值