2013-07-10 10:49:45 +02:00
|
|
|
from base import Task
|
|
|
|
from common import phases
|
|
|
|
|
|
|
|
|
|
|
|
class ConfigureGrub(Task):
|
|
|
|
description = 'Configuring grub'
|
|
|
|
phase = phases.system_modification
|
|
|
|
|
|
|
|
def run(self, info):
|
2013-08-10 16:18:48 +02:00
|
|
|
from common.tools import log_check_call
|
2013-07-30 11:21:09 +02:00
|
|
|
log_check_call(['/usr/sbin/chroot', info.root, 'update-initramfs', '-u'])
|
2013-08-11 19:46:18 +02:00
|
|
|
log_check_call(['/usr/sbin/grub-install',
|
2013-08-10 23:02:44 +02:00
|
|
|
'--boot-directory='+info.root+"/boot/",
|
2013-08-11 18:17:06 +02:00
|
|
|
info.bootstrap_device['path']])
|
2013-08-01 11:19:20 +02:00
|
|
|
|
2013-07-30 13:03:08 +02:00
|
|
|
log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub'])
|