mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Add console output to serial when using grub
This commit is contained in:
parent
9105f957ca
commit
dab1dfa930
2 changed files with 15 additions and 1 deletions
|
@ -74,7 +74,7 @@ locale_set = [locale.LocaleBootstrapPackage,
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
bootloader_set = {'grub': [boot.AddGrubPackage, boot.InstallGrub],
|
bootloader_set = {'grub': [boot.AddGrubPackage, boot.ConfigureGrub, boot.InstallGrub],
|
||||||
'extlinux': [boot.AddExtlinuxPackage, boot.InstallExtLinux],
|
'extlinux': [boot.AddExtlinuxPackage, boot.InstallExtLinux],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -44,6 +44,20 @@ class AddGrubPackage(Task):
|
||||||
info.packages.add('grub-pc')
|
info.packages.add('grub-pc')
|
||||||
|
|
||||||
|
|
||||||
|
class ConfigureGrub(Task):
|
||||||
|
description = 'Configuring grub'
|
||||||
|
phase = phases.system_modification
|
||||||
|
predecessors = [filesystem.FStab]
|
||||||
|
|
||||||
|
@classmethod
|
||||||
|
def run(cls, info):
|
||||||
|
from common.tools import sed_i
|
||||||
|
grub_def = os.path.join(info.root, 'etc/default/grub')
|
||||||
|
sed_i(grub_def, '^#GRUB_TERMINAL=console', 'GRUB_TERMINAL=console')
|
||||||
|
sed_i(grub_def, '^GRUB_CMDLINE_LINUX_DEFAULT="quiet"',
|
||||||
|
'GRUB_CMDLINE_LINUX_DEFAULT="console=ttyS0"')
|
||||||
|
|
||||||
|
|
||||||
class InstallGrub(Task):
|
class InstallGrub(Task):
|
||||||
description = 'Installing grub'
|
description = 'Installing grub'
|
||||||
phase = phases.system_modification
|
phase = phases.system_modification
|
||||||
|
|
Loading…
Add table
Reference in a new issue