Merge "Use linux instead of linuxefi in grub config"
This commit is contained in:
commit
63c911be45
@ -3,6 +3,6 @@ set timeout=5
|
||||
set hidden_timeout_quiet=false
|
||||
|
||||
menuentry "boot_partition" {
|
||||
linuxefi {{ linux }} {{ kernel_params }} --
|
||||
initrdefi {{ initrd }}
|
||||
linux {{ linux }} {{ kernel_params }} --
|
||||
initrd {{ initrd }}
|
||||
}
|
||||
|
@ -351,11 +351,9 @@ def create_pxe_config(task, pxe_options, template=None, ipxe_enabled=False):
|
||||
pxe_config_root_tag = '(( ROOT ))'
|
||||
pxe_config_disk_ident = '(( DISK_IDENTIFIER ))'
|
||||
|
||||
# Determine the appropriate commands based on the CPU architecture
|
||||
arch = task.node.properties.get('cpu_arch', 'x86_64')
|
||||
commands = {
|
||||
'linux_cmd': 'linuxefi' if arch != 'aarch64' else 'linux',
|
||||
'initrd_cmd': 'initrdefi' if arch != 'aarch64' else 'initrd'
|
||||
'linux_cmd': 'linux',
|
||||
'initrd_cmd': 'initrd'
|
||||
}
|
||||
pxe_options.update(commands)
|
||||
else:
|
||||
|
@ -3,20 +3,20 @@ set timeout=5
|
||||
set hidden_timeout_quiet=false
|
||||
|
||||
menuentry "deploy" {
|
||||
{{ pxe_options.linux_cmd|default('linuxefi', true) }} {{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_server={{pxe_options.tftp_server}}
|
||||
{{ pxe_options.initrd_cmd|default('initrdefi', true) }} {{ pxe_options.deployment_ari_path }}
|
||||
{{ pxe_options.linux_cmd|default('linux', true) }} {{ pxe_options.deployment_aki_path }} selinux=0 troubleshoot=0 text {{ pxe_options.pxe_append_params|default("", true) }} boot_server={{pxe_options.tftp_server}}
|
||||
{{ pxe_options.initrd_cmd|default('initrd', true) }} {{ pxe_options.deployment_ari_path }}
|
||||
}
|
||||
|
||||
menuentry "boot_ramdisk" {
|
||||
{{ pxe_options.linux_cmd|default('linuxefi', true) }} {{ pxe_options.aki_path }} root=/dev/ram0 text {{ pxe_options.pxe_append_params|default("", true) }} {{ pxe_options.ramdisk_opts|default('', true) }}
|
||||
{{ pxe_options.initrd_cmd|default('initrdefi', true) }} {{ pxe_options.ari_path }}
|
||||
{{ pxe_options.linux_cmd|default('linux', true) }} {{ pxe_options.aki_path }} root=/dev/ram0 text {{ pxe_options.pxe_append_params|default("", true) }} {{ pxe_options.ramdisk_opts|default('', true) }}
|
||||
{{ pxe_options.initrd_cmd|default('initrd', true) }} {{ pxe_options.ari_path }}
|
||||
}
|
||||
|
||||
menuentry "boot_whole_disk" {
|
||||
{{ pxe_options.linux_cmd|default('linuxefi', true) }} chain.c32 mbr:{{ DISK_IDENTIFIER }}
|
||||
{{ pxe_options.linux_cmd|default('linux', true) }} chain.c32 mbr:{{ DISK_IDENTIFIER }}
|
||||
}
|
||||
|
||||
menuentry "boot_anaconda" {
|
||||
{{ pxe_options.linux_cmd|default('linuxefi', true) }} {{ pxe_options.aki_path }} text {{ pxe_options.pxe_append_params|default("", true) }} inst.ks={{ pxe_options.ks_cfg_url }} {% if pxe_options.repo_url %}inst.repo={{ pxe_options.repo_url }}{% else %}inst.stage2={{ pxe_options.stage2_url }}{% endif %}
|
||||
{{ pxe_options.initrd_cmd|default('initrdefi', true) }} {{ pxe_options.ari_path }}
|
||||
{{ pxe_options.linux_cmd|default('linux', true) }} {{ pxe_options.aki_path }} text {{ pxe_options.pxe_append_params|default("", true) }} inst.ks={{ pxe_options.ks_cfg_url }} {% if pxe_options.repo_url %}inst.repo={{ pxe_options.repo_url }}{% else %}inst.stage2={{ pxe_options.stage2_url }}{% endif %}
|
||||
{{ pxe_options.initrd_cmd|default('initrd', true) }} {{ pxe_options.ari_path }}
|
||||
}
|
||||
|
@ -654,8 +654,8 @@ class FsImageTestCase(base.TestCase):
|
||||
"set hidden_timeout_quiet=false\n"
|
||||
"\n"
|
||||
"menuentry \"boot_partition\" {\n"
|
||||
"linuxefi /vmlinuz key1=value1 key2 --\n"
|
||||
"initrdefi /initrd\n"
|
||||
"linux /vmlinuz key1=value1 key2 --\n"
|
||||
"initrd /initrd\n"
|
||||
"}")
|
||||
|
||||
cfg = images._generate_cfg(kernel_params,
|
||||
|
@ -166,23 +166,7 @@ class TestPXEUtils(db_base.DbTestCase):
|
||||
|
||||
self.assertEqual(str(expected_template), rendered_template)
|
||||
|
||||
def test_pxe_config_x86_64(self):
|
||||
self.node.properties['cpu_arch'] = 'x86_64'
|
||||
self.node.save()
|
||||
|
||||
rendered_template = utils.render_template(
|
||||
CONF.pxe.uefi_pxe_config_template,
|
||||
{'pxe_options': self.pxe_options,
|
||||
'ROOT': '{{ ROOT }}',
|
||||
'DISK_IDENTIFIER': '{{ DISK_IDENTIFIER }}'})
|
||||
|
||||
self.assertIn('linuxefi', rendered_template)
|
||||
self.assertIn('initrdefi', rendered_template)
|
||||
|
||||
def test_pxe_config_aarch64(self):
|
||||
self.node.properties['cpu_arch'] = 'aarch64'
|
||||
self.node.save()
|
||||
|
||||
def test_pxe_config(self):
|
||||
rendered_template = utils.render_template(
|
||||
CONF.pxe.uefi_pxe_config_template,
|
||||
{'pxe_options': self.pxe_options,
|
||||
|
@ -159,12 +159,12 @@ set timeout=5
|
||||
set hidden_timeout_quiet=false
|
||||
|
||||
menuentry "deploy" {
|
||||
linuxefi deploy_kernel "ro text"
|
||||
initrdefi deploy_ramdisk
|
||||
linux deploy_kernel "ro text"
|
||||
initrd deploy_ramdisk
|
||||
}
|
||||
|
||||
menuentry "boot_whole_disk" {
|
||||
linuxefi chain.c32 mbr:(( DISK_IDENTIFIER ))
|
||||
linux chain.c32 mbr:(( DISK_IDENTIFIER ))
|
||||
}
|
||||
"""
|
||||
|
||||
@ -174,12 +174,12 @@ set timeout=5
|
||||
set hidden_timeout_quiet=false
|
||||
|
||||
menuentry "deploy" {
|
||||
linuxefi deploy_kernel "ro text"
|
||||
initrdefi deploy_ramdisk
|
||||
linux deploy_kernel "ro text"
|
||||
initrd deploy_ramdisk
|
||||
}
|
||||
|
||||
menuentry "boot_whole_disk" {
|
||||
linuxefi chain.c32 mbr:0x12345678
|
||||
linux chain.c32 mbr:0x12345678
|
||||
}
|
||||
"""
|
||||
|
||||
|
@ -3,20 +3,20 @@ set timeout=5
|
||||
set hidden_timeout_quiet=false
|
||||
|
||||
menuentry "deploy" {
|
||||
linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel selinux=0 troubleshoot=0 text test_param boot_server=192.0.2.1
|
||||
initrdefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk
|
||||
linux /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_kernel selinux=0 troubleshoot=0 text test_param boot_server=192.0.2.1
|
||||
initrd /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/deploy_ramdisk
|
||||
}
|
||||
|
||||
menuentry "boot_ramdisk" {
|
||||
linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel root=/dev/ram0 text test_param ramdisk_param
|
||||
initrdefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ramdisk
|
||||
linux /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel root=/dev/ram0 text test_param ramdisk_param
|
||||
initrd /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ramdisk
|
||||
}
|
||||
|
||||
menuentry "boot_whole_disk" {
|
||||
linuxefi chain.c32 mbr:(( DISK_IDENTIFIER ))
|
||||
linux chain.c32 mbr:(( DISK_IDENTIFIER ))
|
||||
}
|
||||
|
||||
menuentry "boot_anaconda" {
|
||||
linuxefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel text test_param inst.ks=http://fake/ks.cfg inst.stage2=http://fake/stage2
|
||||
initrdefi /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ramdisk
|
||||
linux /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/kernel text test_param inst.ks=http://fake/ks.cfg inst.stage2=http://fake/stage2
|
||||
initrd /tftpboot/1be26c0b-03f2-4d2e-ae87-c02d7f33c123/ramdisk
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user