diff options
author | kelvin <xiubuzhe@sina.com> | 2023-12-21 02:04:31 +0800 |
---|---|---|
committer | kelvin <xiubuzhe@sina.com> | 2023-12-21 02:04:31 +0800 |
commit | f232a9316a0ebb281af1f9d8e0d261fcca658c24 (patch) | |
tree | 98dc4b3fa852f539ad3cdc4be9cf17a8b9a43976 | |
parent | 689ae7255b5d2958aba47f7c406394396ad482ea (diff) | |
download | sunhpc-f232a9316a0ebb281af1f9d8e0d261fcca658c24.tar.gz sunhpc-f232a9316a0ebb281af1f9d8e0d261fcca658c24.tar.bz2 sunhpc-f232a9316a0ebb281af1f9d8e0d261fcca658c24.zip |
add pxe files
-rw-r--r-- | lib/sunhpc/commands/pxelinux/build/cdpxe/__init__.py | 230 | ||||
-rw-r--r-- | share/pxeboot/default | 100 | ||||
-rw-r--r--[-rwxr-xr-x] | share/pxeboot/grubx64.efi | bin | 2211776 -> 2211776 bytes | |||
-rwxr-xr-x | share/pxeboot/kickstart/c7_gui.conf | 48 | ||||
-rwxr-xr-x | share/pxeboot/kickstart/c7_min.conf | 48 | ||||
-rwxr-xr-x | share/pxeboot/kickstart/ks-example.conf | 51 | ||||
-rwxr-xr-x | share/pxeboot/kickstart/r8_gui.conf | 54 | ||||
-rwxr-xr-x | share/pxeboot/kickstart/r8_min.conf | 41 | ||||
-rw-r--r-- | share/pxeboot/libcom32.c32 | bin | 0 -> 180668 bytes | |||
-rw-r--r-- | share/pxeboot/libutil.c32 | bin | 0 -> 22804 bytes | |||
-rw-r--r-- | share/pxeboot/lpxelinux.0 | bin | 74564 -> 0 bytes | |||
-rw-r--r-- | share/pxeboot/menu.c32 | bin | 0 -> 26272 bytes | |||
-rw-r--r--[-rwxr-xr-x] | share/pxeboot/shimx64.efi (renamed from share/pxeboot/BOOTX64.EFI) | bin | 944024 -> 944024 bytes | |||
-rw-r--r-- | share/pxeboot/vesamenu.c32 | bin | 0 -> 26788 bytes |
14 files changed, 419 insertions, 153 deletions
diff --git a/lib/sunhpc/commands/pxelinux/build/cdpxe/__init__.py b/lib/sunhpc/commands/pxelinux/build/cdpxe/__init__.py index e409e0a..7ba45e0 100644 --- a/lib/sunhpc/commands/pxelinux/build/cdpxe/__init__.py +++ b/lib/sunhpc/commands/pxelinux/build/cdpxe/__init__.py @@ -10,6 +10,14 @@ class Command(sunhpc.commands.pxelinux.build.command): """ Build the iso pxe (dhcpd, tftpd, httpd service for the sunhpc cluster. + 1) config interface(e,g.. eth0/eth1) ip address + 2) source /opt/sunhpc/etc/env.sunhpc + 3) git clone https://gitee.com/qcsun/sunhpc.git + 4) git clone https://gitee.com/qcsun/tools.git + 5) rpm -ivh tools/sunhpc-python-3.12.0-1.el8.x86_64.rpm + 6) sunhpc pxelinux build Rocky-8.7-x86_64-dvd1.iso + 7) sunhpc pxelinux build cdpxe dev=eth1 repo=/export/sunhpc/install/repos/Rocky/8/x86_64 + <param type='Bool' name='Quiet'> Whether to output detailed information, default: no </param> @@ -27,14 +35,14 @@ class Command(sunhpc.commands.pxelinux.build.command): </param> <param type='string' name='boot'> - supply an boot mode, mbr or uefi. Default: UEFI + supply an boot mode, mbr or uefi. Default: MBR </param> <example cmd='pxelinux build cdpxe'> In local build the iso pxe dhcpd, tftpd, httpd services. </example> - <example cmd='pxelinux build cdpxe'> + <example cmd='pxelinux build cdpxe dev=eth1 repo=/export/sunhpc/install/repos/Rocky/8/x86_64'> Build the iso pxe dhcpd, tftpd, httpd service. </example> """ @@ -71,70 +79,6 @@ class Command(sunhpc.commands.pxelinux.build.command): if owner: os.system('chown %s %s' % (owner, dst)) - def writeKSRepos(self, ksdirs, httpd_repos, rpath, addr): - if not os.path.exists(ksdirs): - os.makedirs(ksdirs) - - if not os.path.islink(httpd_repos): - os.symlink(rpath, httpd_repos) - - rootpw = '$6$eT.sWNwV69wyvhaR$N5tY4rJn6Y2slOrwuejfUBq3MhC5SNe1gUfTSYmOACObwW4ckUK9fjkKwC9TgSPhwwlaGdbtn0EFg11TJmAbC1' - usernm = 'admin' - userpw = '$6$0WN9CulSREVORA0S$FVWh6tkvdncbmSrsNPEb13GwxnGnEOKZliZLdL2IdY5E/fzLB8QmZAmgxyHh6ElSjObUCTbDEJ0l9.wRCRrsU.' - - bpacks, baddon, banaconda, bender = '%packages', '%addon', '%anaconda', '%end' - ksfile = os.path.join(ksdirs, 'kickstart.conf') - with open(ksfile, 'w') as f: - f.write(textwrap.dedent("""\ - #version=RHEL8 - # Use graphical install - graphical - - %s - @^graphical-server-environment - @container-management - @development - @graphical-admin-tools - @headless-management - @infiniband - @legacy-unix - @network-file-system-client - @performance - @remote-desktop-clients - @remote-system-management - @rpm-development-tools - @system-tools - @web-server - %s - - keyboard --xlayouts='us' - lang en_US.UTF-8 - firstboot --enable - timezone Asia/Shanghai --isUtc --nontp - - network --bootproto=dhcp --onboot=on --ipv6=auto - network --hostname=compute.local - clearpart --all --initlabel - autopart --type=lvm - - repo --name="AppStream" --baseurl=http://%s/redhat/AppStream - repo --name="BaseOS" --baseurl=http://%s/redhat/BaseOS - - rootpw --iscrypted %s - user --name=%s --password=%s --iscrypted --gecos="%s" - - %s com_redhat_kdump --disable --reserve-mb='auto' - %s - - %s - pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty - pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok - pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty - %s - """ % (bpacks, bender, addr, addr, rootpw, usernm, userpw, usernm, baddon, bender, banaconda, bender))) - - os.system('chmod 777 %s' % ksfile) - def run(self, params, args): (quiet, pxedir, dev, rpath, boot) = self.fillParams([ @@ -142,9 +86,8 @@ class Command(sunhpc.commands.pxelinux.build.command): ('pxedir', '/tftpboot/pxelinux'), ('dev', None), ('repo', ''), - ('boot', 'uefi') + ('boot', 'mbr') ]) - q = self.str2bool(quiet) if dev is None: @@ -168,15 +111,40 @@ class Command(sunhpc.commands.pxelinux.build.command): self.installHttpd(dev, rpath, address, q) # off selinux - os.system('sed -i "s/SELINUX=enforcing/SELINUX=disabled/ /etc/selinux/config"') + os.system('sed -i "s/^SELINUX=.*/SELINUX=disabled/g" /etc/selinux/config') def installHttpd(self, devices, rpath, address, q): self.msg('Starting build the httpd service...', q=q) - rootdir = '/var/www/html' - ksdirs = os.path.join(rootdir, 'ks') - httpd_repos = os.path.join(rootdir, 'redhat') - self.writeKSRepos(ksdirs, httpd_repos, rpath, address) + webdir = '/var/www/html' + ksdirs = os.path.join(webdir, 'ksfile') + redhat = os.path.join(webdir, 'redhat') + repos = os.path.join(redhat, 'r8') + + if not os.path.exists(ksdirs): + os.makedirs(ksdirs) + + if not os.path.exists(redhat): + os.makedirs(redhat) + + if not os.path.islink(repos): + os.symlink(rpath, repos) + + shared = '/opt/sunhpc/share/pxeboot/kickstart' + ksfile = os.listdir(shared) + for i in ksfile: + if i.startswith('r8_min.conf'): + self.msg('Copying to %s - %s' % (ksdirs, i), q=q) + self.copyit(os.path.join(shared, i), os.path.join(ksdirs, i), 0o755, '0.0') + if i.startswith('r8_gui.conf'): + self.msg('Copying to %s - %s' % (ksdirs, i), q=q) + self.copyit(os.path.join(shared, i), os.path.join(ksdirs, i), 0o755, '0.0') + + if not os.path.exists(os.path.join(ksdirs, i)): + continue + + # replace ip address for kickstart config file. + os.system('sed -i "s/ipaddress/%s/g" %s' % (address, os.path.join(ksdirs, i))) sunhpc_httpd_config = '/etc/httpd/conf.d/ks-sunhpc.conf' if not os.path.exists(sunhpc_httpd_config): @@ -205,7 +173,7 @@ class Command(sunhpc.commands.pxelinux.build.command): Require all granted </Directory> </VirtualHost> - """ % (address, rootdir, ksdirs, httpd_repos))) + """ % (address, webdir, ksdirs, repos))) self.fw.addports(['80', '443'], ['tcp']) self.fw.addservice('http') @@ -226,8 +194,16 @@ class Command(sunhpc.commands.pxelinux.build.command): cmds += '--disablerepo=* --enablerepo=sunhpc-appstream,sunhpc-baseos' self.shcmd(cmds) + # pxedir: /tftpboot/pxelinux + c7 = os.path.join(pxedir, 'c7') + r8 = os.path.join(pxedir, 'r8') + r9 = os.path.join(pxedir, 'r9') + pd = os.path.join(pxedir, 'pxelinux.cfg') if not os.path.exists(pxedir): - os.makedirs(pxedir) + os.makedirs(c7) + os.makedirs(r8) + os.makedirs(r9) + os.makedirs(pd) self.fw.addports(['69'], ['udp']) self.fw.addservice('tftp') @@ -272,13 +248,14 @@ class Command(sunhpc.commands.pxelinux.build.command): os.system('systemctl daemon-reload') os.system('systemctl restart tftp.service') - # # copy uefi boot file # BaseOS/Packages/s/shim-x64-15.6-1.el8.x86_64.rpm # BaseOS/Packages/g/grub2-efi-x64-2.02-142.el8.rocky.0.2.x86_64.rpm + # /usr/share/syslinux/{pxelinux.0, menu.c32} + # isolinux/{ldlinux.c32, libcom32.c32, libutil.c32} # decompress: rpm2cpio xxx-xxx-xxx.rpm |cpio -dim - # boot/efi/EFI/BOOT/BOOTX64.EFI + # boot/efi/EFI/BOOT/shimx64.efi # boot/efi/EFI/rocky/grubx64.efi # share = '/opt/sunhpc/share/pxeboot' @@ -287,85 +264,44 @@ class Command(sunhpc.commands.pxelinux.build.command): pxefile = os.listdir(share) + os.listdir(repos) for i in pxefile: if i.startswith('initrd.img'): - self.msg('Copying to %s - %s' % (pxedir, i), q=q) - self.copyit(os.path.join(repos, i), os.path.join(pxedir, i), 0o755, '0.0') - + self.msg('Copying to %s - %s' % (r8, i), q=q) + self.copyit(os.path.join(repos, i), os.path.join(r8, i), 0o755, '0.0') if i.startswith('vmlinuz'): - self.msg('Copying to %s - %s' % (pxedir, i), q=q) - self.copyit(os.path.join(repos, i), os.path.join(pxedir, i), 0o755, '0.0') + self.msg('Copying to %s - %s' % (r8, i), q=q) + self.copyit(os.path.join(repos, i), os.path.join(r8, i), 0o755, '0.0') - if i.startswith('memtest'): + if i.startswith('grubx64.efi'): self.msg('Copying to %s - %s' % (pxedir, i), q=q) - self.copyit(os.path.join(repos, i), os.path.join(pxedir, i), 0o755, '0.0') - - if i.startswith('BOOTX64.EFI'): + self.copyit(os.path.join(share, i), os.path.join(pxedir, i), 0o644, '0.0') + if i.startswith('ldlinux.c32'): self.msg('Copying to %s - %s' % (pxedir, i), q=q) self.copyit(os.path.join(share, i), os.path.join(pxedir, i), 0o644, '0.0') - - if i.startswith('grubx64.efi'): + if i.startswith('libcom32.c32'): self.msg('Copying to %s - %s' % (pxedir, i), q=q) self.copyit(os.path.join(share, i), os.path.join(pxedir, i), 0o644, '0.0') - - if i.startswith('pxelinux.0'): + if i.startswith('libutil.c32'): self.msg('Copying to %s - %s' % (pxedir, i), q=q) self.copyit(os.path.join(share, i), os.path.join(pxedir, i), 0o644, '0.0') - - if i.startswith('ldlinux.c32'): + if i.startswith('menu.c32'): self.msg('Copying to %s - %s' % (pxedir, i), q=q) self.copyit(os.path.join(share, i), os.path.join(pxedir, i), 0o644, '0.0') - - if i.startswith('lpxelinux.0'): + if i.startswith('pxelinux.0'): self.msg('Copying to %s - %s' % (pxedir, i), q=q) self.copyit(os.path.join(share, i), os.path.join(pxedir, i), 0o644, '0.0') - - if i.startswith('gpxelinux.0'): + if i.startswith('shimx64.efi'): + self.msg('Copying to %s - %s' % (pxedir, i), q=q) + self.copyit(os.path.join(share, i), os.path.join(pxedir, i), 0o644, '0.0') + if i.startswith('vesamenu.c32'): self.msg('Copying to %s - %s' % (pxedir, i), q=q) self.copyit(os.path.join(share, i), os.path.join(pxedir, i), 0o644, '0.0') - self.writeBootCFG(pxedir, boot, address, q) + if i.startswith('default'): + self.msg('Copying to %s - %s' % (pd, i), q=q) + self.copyit(os.path.join(share, i), os.path.join(pd, i), 0o644, '0.0') - def writeBootCFG(self, pxedirs, boot, address, q): - - # pxedirs : /tftpboot/pxelinux - # boot : mbr + # replace ip address for pxelinux.cfg/default + os.system('sed -i "s/ipaddress/%s/g" %s' % (address, os.path.join(pd, 'default'))) - ksfile = 'http://%s/ks/kickstart.conf' % address - images = 'http://%s/redhat/image/' % address - pxedir = os.path.join(pxedirs, 'pxelinux.cfg') - if not os.path.exists(pxedir): - os.makedirs(pxedir) - - if boot.lower() in ['mbr']: - - default = os.path.join(pxedir, 'default') - self.msg('Configure pxelinux pxe boot file to %s ' % (default), q=q) - with open(default, 'w') as f: - f.write(textwrap.dedent("""\ - # - # Generated by sunhpc pxelinux build tftpd - # - default sunhpc - prompt 0 - label sunhpc - kernel vmlinuz - append initrd=initrd.img inst.ks=%s inst.stage2=%s quiet net.ifnames=0 - """ % (ksfile, images))) - os.chmod(default, 0o0664) - os.system('chown root.apache %s' % default) - else: - - default = os.path.join(pxedirs, 'grub.cfg') - with open(default, 'w') as f: - f.write(textwrap.dedent("""\ - # - # the file generate by sunhpc - # - set timeout = 30 - menuentry 'Install Rocky 8' { - initrdefi pxelinux/initrd.img - linuxefi pxelinux/vmlinuz inst.ks=%s inst.stage2=%s quiet net.ifnames=0 - } - """ % (ksfile, images))) def installDhcpd(self, devices, boot, address, q): self.msg('Starting build the dhcpd service...', q=q) @@ -409,22 +345,10 @@ class Command(sunhpc.commands.pxelinux.build.command): class "pxeclients" { match if substring (option vendor-class-identifier, 0, 9) = "PXEClient"; next-server %s; - - if exists user-class and option user-class = "iPXE" { - filename "ipxe_after/index.ipxe"; + if option arch-type = 00:07 { + filename "shimx64.efi"; } else { - if option arch-type = 00:00 { - # 0x00 0x00 x86 BIOS - filename "pxelinux.0"; - } else if option arch-type = 00:06 { - # 0x00 0x06 x86 UEFI - filename "BOOTX86.EFI"; - } else if option arch-type = 00:07 { - # 0x00 0x07 x64 UEFI - filename "BOOTX64.EFI"; - } else { - filename "pxelinux.0"; - } + filename "pxelinux.0"; } } } diff --git a/share/pxeboot/default b/share/pxeboot/default new file mode 100644 index 0000000..5cb0b92 --- /dev/null +++ b/share/pxeboot/default @@ -0,0 +1,100 @@ +default vesamenu.c32 +timeout 300 + +display boot.msg + +menu clear +menu background splash.png +menu title CentOS and Rocky Linux Install +menu vshift 8 +menu rows 18 +menu margin 8 +menu helpmsgrow 15 +menu tabmsgrow 13 + +menu color border * #00000000 #00000000 none +menu color sel 0 #ffffffff #00000000 none +menu color title 0 #ff7ba3d0 #00000000 none +menu color tabmsg 0 #ff3a6496 #00000000 none +menu color unsel 0 #84b8ffff #00000000 none +menu color hotsel 0 #84b8ffff #00000000 none +menu color hotkey 0 #ffffffff #00000000 none +menu color help 0 #ffffffff #00000000 none +menu color scrollbar 0 #ffffffff #ff355594 none +menu color timeout 0 #ffffffff #00000000 none +menu color timeout_msg 0 #ffffffff #00000000 none +menu color cmdmark 0 #84b8ffff #00000000 none +menu color cmdline 0 #ffffffff #00000000 none + +menu tabmsg Press Tab for full configuration options on menu items. +menu separator # insert an empty line +menu separator # insert an empty line + +menu begin Install CentOS 7 + menu title Install CentOS 7 + +label linux 7 + menu label ^Auto Install CentOS 7 (Minimal) + kernel c7/vmlinuz + append initrd=c7/initrd.img inst.ks=http://ipaddress/ksfile/c7_min.conf quiet net.ifnames=0 + +label linux 7 + menu label ^Auto Install CentOS 7 (^GUI) + kernel c7/vmlinuz + append initrd=c7/initrd.img inst.ks=http://ipaddress/ksfile/c7_gui.conf quiet net.ifnames=0 + +label linux 7 + menu label ^Manual Install CentOS 7 + kernel c7/vmlinuz + append initrd=c7/initrd.img inst.repo=http://ipaddress/redhat/c7 quiet net.ifnames=0 + +label linux 7 + menu indent count 5 + menu label ^Rescue CentOS 7 system + kernel c7/vmlinuz + append initrd=c7/initrd.img inst.repo=http://ipaddress/redhat/c7 rescue + +menu separator # insert an empty line +label returntomain + menu label Return to ^main menu + menu exit +menu end + +# Rockys options +menu begin Install Rocky 8 + menu title Install Rocky 8 + +label linux 8 + menu label ^Auto Install Rocky 8 (Minimal) + kernel r8/vmlinuz + append initrd=r8/initrd.img inst.ks=http://ipaddress/ksfile/r8_min.conf quiet net.ifnames=0 + +label linux 8 + menu label ^Auto Install Rocky 8 (^GUI) + kernel r8/vmlinuz + append initrd=r8/initrd.img inst.ks=http://ipaddress/ksfile/r8_gui.conf quiet net.ifnames=0 + +label linux 8 + menu label ^Manual Install Rocky 8 + kernel r8/vmlinuz + append initrd=r8/initrd.img inst.repo=http://ipaddress/redhat/r8 quiet net.ifnames=0 + +label linux 8 + menu indent count 5 + menu label ^Rescue Rocky 8 system + kernel r8/vmlinuz + append initrd=r8/initrd.img inst.repo=http://ipaddress/redhat/r8 rescue + +menu separator # insert an empty line +label returntomain + menu label Return to ^main menu + menu exit +menu end + +menu separator # insert an empty line +label local + menu default + menu label Boot from ^local drive + localboot 0xffff + +menu end diff --git a/share/pxeboot/grubx64.efi b/share/pxeboot/grubx64.efi Binary files differindex f80a8f1..f80a8f1 100755..100644 --- a/share/pxeboot/grubx64.efi +++ b/share/pxeboot/grubx64.efi diff --git a/share/pxeboot/kickstart/c7_gui.conf b/share/pxeboot/kickstart/c7_gui.conf new file mode 100755 index 0000000..09e1c83 --- /dev/null +++ b/share/pxeboot/kickstart/c7_gui.conf @@ -0,0 +1,48 @@ +#version=RHEL8 +# Use graphical install + +install +keyboard 'us' +lang zh_CN +text +skipx + +selinux --disabled +timezone Asia/Shanghai +auth --useshadow --passalgo=sha512 + +url --url="http://ipaddress/redhat/c7" +#autopart --type=lvm +zerombr +bootloader --location=mbr +clearpart --all --initlabel + +part /boot --fstype="ext4" --size=1024 +part swap --fstype="swap" --size=4096 +part / --fstype="xfs" --grow + +reboot +rootpw --plaintext 123456 + +%post --interpreter=/usr/bin/bash +useradd admin +echo 123456 | passwd --stdin admin +sed -i 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config +%end + +%packages +@^infrastructure-server-environment +@base +@core +chrony +kexec-tools +%end + +%addon com_redhat_kdump --disable --reserve-mb='auto' +%end + +%anaconda +pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty +pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty +%end diff --git a/share/pxeboot/kickstart/c7_min.conf b/share/pxeboot/kickstart/c7_min.conf new file mode 100755 index 0000000..09e1c83 --- /dev/null +++ b/share/pxeboot/kickstart/c7_min.conf @@ -0,0 +1,48 @@ +#version=RHEL8 +# Use graphical install + +install +keyboard 'us' +lang zh_CN +text +skipx + +selinux --disabled +timezone Asia/Shanghai +auth --useshadow --passalgo=sha512 + +url --url="http://ipaddress/redhat/c7" +#autopart --type=lvm +zerombr +bootloader --location=mbr +clearpart --all --initlabel + +part /boot --fstype="ext4" --size=1024 +part swap --fstype="swap" --size=4096 +part / --fstype="xfs" --grow + +reboot +rootpw --plaintext 123456 + +%post --interpreter=/usr/bin/bash +useradd admin +echo 123456 | passwd --stdin admin +sed -i 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config +%end + +%packages +@^infrastructure-server-environment +@base +@core +chrony +kexec-tools +%end + +%addon com_redhat_kdump --disable --reserve-mb='auto' +%end + +%anaconda +pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty +pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty +%end diff --git a/share/pxeboot/kickstart/ks-example.conf b/share/pxeboot/kickstart/ks-example.conf new file mode 100755 index 0000000..1537500 --- /dev/null +++ b/share/pxeboot/kickstart/ks-example.conf @@ -0,0 +1,51 @@ +#version=RHEL8 +# Use graphical install +graphical + +%packages +@^graphical-server-environment +@container-management +@development +@graphical-admin-tools +@headless-management +@infiniband +@legacy-unix +@network-file-system-client +@performance +@remote-desktop-clients +@remote-system-management +@rpm-development-tools +@system-tools +@web-server +%end + +keyboard --xlayouts='us' +lang en_US.UTF-8 +firstboot --enable +selinux --disabled +skipx +timezone Asia/Shanghai --isUtc --nontp + +network --bootproto=dhcp --onboot=on --ipv6=auto +network --hostname=compute.local +clearpart --all --initlabel +#part /boot --fstype="ext4" --size=1024 +#part swap --fstype="swap" --size=4096 +#part / --fstype="xfs" --grow +autopart --type=lvm + +url --url="http://172.16.2.1/redhat/r8" +#repo --name="AppStream" --baseurl=http://172.16.2.1/redhat/AppStream +#repo --name="BaseOS" --baseurl=http://172.16.2.1/redhat/BaseOS + +rootpw --iscrypted $6$eT.sWNwV69wyvhaR$N5tY4rJn6Y2slOrwuejfUBq3MhC5SNe1gUfTSYmOACObwW4ckUK9fjkKwC9TgSPhwwlaGdbtn0EFg11TJmAbC1 +user --name=admin --password=$6$0WN9CulSREVORA0S$FVWh6tkvdncbmSrsNPEb13GwxnGnEOKZliZLdL2IdY5E/fzLB8QmZAmgxyHh6ElSjObUCTbDEJ0l9.wRCRrsU. --iscrypted --gecos="admin" + +%addon com_redhat_kdump --disable --reserve-mb='auto' +%end + +%anaconda +pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty +pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty +%end diff --git a/share/pxeboot/kickstart/r8_gui.conf b/share/pxeboot/kickstart/r8_gui.conf new file mode 100755 index 0000000..f038d8d --- /dev/null +++ b/share/pxeboot/kickstart/r8_gui.conf @@ -0,0 +1,54 @@ +#version=RHEL8 +# Use graphical install +graphical + +url --url="http://ipaddress/redhat/r8" + +lang en_US.UTF-8 +keyboard --xlayouts='us' +firstboot --enable +selinux --disabled +timezone Asia/Shanghai --isUtc --nontp +skipx + +zerombr +bootloader --location=mbr +clearpart --all --initlabel +part /boot --fstype="ext4" --size=1024 +part swap --fstype="swap" --size=4096 +part / --fstype="xfs" --grow + +rootpw --plaintext 123456 +reboot + +%post --interpreter=/usr/bin/bash +useradd admin +echo 123456 | passwd --stdin admin +sed -i 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config +%end + +%packages +@^graphical-server-environment +@container-management +@development +@graphical-admin-tools +@headless-management +@infiniband +@legacy-unix +@network-file-system-client +@performance +@remote-desktop-clients +@remote-system-management +@rpm-development-tools +@system-tools +@web-server +%end + +%addon com_redhat_kdump --disable --reserve-mb='auto' +%end + +%anaconda +pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty +pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty +%end diff --git a/share/pxeboot/kickstart/r8_min.conf b/share/pxeboot/kickstart/r8_min.conf new file mode 100755 index 0000000..5b56f51 --- /dev/null +++ b/share/pxeboot/kickstart/r8_min.conf @@ -0,0 +1,41 @@ +#version=RHEL8 +# Use graphical install +graphical + +url --url="http://ipaddress/redhat/r8" + +lang en_US.UTF-8 +keyboard --xlayouts='us' +firstboot --enable +selinux --disabled +timezone Asia/Shanghai --isUtc --nontp +skipx + +zerombr +bootloader --location=mbr +clearpart --all --initlabel +part /boot --fstype="ext4" --size=1024 +part swap --fstype="swap" --size=4096 +part / --fstype="xfs" --grow + +rootpw --plaintext 123456 +reboot + +%post --interpreter=/usr/bin/bash +useradd admin +echo 123456 | passwd --stdin admin +sed -i 's/^#PermitRootLogin prohibit-password/PermitRootLogin yes/g' /etc/ssh/sshd_config +%end + +%packages +@^minimal-environment +%end + +%addon com_redhat_kdump --disable --reserve-mb='auto' +%end + +%anaconda +pwpolicy root --minlen=6 --minquality=1 --notstrict --nochanges --notempty +pwpolicy user --minlen=6 --minquality=1 --notstrict --nochanges --emptyok +pwpolicy luks --minlen=6 --minquality=1 --notstrict --nochanges --notempty +%end diff --git a/share/pxeboot/libcom32.c32 b/share/pxeboot/libcom32.c32 Binary files differnew file mode 100644 index 0000000..05073d0 --- /dev/null +++ b/share/pxeboot/libcom32.c32 diff --git a/share/pxeboot/libutil.c32 b/share/pxeboot/libutil.c32 Binary files differnew file mode 100644 index 0000000..4e3fc36 --- /dev/null +++ b/share/pxeboot/libutil.c32 diff --git a/share/pxeboot/lpxelinux.0 b/share/pxeboot/lpxelinux.0 Binary files differdeleted file mode 100644 index 61e68c2..0000000 --- a/share/pxeboot/lpxelinux.0 +++ /dev/null diff --git a/share/pxeboot/menu.c32 b/share/pxeboot/menu.c32 Binary files differnew file mode 100644 index 0000000..d02fe78 --- /dev/null +++ b/share/pxeboot/menu.c32 diff --git a/share/pxeboot/BOOTX64.EFI b/share/pxeboot/shimx64.efi Binary files differindex 654424b..654424b 100755..100644 --- a/share/pxeboot/BOOTX64.EFI +++ b/share/pxeboot/shimx64.efi diff --git a/share/pxeboot/vesamenu.c32 b/share/pxeboot/vesamenu.c32 Binary files differnew file mode 100644 index 0000000..efca93d --- /dev/null +++ b/share/pxeboot/vesamenu.c32 |