Skip to content

Commit

Permalink
Fixes #38168 - Add hostname parameter to kickstart kernel params
Browse files Browse the repository at this point in the history
  • Loading branch information
ShimShtein committed Jan 30, 2025
1 parent 74ddd88 commit 5bbec79
Show file tree
Hide file tree
Showing 13 changed files with 14 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ description: |
end
options.push("dualstack!") if subnet4 && subnet6
if subnet4 && subnet4.dhcp_boot_mode?
options.push("ip=dhcp") if rhel_compatible && major >= 7
options.push("ip=::::#{hostname}::dhcp") if rhel_compatible && major >= 7
elsif subnet4 && !subnet4.dhcp_boot_mode?
if rhel_compatible && major < 7
dns_servers = subnet4.dns_servers.join(',')
Expand All @@ -84,7 +84,7 @@ description: |
end
end
elsif subnet6 && subnet6.dhcp_boot_mode? && rhel_compatible && major >= 7
options.push("ip=auto6")
options.push("ip=::::#{hostname}::auto6")
elsif subnet6 && !subnet6.dhcp_boot_mode?
raise("Static IPv6 provisioning works on RHEL7 or newer") if rhel_compatible && major < 7
gw = subnet6.gateway ? "[#{subnet6.gateway}]" : ""
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ timeout=10

title Kickstart default PXEGrub
root (nd)
kernel (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
kernel (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv4-6-dhcp-el7::dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
initrd (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-initrd.img


Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ timeout=10

title Kickstart default PXEGrub
root (nd)
kernel (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
kernel (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv4-dhcp-el7::dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
initrd (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-initrd.img


Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ timeout=10

title Kickstart default PXEGrub
root (nd)
kernel (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=2001:db8:42::8 nameserver=2001:db8:42::4 fips=1
kernel (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv6-dhcp-el7::dhcp nameserver=2001:db8:42::8 nameserver=2001:db8:42::4 fips=1
initrd (nd)/../boot/centos-mirror-nrm0GtSX1ZC5-initrd.img


Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set default=0
set timeout=10

menuentry 'Kickstart default PXEGrub2' {
linux boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
linux boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv4-6-dhcp-el7::dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
initrd boot/centos-mirror-nrm0GtSX1ZC5-initrd.img
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set default=0
set timeout=10

menuentry 'Kickstart default PXEGrub2' {
linux boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
linux boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv4-dhcp-el7::dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
initrd boot/centos-mirror-nrm0GtSX1ZC5-initrd.img
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set default=0
set timeout=10

menuentry 'Kickstart default PXEGrub2' {
linux boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=2001:db8:42::8 nameserver=2001:db8:42::4 fips=1
linux boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv6-dhcp-el7::dhcp nameserver=2001:db8:42::8 nameserver=2001:db8:42::4 fips=1
initrd boot/centos-mirror-nrm0GtSX1ZC5-initrd.img
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ONTIMEOUT installer
LABEL installer
MENU LABEL Kickstart default PXELinux
KERNEL boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz
APPEND initrd=boot/centos-mirror-nrm0GtSX1ZC5-initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
APPEND initrd=boot/centos-mirror-nrm0GtSX1ZC5-initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv4-6-dhcp-el7::dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1

IPAPPEND 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ONTIMEOUT installer
LABEL installer
MENU LABEL Kickstart default PXELinux
KERNEL boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz
APPEND initrd=boot/centos-mirror-nrm0GtSX1ZC5-initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1
APPEND initrd=boot/centos-mirror-nrm0GtSX1ZC5-initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv4-dhcp-el7::dhcp nameserver=192.168.42.2 nameserver=192.168.42.3 fips=1

IPAPPEND 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ ONTIMEOUT installer
LABEL installer
MENU LABEL Kickstart default PXELinux
KERNEL boot/centos-mirror-nrm0GtSX1ZC5-vmlinuz
APPEND initrd=boot/centos-mirror-nrm0GtSX1ZC5-initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp nameserver=2001:db8:42::8 nameserver=2001:db8:42::4 fips=1
APPEND initrd=boot/centos-mirror-nrm0GtSX1ZC5-initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv6-dhcp-el7::dhcp nameserver=2001:db8:42::8 nameserver=2001:db8:42::4 fips=1

IPAPPEND 2

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ping --count 1 ${netX/gateway} || echo Ping to Gateway failed or ping command no
echo Trying to ping DNS: ${netX/dns}
ping --count 1 ${netX/dns} || echo Ping to DNS failed or ping command not available.

kernel http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz initrd=initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp fips=1
kernel http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz initrd=initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv4-6-dhcp-el7::dhcp fips=1
initrd http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/initrd.img
imgstat
sleep 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ping --count 1 ${netX/gateway} || echo Ping to Gateway failed or ping command no
echo Trying to ping DNS: ${netX/dns}
ping --count 1 ${netX/dns} || echo Ping to DNS failed or ping command not available.

kernel http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz initrd=initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp fips=1
kernel http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz initrd=initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv4-dhcp-el7::dhcp fips=1
initrd http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/initrd.img
imgstat
sleep 2
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ping --count 1 ${netX/gateway} || echo Ping to Gateway failed or ping command no
echo Trying to ping DNS: ${netX/dns}
ping --count 1 ${netX/dns} || echo Ping to DNS failed or ping command not available.

kernel http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz initrd=initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=dhcp fips=1
kernel http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/vmlinuz initrd=initrd.img network ksdevice=bootif ks.device=bootif BOOTIF=01-00-f0-54-1a-7e-e0 ks=http://foreman.example.com/unattended/provision kssendmac ks.sendmac ip=::::snapshot-ipv6-dhcp-el7::dhcp fips=1
initrd http://mirror.centos.org/centos/7/os/x86_64/images/pxeboot/initrd.img
imgstat
sleep 2
Expand Down

0 comments on commit 5bbec79

Please sign in to comment.