修改kernel安装步骤在tools/mk-base-image中执行,修改vmlinuz为指定内核版本模式
This commit is contained in:
@@ -36,7 +36,7 @@ installer: builddir
|
||||
sed -i -e "s/%%SIZE_PART_DATA%%/$(SIZE_PART_DATA)/" $(TARGET_INSTALLER_DIR)/install.sh
|
||||
|
||||
sysroot-base: builddir
|
||||
$(TOOLSDIR)/mk-base-image $(CONFDIR)/yum.conf $(TARGET_SYSROOT_DIR)
|
||||
$(TOOLSDIR)/mk-base-image $(CONFDIR)/yum.conf $(TARGET_SYSROOT_DIR) $(PROJECTDIR)
|
||||
|
||||
sysroot-ansible: sysroot-base
|
||||
$(TOOLSDIR)/ansible-stage-one $(PROFILE_ID) $(PROJECTDIR) $(TARGET_SYSROOT_DIR)
|
||||
|
||||
@@ -8,15 +8,19 @@
|
||||
|
||||
yum_config=$1
|
||||
target=$2
|
||||
projectdir=$3
|
||||
kernel_version="5.4.113-1.el7.elrepo.x86_64"
|
||||
|
||||
set -ex
|
||||
|
||||
package_to_install="@base @core @debugging @directory-client @guest-agents
|
||||
@hardware-monitoring @network-file-system-client @performance @remote-system-management
|
||||
grub2 kernel kernel-devel epel-release ansible yum-utils ipmitool docker-ce docker-ce-cli containerd.io"
|
||||
|
||||
grub2 epel-release ansible yum-utils ipmitool docker-ce docker-ce-cli containerd.io"
|
||||
locak_package_to_install="$projectdir/package/kernel-lt-$kernel_version.rpm
|
||||
$projectdir/package/kernel-lt-devel-$kernel_version.rpm"
|
||||
|
||||
setopt="group_package_types=mandatory,default,optional"
|
||||
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $locak_package_to_install
|
||||
yum -c "$yum_config" --installroot="$target" -y --setopt=$setopt install $package_to_install
|
||||
|
||||
cat > "$target"/etc/sysconfig/network <<EOF
|
||||
@@ -42,7 +46,7 @@ rm -rf "$target"/etc/ld.so.cache
|
||||
rm -rf "$target"/var/cache/ldconfig/*
|
||||
|
||||
cd $target/boot
|
||||
ln -sf $(ls -1 vmlinuz-* | tail -1) vmlinuz
|
||||
ln -sf vmlinuz-$kernel_version vmlinuz
|
||||
ln -sf $(ls -1 initramfs-* | tail -1) initrd.img
|
||||
cd -
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,8 +0,0 @@
|
||||
GRUB_TIMEOUT=5
|
||||
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
|
||||
GRUB_DEFAULT=saved
|
||||
GRUB_DISABLE_SUBMENU=true
|
||||
GRUB_TERMINAL="serial console"
|
||||
GRUB_SERIAL_COMMAND="serial --speed=115200"
|
||||
GRUB_CMDLINE_LINUX="crashkernel=auto console=ttyS0,115200 intel_iommu=on iommu=pt pci=realloc,assign-busses"
|
||||
GRUB_DISABLE_RECOVERY="true"
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -1,42 +0,0 @@
|
||||
---
|
||||
- name: "copy framework rpms to destination server"
|
||||
copy:
|
||||
src: "{{ role_path }}/files/"
|
||||
dest: "/tmp/ansible_deploy/"
|
||||
|
||||
- name: "install kernels-ml"
|
||||
yum:
|
||||
name:
|
||||
#- /tmp/ansible_deploy/pkgconfig-0.27.1-4.el7.x86_64.rpm
|
||||
#- /tmp/ansible_deploy/zlib-devel-1.2.7-17.el7.x86_64.rpm
|
||||
#- /tmp/ansible_deploy/elfutils-libelf-devel-0.168-8.el7.x86_64.rpm
|
||||
- /tmp/ansible_deploy/kernel/kernel-lt-5.4.113-1.el7.elrepo.x86_64.rpm
|
||||
- /tmp/ansible_deploy/kernel/kernel-lt-devel-5.4.113-1.el7.elrepo.x86_64.rpm
|
||||
#装不上报错- /tmp/ansible_deploy/dkms-2.7.1-1.el7.noarch.rpm
|
||||
state: present
|
||||
register: t_kernel_ml
|
||||
|
||||
#- name: "set kernel-ml as default kernel"
|
||||
# command: /usr/sbin/grub2-set-default 0
|
||||
# when: t_kernel_ml.changed
|
||||
#
|
||||
#- name: "copy /etc/default/grub"
|
||||
# copy:
|
||||
# src: "{{ role_path }}/files/grub"
|
||||
# dest: "/etc/default"
|
||||
# when:
|
||||
# - tsg_access_type == 4 or tsg_access_type == 5
|
||||
# - t_kernel_ml.changed
|
||||
#
|
||||
#- name: "BIOS:grub2-mkconfig"
|
||||
# shell: grub2-mkconfig -o /boot/grub2/grub.cfg
|
||||
# when:
|
||||
# - tsg_access_type == 4 or tsg_access_type == 5
|
||||
# - t_kernel_ml.changed
|
||||
#
|
||||
#- name: "UEFI:grub2-mkconfig"
|
||||
# shell: grub2-mkconfig -o /boot/efi/EFI/centos/grub.cfg
|
||||
# when:
|
||||
# - tsg_access_type == 4 or tsg_access_type == 5
|
||||
# - t_kernel_ml.changed
|
||||
#
|
||||
@@ -10,7 +10,7 @@
|
||||
- /tmp/x710_drive/i40e-2.15.9-1.x86_64.rpm
|
||||
state: present
|
||||
|
||||
- name: "update initramfs"
|
||||
- name: "update depmod"
|
||||
shell: depmod -v 5.4.113-1.el7.elrepo.x86_64
|
||||
|
||||
- name: "update initramfs"
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#- {role: init-env, tags: init-env}
|
||||
- {role: init_runtime, tags: init_runtime}
|
||||
- {role: framework, tags: framework}
|
||||
- {role: kernel-ml, tags: kernel-ml}
|
||||
#- {role: kernel-ml, tags: kernel-ml}
|
||||
- {role: mrzcpd, tags: mrzcpd}
|
||||
- {role: tsg-9140-env, tags: tsg-9140-env}
|
||||
- {role: sapp, tags: sapp}
|
||||
|
||||
Reference in New Issue
Block a user