diff --git a/common/tasks/boot.py b/common/tasks/boot.py index d04043f..127c77e 100644 --- a/common/tasks/boot.py +++ b/common/tasks/boot.py @@ -126,5 +126,6 @@ class InstallExtLinux(Task): def run(cls, info): from common.tools import log_check_call log_check_call(['/usr/sbin/chroot', info.root, - '/usr/bin/extlinux', - '--install', '/boot']) + '/usr/sbin/extlinux-install', info.volume.device_path]) + log_check_call(['/usr/sbin/chroot', info.root, + '/usr/sbin/extlinux-update']) diff --git a/providers/virtualbox/__init__.py b/providers/virtualbox/__init__.py index 6a3f329..9d49f01 100644 --- a/providers/virtualbox/__init__.py +++ b/providers/virtualbox/__init__.py @@ -20,6 +20,9 @@ def validate_manifest(data, validator, error): schema_path = os.path.normpath(os.path.join(os.path.dirname(__file__), 'manifest-schema.json')) validator(data, schema_path) + if data['volume']['partitions']['type'] == 'none' and data['system']['bootloader'] != 'extlinux': + error('Only extlinux can boot from unpartitioned disks', ['system', 'bootloader']) + def resolve_tasks(tasklist, manifest): import common.task_sets diff --git a/providers/virtualbox/manifest-schema.json b/providers/virtualbox/manifest-schema.json index c366294..d1b0d4b 100644 --- a/providers/virtualbox/manifest-schema.json +++ b/providers/virtualbox/manifest-schema.json @@ -16,7 +16,7 @@ "properties": { "bootloader": { "type": "string", - "enum": ["grub"] + "enum": ["grub", "extlinux"] } } },