2014-05-02 17:36:08 +02:00
|
|
|
from bootstrapvz.base import Task
|
|
|
|
from bootstrapvz.common import phases
|
2014-12-31 14:14:43 +01:00
|
|
|
from bootstrapvz.common.tasks import grub
|
2014-05-02 17:36:08 +02:00
|
|
|
|
|
|
|
|
|
|
|
class ConfigureGrub(Task):
|
2016-06-04 11:35:59 +02:00
|
|
|
description = 'Change grub configuration to allow for ttyS0 output'
|
|
|
|
phase = phases.system_modification
|
2016-06-04 18:21:15 +02:00
|
|
|
successors = [grub.WriteGrubConfig]
|
2014-05-02 17:36:08 +02:00
|
|
|
|
2016-06-04 11:35:59 +02:00
|
|
|
@classmethod
|
|
|
|
def run(cls, info):
|
2019-11-04 03:13:25 +01:00
|
|
|
info.grub_config['GRUB_CMDLINE_LINUX'].extend([
|
|
|
|
'console=ttyS0,38400n8',
|
|
|
|
'elevator=noop',
|
|
|
|
'consoleblank=0',
|
|
|
|
'elevator=noop',
|
|
|
|
'noibrs',
|
|
|
|
'noibpb',
|
|
|
|
'nopti',
|
|
|
|
'nospectre_v2',
|
|
|
|
'nospectre_v1',
|
|
|
|
'l1tf=off',
|
|
|
|
'nospec_store_bypass_disable',
|
|
|
|
'no_stf_barrier',
|
|
|
|
'mds=off',
|
|
|
|
'mitigations=off',
|
|
|
|
])
|
2017-05-02 10:46:00 -07:00
|
|
|
# Enable SCSI block multiqueue on Stretch.
|
|
|
|
from bootstrapvz.common.releases import stretch
|
|
|
|
if info.manifest.release >= stretch:
|
|
|
|
info.grub_config['GRUB_CMDLINE_LINUX'].append('scsi_mod.use_blk_mq=Y')
|