Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion kiwi/bootloader/config/grub2.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,15 @@ def setup_disk_image_config(
self.boot_directory_name, 'grub.cfg'
]
)
# Disable os-prober, it takes information from the host it
# runs on which is not necessarily matching with the image
os.environ.update({'GRUB_DISABLE_OS_PROBER': 'true'})
Command.run(
[
'chroot', self.root_mount.mountpoint,
os.path.basename(self._get_grub2_mkconfig_tool()), '-o',
config_file.replace(self.root_mount.mountpoint, '')
]
], os.environ
)
if boot_options.get('root_device') != boot_options.get('boot_device'):
# Create a boot -> . link on the boot partition.
Expand Down
3 changes: 2 additions & 1 deletion test/unit/bootloader/config/grub2_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -1219,12 +1219,13 @@ def open_file(filename, mode=None):
mock_mount_system.assert_called_once_with(
'rootdev', 'bootdev', None, None, None
)
os.environ.update({'GRUB_DISABLE_OS_PROBER': 'true'})
assert mock_Command_run.call_args_list == [
call(
[
'chroot', self.bootloader.root_mount.mountpoint,
'grub2-mkconfig', '-o', '/boot/grub2/grub.cfg'
]
], os.environ
),
call(
[
Expand Down