diff --git a/perl-xCAT/xCAT/data/discinfo.pm b/perl-xCAT/xCAT/data/discinfo.pm index 5f3b2724f..5d59a2707 100755 --- a/perl-xCAT/xCAT/data/discinfo.pm +++ b/perl-xCAT/xCAT/data/discinfo.pm @@ -135,6 +135,9 @@ our %distnames = ( "1299104542.844706" => "SL6", #x86_64 DVD ISO "1390839789.062069" => "SL6.5", #x86_64 DVD ISO Install + "1601956087.745957" => "ol7.9", # x86_64, Oracle Linux 7.9 + "1604965593.730885" => "ol8.3", # x86_64, Oracle Linux 8.3 + "1394111947.452332" => "pkvm2.1", # ppc64, PowerKVM "1413749127.352649" => "pkvm2.1.1", # ppc64, PowerKVM ); diff --git a/xCAT-server/share/xcat/install/ol/compute.ol7.pkglist b/xCAT-server/share/xcat/install/ol/compute.ol7.pkglist new file mode 120000 index 000000000..57567949a --- /dev/null +++ b/xCAT-server/share/xcat/install/ol/compute.ol7.pkglist @@ -0,0 +1 @@ +../rh/compute.rhels7.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/ol/compute.ol7.tmpl b/xCAT-server/share/xcat/install/ol/compute.ol7.tmpl new file mode 120000 index 000000000..f44d7121c --- /dev/null +++ b/xCAT-server/share/xcat/install/ol/compute.ol7.tmpl @@ -0,0 +1 @@ +../rh/compute.rhels7.tmpl \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/ol/compute.ol8.pkglist b/xCAT-server/share/xcat/install/ol/compute.ol8.pkglist new file mode 120000 index 000000000..ccb1fe4ef --- /dev/null +++ b/xCAT-server/share/xcat/install/ol/compute.ol8.pkglist @@ -0,0 +1 @@ +../rh/compute.rhels8.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/install/ol/compute.ol8.tmpl b/xCAT-server/share/xcat/install/ol/compute.ol8.tmpl new file mode 100644 index 000000000..746eb1ad5 --- /dev/null +++ b/xCAT-server/share/xcat/install/ol/compute.ol8.tmpl @@ -0,0 +1,59 @@ +#version=OL8 +# Use text install +text +# Use network installation +%include /tmp/repos +# Keyboard layouts +keyboard --vckeymap=us --xlayouts='us' +# System language +lang en_US.UTF-8 + +# Network information +#KICKSTARTNET# +# Root password +rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password# +# Not run the Setup Agent on first boot +firstboot --disable +# Do not configure the X Window System +skipx +# System services +#services --enabled="chronyd" +# System timezone +timezone #TABLE:site:key=timezone:value# --isUtc +# Partition clearing information +zerombr +clearpart --all --initlabel +#XCAT_PARTITION_START# +%include /tmp/partitionfile +#XCAT_PARTITION_END# + +# Do not configure any iptables rules +firewall --disable +selinux --disable +reboot + +%packages +#INCLUDE_DEFAULT_PKGLIST# + +%end + +%anaconda +pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +%end +%pre +{ +echo "Running Kickstart Pre-installation script..." +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rhels8# +} &>>/tmp/pre-install.log +%end +%post --interpreter=/bin/bash +mkdir -p /var/log/xcat/ +cat /tmp/pre-install.log >>/var/log/xcat/xcat.log +{ +echo "Running Kickstart Post-installation script..." +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat.ng# +#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rhels8# +} &>>/var/log/xcat/xcat.log +%end diff --git a/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.exlist b/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.exlist new file mode 120000 index 000000000..338644a02 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.exlist @@ -0,0 +1 @@ +../rh/compute.rhels7.x86_64.exlist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.pkglist b/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.pkglist new file mode 120000 index 000000000..1161417ef --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.pkglist @@ -0,0 +1 @@ +../rh/compute.rhels7.x86_64.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.postinstall b/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.postinstall new file mode 120000 index 000000000..f8605039f --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ol/compute.ol7.x86_64.postinstall @@ -0,0 +1 @@ +../rh/compute.rhels7.x86_64.postinstall \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.exlist b/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.exlist new file mode 120000 index 000000000..a6d9c0135 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.exlist @@ -0,0 +1 @@ +../rh/compute.rhels8.x86_64.exlist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.pkglist b/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.pkglist new file mode 120000 index 000000000..5ecd4c4d1 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.pkglist @@ -0,0 +1 @@ +../rh/compute.rhels8.x86_64.pkglist \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.postinstall b/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.postinstall new file mode 120000 index 000000000..3e16d254e --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ol/compute.ol8.x86_64.postinstall @@ -0,0 +1 @@ +../rh/compute.rhels8.x86_64.postinstall \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ol/dracut_047 b/xCAT-server/share/xcat/netboot/ol/dracut_047 new file mode 120000 index 000000000..fe26fce05 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ol/dracut_047 @@ -0,0 +1 @@ +../rh/dracut_047 \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/ol/geninitrd b/xCAT-server/share/xcat/netboot/ol/geninitrd new file mode 120000 index 000000000..073e03e56 --- /dev/null +++ b/xCAT-server/share/xcat/netboot/ol/geninitrd @@ -0,0 +1 @@ +../rh/geninitrd \ No newline at end of file diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 0620ec5af..e457304f5 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -365,6 +365,14 @@ if($onlyinitrd){ $yumcmd .= "--setopt=module_platform_id=platform:el" . $majorrel . " "; } } + + if ($osver =~ /^ol\D*(\d*)[.\d]*.*$/) { + $majorrel = $1; + if ($majorrel > 7) { + $yumcmd .= "--releasever=" . $majorrel . " "; + $yumcmd .= "--setopt=module_platform_id=platform:el" . $majorrel . " "; + } + } foreach (0 .. $repnum) { $yumcmd .= "--enablerepo=$osver-$arch-$_ "; @@ -784,6 +792,18 @@ if (-e "$rootimg_dir/etc/yum.repos.d/CentOS-Base.repo") { } # +#-- Oracle Linux, disable internet repositories +if (-e "$rootimg_dir/etc/yum.repos.d/oracle-linux-ol8.repo") { + my $repo_content = `sed -e '/enabled/d' $rootimg_dir/etc/yum.repos.d/oracle-linux-ol8.repo | sed -e '/^gpgkey/i enabled=0'`; + system("echo '$repo_content' > $rootimg_dir/etc/yum.repos.d/oracle-linux-ol8.repo"); +} + +if (-e "$rootimg_dir/etc/yum.repos.d/uek-ol8.repo") { + my $repo_content = `sed -e '/enabled/d' $rootimg_dir/etc/yum.repos.d/uek-ol8.repo | sed -e '/^gpgkey/i enabled=0'`; + system("echo '$repo_content' > $rootimg_dir/etc/yum.repos.d/uek-ol8.repo"); +} +# + #-- run postinstall script unless ($imagename) { $postinstall_filename = imgutils::get_profile_def_filename($osver, $profile, $arch, $customdir, "postinstall"); @@ -1005,6 +1025,11 @@ sub mkinitrd_dracut { $dracutmoduledir = "$rootimg_dir/usr/lib/dracut/modules.d/"; } + # For whatever reasons Oracle Linux have both /usr/lib/dracut and /usr/share/dracut folders + # so we just check if it /etc/oracle-release exists and force the correct path + if ((-f "$rootimg_dir/etc/oracle-release")) { + $dracutmoduledir = "$rootimg_dir/usr/lib/dracut/modules.d/"; + } if ($dracutver >= "033") { my $perm = (stat("$fullpath/$dracutdir/patch/syslog/module-setup.sh"))[2]; @@ -1950,6 +1975,10 @@ sub using_systemd { if ($1 >= 7) { return 1; } + } elsif ($os =~ /ol(\d+)/) { + if ($1 >= 7) { + return 1; + } } elsif ($os =~ /rhelhpc(\d+)/) { if ($1 >= 7) { return 1;