mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-22 18:00:35 +00:00
Merge pull request #50 from odyssey4me/grub-console-support
Add console output to serial when using grub
This commit is contained in:
commit
a2f0b794b1
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],
|
||||
}
|
||||
|
||||
|
|
|
@ -44,6 +44,20 @@ class AddGrubPackage(Task):
|
|||
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):
|
||||
description = 'Installing grub'
|
||||
phase = phases.system_modification
|
||||
|
|
Loading…
Add table
Reference in a new issue