From 1b9f39a803ad9378aeca54113d922b6cc2e8df36 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Mon, 12 Aug 2013 16:05:21 +0200 Subject: [PATCH 01/14] add mirror attribute management --- common/tasks/bootstrap.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/common/tasks/bootstrap.py b/common/tasks/bootstrap.py index 9e27f36..775e715 100644 --- a/common/tasks/bootstrap.py +++ b/common/tasks/bootstrap.py @@ -13,7 +13,11 @@ def get_bootstrap_args(info): options.append('--include=' + ','.join(include)) if len(exclude) > 0: options.append('--exclude=' + ','.join(exclude)) - arguments = [info.manifest.system['release'], info.root, 'http://http.debian.net/debian'] + if info.manifest.system['mirror']: + mirror = info.manifest.system['mirror'] + else: + mirror = 'http://http.debian.net/debian' + arguments = [info.manifest.system['release'], info.root, mirror] return executable, options, arguments From 429f48cfbc209c6b0014d239a446592737a478ff Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Mon, 12 Aug 2013 16:06:08 +0200 Subject: [PATCH 02/14] fix package name --- plugins/user_packages/user_packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/user_packages/user_packages.py b/plugins/user_packages/user_packages.py index 82ab462..3ad8c1b 100644 --- a/plugins/user_packages/user_packages.py +++ b/plugins/user_packages/user_packages.py @@ -3,7 +3,7 @@ from common import phases import os from common.tasks.packages import ImagePackages from common.tasks.host import CheckPackages -from providers.raw.tasks.filesystem import MountVolume +from common.tasks.filesystem import MountVolume class AddUserPackages(Task): From 7262ad997b6cbd43f17c5283b795a19d96f481a6 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Mon, 12 Aug 2013 16:06:34 +0200 Subject: [PATCH 03/14] fix package name --- plugins/root_password/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/root_password/__init__.py b/plugins/root_password/__init__.py index f9590f5..f3d4e87 100644 --- a/plugins/root_password/__init__.py +++ b/plugins/root_password/__init__.py @@ -1,7 +1,7 @@ def tasks(tasklist, manifest): - from common.tasks import DisableSSHPasswordAuthentication + from common.tasks.security import DisableSSHPasswordAuthentication from tasks import SetRootPassword tasklist.replace(DisableSSHPasswordAuthentication, SetRootPassword()) From ee7ae817461fc9d131623ffeeb71c0ac9b363dcd Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Mon, 12 Aug 2013 16:06:56 +0200 Subject: [PATCH 04/14] fix missing grub2 package --- providers/virtualbox/tasks/packages.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/providers/virtualbox/tasks/packages.py b/providers/virtualbox/tasks/packages.py index 43fe477..47f5e60 100644 --- a/providers/virtualbox/tasks/packages.py +++ b/providers/virtualbox/tasks/packages.py @@ -32,7 +32,8 @@ class ImagePackages(Task): # isc-dhcp-client doesn't work properly with ec2 'dhcpcd', 'chkconfig', - 'openssh-client' + 'openssh-client', + 'grub2' ]) exclude.update(['isc-dhcp-client', From 205adeb288b2f61a873030a3aaad1ed8de7c96b8 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Mon, 12 Aug 2013 16:07:17 +0200 Subject: [PATCH 05/14] add rollback for Attach --- providers/virtualbox/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/providers/virtualbox/__init__.py b/providers/virtualbox/__init__.py index 2e7893e..6a2603c 100644 --- a/providers/virtualbox/__init__.py +++ b/providers/virtualbox/__init__.py @@ -14,6 +14,7 @@ from common.tasks import security from common.tasks import network from common.tasks import initd from common.tasks import cleanup +from common.tasks import loopback def initialize(): @@ -88,3 +89,4 @@ def rollback_tasks(tasklist, tasks_completed, manifest): counter_task(parted.MapPartitions, parted.UnmapPartitions) counter_task(filesystem.MountVolume, filesystem.UnmountVolume) counter_task(filesystem.MountSpecials, filesystem.UnmountSpecials) + counter_task(loopback.Attach, loopback.Detach) From 3e114313539e0696d861fb62cc5e7525d48ea0f2 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 08:55:12 +0200 Subject: [PATCH 06/14] fix grub/boot --- common/tasks/parted.py | 14 +-- providers/virtualbox/assets/grub.d/00_header | 4 + providers/virtualbox/assets/grub.d/10_linux | 93 ++++++++++++++++++++ providers/virtualbox/tasks/boot.py | 28 ++++-- 4 files changed, 120 insertions(+), 19 deletions(-) create mode 100644 providers/virtualbox/assets/grub.d/00_header create mode 100644 providers/virtualbox/assets/grub.d/10_linux diff --git a/common/tasks/parted.py b/common/tasks/parted.py index c8d1190..caade0a 100644 --- a/common/tasks/parted.py +++ b/common/tasks/parted.py @@ -25,13 +25,9 @@ class MapPartitions(Task): after = [PartitionVolume] def run(self, info): - log_check_call(['kpartx', '-a', '-v', info.bootstrap_device['path']]) - root_partition_path = info.bootstrap_device['path'].replace('/dev', '/dev/mapper')+'p1' - - [root_loopback_path] = log_check_call(['/sbin/losetup', '--find']) - log_check_call(['/sbin/losetup', root_loopback_path, root_partition_path]) - - info.bootstrap_device['partitions'] = {'root_path': root_loopback_path} + root_partition_path = info.bootstrap_device['path'].replace('/dev', '/dev/mapper')+'p1' + log_check_call(['kpartx', '-a', '-v', info.bootstrap_device['path']]) + info.bootstrap_device['partitions'] = {'root_path': root_partition_path} class FormatPartitions(Task): @@ -52,7 +48,5 @@ class UnmapPartitions(Task): after = [filesystem.UnmountVolume] def run(self, info): - log_check_call(['/sbin/losetup', '-d', info.bootstrap_device['partitions']['root_path']]) - del info.bootstrap_device['partitions']['root_path'] - log_check_call(['kpartx', '-d', info.bootstrap_device['path']]) + del info.bootstrap_device['partitions']['root_path'] diff --git a/providers/virtualbox/assets/grub.d/00_header b/providers/virtualbox/assets/grub.d/00_header new file mode 100644 index 0000000..43927bc --- /dev/null +++ b/providers/virtualbox/assets/grub.d/00_header @@ -0,0 +1,4 @@ +#! /bin/sh +set -e + +# nothing to do, skip grub mkconfig for this diff --git a/providers/virtualbox/assets/grub.d/10_linux b/providers/virtualbox/assets/grub.d/10_linux new file mode 100644 index 0000000..7e944d2 --- /dev/null +++ b/providers/virtualbox/assets/grub.d/10_linux @@ -0,0 +1,93 @@ +#!/bin/sh + +# This file generates the old menu.lst configuration with grub2 +# It was copied from tomheadys github repo: +# https://github.com/tomheady/ec2debian/blob/master/src/root/etc/grub.d/40_custom + +prefix=/usr +exec_prefix=${prefix} +bindir=${exec_prefix}/bin +libdir=${exec_prefix}/lib +. ${libdir}/grub/grub-mkconfig_lib + +export TEXTDOMAIN=grub +export TEXTDOMAINDIR=${prefix}/share/locale + +GRUB_DEVICE=/dev/sda1 + + +cat << EOF +set default=${GRUB_DEFAULT} +set timeout=${GRUB_TIMEOUT} +insmod part_msdos +insmod ext2 +insmod gettext +set menu_color_normal=cyan/blue +set menu_color_highlight=white/blue +set root='(hd0,msdos1)' +EOF + +if ${GRUB_HIDDEN_TIMEOUT:-false}; then + printf "hiddenmenu\n" +fi + +linux_entry () +{ + os="$1" + version="$2" + args="$4" + + title="$(gettext_quoted "%s, with Linux %s")" + + cat << EOF +menuentry 'Debian GNU/Linux for OpenNebula, ${version}' --class debian --class gnu-linux --class os { + insmod part_msdos + insmod ext2 + set timeout=${GRUB_TIMEOUT} + set root='(hd0,msdos1)' + echo 'Loading Linux ${version}' + linux ${rel_dirname}/${basename} root=${GRUB_DEVICE} ro ${args} + echo 'Loading initial ramdisk ...' + initrd ${rel_dirname}/${initrd} +} +EOF +} + +list=`for i in /boot/vmlinuz-* /boot/vmlinux-* /vmlinuz-* /vmlinux-* ; do + if grub_file_is_not_garbage "$i" ; then echo -n "$i " ; fi + done` +prepare_boot_cache= + +while [ "x$list" != "x" ] ; do + linux=`version_find_latest $list` + basename=`basename $linux` + dirname=`dirname $linux` + rel_dirname=`make_system_path_relative_to_its_root $dirname` + version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` + alt_version=`echo $version | sed -e "s,\.old$,,g"` + linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" + + initrd= + for i in "initrd.img-${version}" "initrd-${version}.img" \ + "initrd-${version}" "initramfs-${version}.img" \ + "initrd.img-${alt_version}" "initrd-${alt_version}.img" \ + "initrd-${alt_version}" "initramfs-${alt_version}.img"; do + if test -e "${dirname}/${i}" ; then + initrd="$i" + break + fi + done + + initramfs= + for i in "config-${version}" "config-${alt_version}"; do + if test -e "${dirname}/${i}" ; then + initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${dirname}/${i}" | cut -f2 -d= | tr -d \"` + break + fi + done + + linux_entry "${OS}" "${version}" \ + "${GRUB_CMDLINE_LINUX} ${GRUB_CMDLINE_LINUX_DEFAULT}" + + list=`echo $list | tr ' ' '\n' | grep -vx $linux | tr '\n' ' '` +done diff --git a/providers/virtualbox/tasks/boot.py b/providers/virtualbox/tasks/boot.py index fcd25f9..e8abc78 100644 --- a/providers/virtualbox/tasks/boot.py +++ b/providers/virtualbox/tasks/boot.py @@ -7,19 +7,29 @@ class ConfigureGrub(Task): phase = phases.system_modification def run(self, info): + import stat + rwxr_xr_x = (stat.S_IRUSR | stat.S_IWUSR | stat.S_IXUSR | + stat.S_IRGRP | stat.S_IXGRP | + stat.S_IROTH | stat.S_IXOTH) + x_all = stat.S_IXUSR | stat.S_IXGRP | stat.S_IXOTH import os.path device_map_path = os.path.join(info.root, 'boot/grub/device.map') with open(device_map_path, 'w') as device_map: - device_map.write(('(hd0) {dev_path}\n' - '(hd0,1) {root_path}' - .format(dev_path=info.bootstrap_device['path'], - root_path=info.bootstrap_device['partitions']['root_path']))) + device_map.write('(hd0) /dev/sda\n') from common.tools import log_check_call + + from shutil import copy + script_src = os.path.normpath(os.path.join(os.path.dirname(__file__), '../assets/grub.d/10_linux')) + script_dst = os.path.join(info.root, 'etc/grub.d/10_linux') + copy(script_src, script_dst) + os.chmod(script_dst, rwxr_xr_x) + script_src = os.path.normpath(os.path.join(os.path.dirname(__file__), '../assets/grub.d/00_header')) + script_dst = os.path.join(info.root, 'etc/grub.d/00_header') + copy(script_src, script_dst) + os.chmod(script_dst, rwxr_xr_x) log_check_call(['/usr/sbin/chroot', info.root, 'update-initramfs', '-u']) + # Install grub in mbr + log_check_call(['grub-install', '--boot-directory='+info.root+"/boot/", info.bootstrap_device['path']]) - log_check_call(['/usr/sbin/chroot', info.root, - '/usr/sbin/grub-mkconfig', '-o', '/boot/grub/grub.cfg']) - - log_check_call(['/usr/sbin/chroot', info.root, - '/usr/sbin/grub-install', info.bootstrap_device['path']]) + log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub']) From d6e08d8d25ecac0bf7e1ee7895474a4dfe357d10 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 09:00:11 +0200 Subject: [PATCH 07/14] add sample virtualbox manifest --- manifests/virtualbox.json | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 manifests/virtualbox.json diff --git a/manifests/virtualbox.json b/manifests/virtualbox.json new file mode 100644 index 0000000..481d5c5 --- /dev/null +++ b/manifests/virtualbox.json @@ -0,0 +1,37 @@ +{ + "provider" : "virtualbox", + "virtualization": "ide", + + "bootstrapper": { + "mount_dir": "/mnt/target" + }, + "image": { + "name" : "debian-{release}-{architecture}-{virtualization}-{%y}{%m}{%d}", + "description": "Debian {release} {architecture} ({virtualization})" + }, + "system": { + "release" : "wheezy", + "architecture": "amd64", + "timezone" : "UTC", + "locale" : "en_US", + "charmap" : "UTF-8", + "mirror" : "http://ftp.fr.debian.org/debian/" + }, + "volume": { + "backing" : "raw", + "filesystem": "ext4", + "size" : 1024, + "loopback_dir" : "/tmp" + }, + "plugins": { + "user_packages": { + "enabled": true, + "repo": [ "apache2" ], + "local": [] + }, + "root_password": { + "enabled": true, + "password": "test" + } + } +} From df9ac2c0fb5bdef529a14bc8f93784db1e9a70e1 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 09:39:46 +0200 Subject: [PATCH 08/14] fix menu entry label --- providers/virtualbox/assets/grub.d/10_linux | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/virtualbox/assets/grub.d/10_linux b/providers/virtualbox/assets/grub.d/10_linux index 7e944d2..0b08346 100644 --- a/providers/virtualbox/assets/grub.d/10_linux +++ b/providers/virtualbox/assets/grub.d/10_linux @@ -40,7 +40,7 @@ linux_entry () title="$(gettext_quoted "%s, with Linux %s")" cat << EOF -menuentry 'Debian GNU/Linux for OpenNebula, ${version}' --class debian --class gnu-linux --class os { +menuentry 'Debian GNU/Linux, ${version}' --class debian --class gnu-linux --class os { insmod part_msdos insmod ext2 set timeout=${GRUB_TIMEOUT} From afa9352d85f196217635e47881252b12b4b609d8 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 09:52:03 +0200 Subject: [PATCH 09/14] set mirror in bootstrapper instead of image --- base/manifest-schema.json | 6 +++--- common/tasks/bootstrap.py | 4 ++-- manifests/virtualbox.json | 12 ++++++++---- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/base/manifest-schema.json b/base/manifest-schema.json index 21eb276..50780ad 100644 --- a/base/manifest-schema.json +++ b/base/manifest-schema.json @@ -13,7 +13,8 @@ "image_file": { "type": "string" }, "tarball": { "type": "boolean" }, "tarball_dir": { "type": "string" }, - "device" : { "type" : "string" } + "device" : { "type" : "string" }, + "mirror": { "type": "string" } }, "required": ["mount_dir"] }, @@ -30,8 +31,7 @@ }, "timezone": { "type": "string" }, "locale": { "type": "string" }, - "charmap": { "type": "string" }, - "mirror": { "type": "string" } + "charmap": { "type": "string" } }, "required": ["release", "architecture", "timezone", "locale", "charmap"] }, diff --git a/common/tasks/bootstrap.py b/common/tasks/bootstrap.py index 775e715..a1f6ca0 100644 --- a/common/tasks/bootstrap.py +++ b/common/tasks/bootstrap.py @@ -13,8 +13,8 @@ def get_bootstrap_args(info): options.append('--include=' + ','.join(include)) if len(exclude) > 0: options.append('--exclude=' + ','.join(exclude)) - if info.manifest.system['mirror']: - mirror = info.manifest.system['mirror'] + if info.manifest.bootstrapper['mirror']: + mirror = info.manifest.bootstrapper['mirror'] else: mirror = 'http://http.debian.net/debian' arguments = [info.manifest.system['release'], info.root, mirror] diff --git a/manifests/virtualbox.json b/manifests/virtualbox.json index 481d5c5..238ef98 100644 --- a/manifests/virtualbox.json +++ b/manifests/virtualbox.json @@ -3,7 +3,8 @@ "virtualization": "ide", "bootstrapper": { - "mount_dir": "/mnt/target" + "mount_dir": "/mnt/target", + "mirror" : "http://ftp.fr.debian.org/debian/" }, "image": { "name" : "debian-{release}-{architecture}-{virtualization}-{%y}{%m}{%d}", @@ -14,8 +15,7 @@ "architecture": "amd64", "timezone" : "UTC", "locale" : "en_US", - "charmap" : "UTF-8", - "mirror" : "http://ftp.fr.debian.org/debian/" + "charmap" : "UTF-8" }, "volume": { "backing" : "raw", @@ -32,6 +32,10 @@ "root_password": { "enabled": true, "password": "test" - } + }, + "convert_image": { + "enabled": true, + "format": "vdi" + } } } From 5e1a5318907c065142db78ad56ad4eda2cff9f50 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 10:05:45 +0200 Subject: [PATCH 10/14] fix schema name --- providers/virtualbox/manifest-schema.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/virtualbox/manifest-schema.json b/providers/virtualbox/manifest-schema.json index 8c9e8f5..52ac2ee 100644 --- a/providers/virtualbox/manifest-schema.json +++ b/providers/virtualbox/manifest-schema.json @@ -1,6 +1,6 @@ { "$schema": "http://json-schema.org/draft-04/schema#", - "title": "OpenNebula manifest", + "title": "VirtualBox manifest", "type": "object", "properties": { "volume": { From 3dd3e00e5c946d839d6903fc2cc4eeadb552be68 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 10:36:32 +0200 Subject: [PATCH 11/14] add plugin to convert raw images to vdi,qcow etc... --- common/phases.py | 2 ++ plugins/convert_image/__init__.py | 11 +++++++++++ plugins/convert_image/manifest-schema.json | 23 ++++++++++++++++++++++ plugins/convert_image/tasks.py | 16 +++++++++++++++ 4 files changed, 52 insertions(+) create mode 100644 plugins/convert_image/__init__.py create mode 100644 plugins/convert_image/manifest-schema.json create mode 100644 plugins/convert_image/tasks.py diff --git a/common/phases.py b/common/phases.py index 3b44eb2..83743d8 100644 --- a/common/phases.py +++ b/common/phases.py @@ -9,6 +9,7 @@ system_modification = Phase('System modification', 'Installing software, modifyi system_cleaning = Phase('System cleaning', 'Removing sensitive data, temporary files and other leftovers') volume_unmounting = Phase('Volume unmounting', 'Unmounting the bootstrap volume') image_registration = Phase('Image registration', 'Uploading/Registering with the provider') +image_conversion = Phase('Image conversion', 'Conversion/Compression of the image result file') cleaning = Phase('Cleaning', 'Removing temporary files') order = [preparation, @@ -20,5 +21,6 @@ order = [preparation, system_cleaning, volume_unmounting, image_registration, + image_conversion, cleaning, ] diff --git a/plugins/convert_image/__init__.py b/plugins/convert_image/__init__.py new file mode 100644 index 0000000..a36d8f4 --- /dev/null +++ b/plugins/convert_image/__init__.py @@ -0,0 +1,11 @@ + + +def tasks(tasklist, manifest): + from tasks import ConvertImage + tasklist.add(ConvertImage()) + + +def validate_manifest(data, schema_validate): + from os import path + schema_path = path.normpath(path.join(path.dirname(__file__), 'manifest-schema.json')) + schema_validate(data, schema_path) diff --git a/plugins/convert_image/manifest-schema.json b/plugins/convert_image/manifest-schema.json new file mode 100644 index 0000000..6c7fd8d --- /dev/null +++ b/plugins/convert_image/manifest-schema.json @@ -0,0 +1,23 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "title": "Convert image", + "type": "object", + "properties": { + "plugins": { + "type": "object", + "properties": { + "convert_image": { + "type": "object", + "properties": { + "format": { + "type": "string" + } + }, + "required": ["format"] + } + }, + "required": ["convert_image"] + } + }, + "required": ["plugins"] +} diff --git a/plugins/convert_image/tasks.py b/plugins/convert_image/tasks.py new file mode 100644 index 0000000..91f02fc --- /dev/null +++ b/plugins/convert_image/tasks.py @@ -0,0 +1,16 @@ +from base import Task +from common import phases +from common.tasks.filesystem import DeleteMountDir + + +class ConvertImage(Task): + description = 'Convert raw image' + phase = phases.image_conversion + + def run(self, info): + from common.tools import log_check_call + converted_file = info.loopback_file.replace('img',info.manifest.plugins['convert_image']['format']) + log_check_call(['/usr/bin/qemu-img', 'convert', '-O', info.manifest.plugins['convert_image']['format'], info.loopback_file, converted_file]) + import os + os.remove(info.loopback_file) + From 398a4da313a2179a8f9f74fabc142132721c0fbd Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 10:43:29 +0200 Subject: [PATCH 12/14] make mirror mandatory in manifest --- base/manifest-schema.json | 2 +- common/tasks/bootstrap.py | 5 +---- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/base/manifest-schema.json b/base/manifest-schema.json index 50780ad..a8065b0 100644 --- a/base/manifest-schema.json +++ b/base/manifest-schema.json @@ -16,7 +16,7 @@ "device" : { "type" : "string" }, "mirror": { "type": "string" } }, - "required": ["mount_dir"] + "required": ["mount_dir", "mirror"] }, "system": { "type": "object", diff --git a/common/tasks/bootstrap.py b/common/tasks/bootstrap.py index a1f6ca0..a41d697 100644 --- a/common/tasks/bootstrap.py +++ b/common/tasks/bootstrap.py @@ -13,10 +13,7 @@ def get_bootstrap_args(info): options.append('--include=' + ','.join(include)) if len(exclude) > 0: options.append('--exclude=' + ','.join(exclude)) - if info.manifest.bootstrapper['mirror']: - mirror = info.manifest.bootstrapper['mirror'] - else: - mirror = 'http://http.debian.net/debian' + mirror = info.manifest.bootstrapper['mirror'] arguments = [info.manifest.system['release'], info.root, mirror] return executable, options, arguments From b6d716d414f754eefe7326204c1ffbcaa9ab20b6 Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 10:44:18 +0200 Subject: [PATCH 13/14] set full path for binaries --- providers/virtualbox/tasks/boot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/virtualbox/tasks/boot.py b/providers/virtualbox/tasks/boot.py index e8abc78..02943b6 100644 --- a/providers/virtualbox/tasks/boot.py +++ b/providers/virtualbox/tasks/boot.py @@ -30,6 +30,6 @@ class ConfigureGrub(Task): os.chmod(script_dst, rwxr_xr_x) log_check_call(['/usr/sbin/chroot', info.root, 'update-initramfs', '-u']) # Install grub in mbr - log_check_call(['grub-install', '--boot-directory='+info.root+"/boot/", info.bootstrap_device['path']]) + log_check_call(['/usr/sbin/grub-install', '--boot-directory='+info.root+"/boot/", info.bootstrap_device['path']]) log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub']) From f6ce50d4f6f6c4b47139de4fd90422879dc3f26c Mon Sep 17 00:00:00 2001 From: Olivier Sallou Date: Tue, 13 Aug 2013 10:45:35 +0200 Subject: [PATCH 14/14] fix indentation --- providers/virtualbox/tasks/packages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/providers/virtualbox/tasks/packages.py b/providers/virtualbox/tasks/packages.py index 47f5e60..8282122 100644 --- a/providers/virtualbox/tasks/packages.py +++ b/providers/virtualbox/tasks/packages.py @@ -33,7 +33,7 @@ class ImagePackages(Task): 'dhcpcd', 'chkconfig', 'openssh-client', - 'grub2' + 'grub2' ]) exclude.update(['isc-dhcp-client',