diff --git a/providers/one/assets/grub.d/40_custom b/providers/one/assets/grub.d/40_custom index 56419c7..cb035a2 100644 --- a/providers/one/assets/grub.d/40_custom +++ b/providers/one/assets/grub.d/40_custom @@ -17,13 +17,13 @@ GRUB_DEVICE=/dev/sda1 cat << EOF -set default ${GRUB_DEFAULT} -set timeout ${GRUB_TIMEOUT} +set default=${GRUB_DEFAULT} +set timeout=${GRUB_TIMEOUT} insmod part_msdos insmod ext2 insmod gettext set menu_color_normal=cyan/blue -set meu_color_highlight=white/blue +set menu_color_highlight=white/blue set root='(hd0,msdos1)' EOF @@ -40,10 +40,10 @@ linux_entry () title="$(gettext_quoted "%s, with Linux %s")" cat << EOF -menuentry 'Debian GNU/Linux, ${version}' --class debian --class gnu-linux --class os { +menuentry 'Debian GNU/Linux for OpenNebula, ${version}' --class debian --class gnu-linux --class os { insmod part_msdos insmod ext2 - set timeout ${GRUB_TIMEOUT} + set timeout=${GRUB_TIMEOUT} set root='(hd0,msdos1)' echo 'Loading Linux ${version}' linux ${rel_dirname}/${basename} root=${GRUB_DEVICE} ro ${args} diff --git a/providers/one/tasks/boot.py b/providers/one/tasks/boot.py index abedc65..4d7c7f9 100644 --- a/providers/one/tasks/boot.py +++ b/providers/one/tasks/boot.py @@ -30,16 +30,14 @@ class ConfigureGrub(Task): # 'GRUB_HIDDEN_TIMEOUT=true') from common.tools import log_check_call - log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub']) - log_check_call(['/usr/sbin/chroot', info.root, 'cat', '/boot/grub/grub.cfg']) - log_check_call(['/usr/sbin/chroot', info.root, 'cat', '/boot/grub/device.map']) + #log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub']) + #log_check_call(['/usr/sbin/chroot', info.root, 'cat', '/boot/grub/grub.cfg']) + #log_check_call(['/usr/sbin/chroot', info.root, 'cat', '/boot/grub/device.map']) log_check_call(['/usr/sbin/chroot', info.root, 'ln', '-s', '/boot/grub/grub.cfg', '/boot/grub/menu.lst']) log_check_call(['/usr/sbin/chroot', info.root, 'update-initramfs', '-u']) - log_check_call(['/usr/sbin/chroot', info.root, 'ls', '-l', '/boot/']) - #sed_i(info.root+'/boot/grub/device.map','/dev/sda','/dev/mapper/loop0p1;') log_check_call(['grub-install', '--boot-directory='+info.root+"/boot/", '/dev/loop0']) - #sed_i(info.root+'/boot/grub/device.map','/dev/mapper/loop0p1;','/dev/sda') + log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/update-grub']) class BlackListModules(Task): description = 'Blacklisting kernel modules' diff --git a/providers/one/tasks/security.py b/providers/one/tasks/security.py index cdf519b..af1aa8c 100644 --- a/providers/one/tasks/security.py +++ b/providers/one/tasks/security.py @@ -18,7 +18,7 @@ class SetRootPassword(Task): def run(self, info): from common.tools import log_check_call if info.manifest.credentials['root']: - log_check_call(['/usr/sbin/chpasswd'], 'root:'+info.manifest.credentials['root']) + log_check_call(['/usr/sbin/chroot', info.root, '/usr/sbin/chpasswd'], 'root:'+info.manifest.credentials['root']) class DisableSSHPasswordAuthentication(Task): description = 'Disabling SSH password authentication'