52-force-text-mode-console, running after 51-bootloader, calls
grub2-mkconfig (on Ubuntu that will happen via the update-grub call).
This call will overwrite all the changes that 51-bootloader did to the
grub.cfg. By merging the 52-force-text-mode-console code into
51-bootloader we avoid that. This also means that 51-bootloader will now
call grub2-mkconfig regardless of whether there is already and existing
grub2 configuration or not (52-force-text-mode-console did that in the
past anyway).
Additionally this commit enables the force to textmode code for openSUSE
(was previously only working correctly for Ubuntu and Fedora).
Closes-Bug: #1260323
Change-Id: Ida8e1a69df22d41ad70eb7154707c50613b536a8
This is currently experimental/incomplete. See
elements/opensuse/README.md for details.
Change-Id: Ie5bcab15c9703cf15ceb642fb986a8afc34f96fb
Co-Authored-By: Ralf Haferkamp <rhafer@suse.de>
Since we are using bash syntax in some of the element fragments,
we should make sure we use bash for all of them, so that things don't
break on systems where /bin/sh != /bin/bash.
Change-Id: If2f043c57aa4e1492b7f9839213ef6123f683612
Changing the grub config makes no sense in a build not heading for a vm
and may fail because grub is removed from images not including the vm
element. Forcing textmode for those images would be better done in nova.
Change-Id: I1c5b89e551e62df2463200b1889cb2342498c7dd
When uninstalling grub2, leave all its dependencies
including grub2-tools installed to minimise the number of packages
which need to be installed in the finalise stage.
Since the yum cache is unmounted during finalise, installing
grub2 in finalise is slowed by re-populating the yum cache.
This change copies the grub2 rpm out of the yum cache so it can be installed
from file during finalise.
This should prevent disk becoming full during finalise on Fedora.
Closes-Bug: #1217185
Change-Id: If095adc4abb52a19a3aa0b1caebfb3e4d8f605ef
If GRUB2 is not available in the system a fallback to install Extlinux
will happen. This patch also allows you to enforce the use of Extlinux
exporting the DIB_EXTLINUX variable.
Change-Id: I88fa792a0bd19cacca167134f2054b11c807a451
This patch is part of a another big patch that will implement a fallback
to Extlinux in case GRUB2 is not available in the system. The reason why
it's being splitted in two patches is because git is not being able to
recognize the file changes when the rename happens in the same commit.
Change-Id: Ic2027dfa057fd6d62b532203b7ff50c3c739bccb
If you have an EFI host but the image doesn't have the EFI modules
installed the grub-install command will fail in case the --target
argument is not set. The problem is that the grub-install script will
check whether the /sys/firmware/efi file exists or not to determine if
it's an EFI installation, but this value comes from the host, so this
patch will look for the /sys/firmware/efi file and will also check if
the EFI modules are installed in the image, if not set the --target to
a non-efi platform.
Change-Id: I4481b43e4a8fe4144be9c7eb9d9c618bbb2df21e
In the 51-grub hook, after the GRUB installation, the script will look
for a GRUB configuration file and in case it's not present one will
be generated using the grub-mkconfig command. The reason why it have
to be done is because the new Fedora 19 cloud images is using extlinux
by default.
Change-Id: I80b15b3122698d98ac4d47dc06faf5909a90ab00
The images produced by the diskimage-builder have their filesystem with
a label of "cloudimg-rootfs", so we need to change the default /etc/fstab
on fedora to reflect that.
Change-Id: Id1bb00cb81cb200a114f500e26272624be577da0
Qemu-nbd does not perform well with older versions of qemu due to
the lack of writeback caching mode. It also only builds qcow2 images
and there is a desire for raw image support. Finally, qemu-nbd makes
it very difficult to build images concurrently due to the somewhat
opaque nature of how it selects a /dev/nbd# device. losetup, on
the other hand, makes this process very straight forward.
Change-Id: I309fad8af4fd1e8d1720c17b65e1897a76d5e897
Co-Author: Clint Byrum <clint@fewbar.com>