Commit Graph

33 Commits

Author SHA1 Message Date
Marcus Schäfer
531c0db1a1
Skip isolinux ui setup on serial terminal config
If the attribute bootloader_console="serial" is set, the
expectation that there is no graphics hardware available is
valid. Thus the isolinux setup should not contain any ui
configuration instructions because that leads to run the
graphics initialization which blocks the system if not
present. Please note the bootloader_console allows for
multiple console configuration. In mixed setup the ui
configuration still applies. This Fixes #1153
2019-10-24 11:35:48 +02:00
Marcus Schäfer
21a573756e
Delete unused template data
With the move to grub2 mkconfig some static template data
became obsolete. This commit removes the unused data
2019-10-16 12:10:32 +02:00
Dan Čermák
b015b91679
Stop inheriting from object
This is no longer required in Python3
2019-08-22 15:43:27 +02:00
Marcus Schäfer
af29f5b430
Fixed zipl bootloader setup
targetgeometry not allowed for targettype SCSI
2019-08-01 16:34:50 +02:00
Marcus Schäfer
21d48c74c6
Allow multiple values for grub terminal setup
With regards to the grub documentation from
https://www.gnu.org/software/grub/manual/grub/grub.html#terminal_005finput
multiple terminal consoles can be active. This patch allows
to specify terminal collection between serial, console and gfxterm
This Fixes #1123
2019-07-23 11:25:59 +02:00
Marcus Schäfer
15488ff635
Update Boot From Hard Disk method
Instead of searching for an efi binary to boot, use the exit method
that exits from grub and let the firmware choose the next entry
in the device list
2019-07-03 18:39:46 +02:00
Marcus Schäfer
dab7b8732a
Refactor ISO boot, use grub in EFI mode
Before this commit isolinux was used to boot an ISO and
thus forms a hard requirement. isolinux however only
exists for the x86 platform. This limitation did not
allow to create ISO images for other platforms. With this
commit a refactoring of the ISO boot setup is introduced.

* isolinux is only used if the bios firmware is requested
  and the platform matches the x86 architecture. A runtime
  check will check for this condition and exits early if
  not applicable

* in case of the EFI firmware we already used grub in
  EFI mode but still had isolinux in place for the legacy/CSM
  boot. That part is now also replaced by a platform specific
  grub eltorito image and grub's boot_hybrid.img for hybrid
  boot. On platforms that do not provide those modules the
  support for it will be skipped

With this change in place it's possible to control the ISO
boot layout through the firmware setup and all platform
specific modules are handled as such. Therefore we also
deleted the syslinux requirement. This Fixes #1092
2019-07-02 11:56:02 +02:00
Marcus Schäfer
f5bac4495d
Fixed location of grub unicode font file
grub2 is expecting the unicode font below the fonts
directory in the /boot/grub*/ depending on how the
distribution installs grub2. This Fixes bsc#1119416
2019-01-24 17:07:54 +01:00
Marcus Schäfer
0af8028387
Allow to switch off install image boot timeout
This commit adds a new attribute called:

    <type ... install_continue_on_timeout="true|false"/>

It allows to setup the boot timeout for install images
build with KIWI. If not set or set to 'true' the configured
boottimeout or its default applies to the install image
as it was before. If set to 'false' there will be no
timeout in the install image bootloader setup and the boot
only continues on manual intervention.
2019-01-17 10:09:40 +01:00
Marcus Schäfer
1d5b35498c
Avoid module loading in grub config template
This patch is two fold. First part replaces the import of
dedicated video modules in the grub image by the all_video
module. Second part avoids runtime module insertion which
requires access to the boot filesystem which is not
guaranteed on sophisticated rootfs structures like btrfs
plus readonly snapshots and what not. Thus we make sure
all boot code is embedded into the grub image(s) and no
extra loading of modules at runtime will be needed.
This Fixes bsc#1096937
2018-06-13 11:08:09 +02:00
Marcus Schäfer
f8c73e2ca3
Cleanup api doc strings
This cleans up and fixes the api documentation for
the public interface of the projects boot source code
files and Fixes #700
2018-04-17 17:56:13 +02:00
Martin Mohring
3c552d4a2f [boot] fix double quote in grub menu which makes kernel updates for CentOS / RHEL / Fedora break grub.cfg 2017-12-29 00:12:19 +01:00
Marcus Schäfer
7c3daf4c80
Show results in a dialog 2017-09-21 12:34:55 +02:00
Marcus Schäfer
21203bb4ef Add mediacheck handler for live iso
This fixes bsc#1049304
2017-09-09 19:48:47 +02:00
David Cassany
8d696cd20b Adding mediacheck menu entry for liveCDs
This commit adds the checkiso attribute in type tag, only available for
iso image types. Checkiso is boolean that determines the presence of0
a Mediacheck menu entry or not in the bootloader.

This patch is related to bsc#1049304
2017-07-27 15:43:21 +02:00
Marcus Schäfer
20d12a18c2 Fixup grub2 setup and tool calls
Depending on the distribution the grub tools are either named
grub2-tool or grub-tool. Additionally the grub configuration
data is expected to live in boot/grub2 or boot/grub. This commit
handles the tool calls and also the grub boot directory setup
in a generic way
2017-04-04 16:17:31 +02:00
Thorsten Kukuk
cf11dac326 Replace tabs with spaces 2016-11-15 15:31:38 +01:00
Thorsten Kukuk
132fd3d3dc Remove empty line too much 2016-11-13 11:15:04 +01:00
Thorsten Kukuk
119541c611 Implement loading of snapshots and fix snapshot menu layout.
If you want to boot an old snapshot, but not to do a rollback,
we need to tell the kernel which snapshot to use. This patch
also fixes the broken layout of the grub snapshot menu.
2016-11-13 11:08:03 +01:00
Thorsten Kukuk
9c355a796c Move source of grub-snapshot.cfg to the right position
grub-snapshot.cfg should not be sourced at the begining, but
at the end of grub.cfg. Else with creating the first snapshot
this entry is getting the default boot target and the system
does not boot automatically anymore.
2016-11-12 18:24:38 +01:00
Marcus Schäfer
c90211efe7
grub.cfg: Source grub-snapshot.cfg if present
Add a lookup for /.snapshots/grub-snapshot.cfg to the generated
grub.cfg. The file is shell sourced if it exists
2016-11-09 17:13:56 +01:00
David Cassany
908716f8ec Load the default unicode font in grub2
This commit fixes #179. The default font was never loaded,
the loadfont call for the default was missing.
2016-11-04 11:02:23 +01:00
Marcus Schäfer
0377b8fe02
Fixup theme setup in grub2 config template
Only set the theme if the .txt file describing it exists
2016-09-16 11:21:25 +02:00
Marcus Schäfer
3e7676c85d
Added serial console support for isolinux loader
Generate a serial line setup for the isolinux.cfg file
according to the bootloader_console attribute from the
XML description. In addition delete the use of the obsolete
vga kernel parameter and work with the MENU RESOLUTION
ui configuration parameter instead
2016-06-24 14:30:26 +02:00
Marcus Schäfer
b031748cdd
Fix grub bootloader template
Keep gfxpayload
2016-06-21 14:26:42 +02:00
Marcus Schäfer
ce102396a2 Fixed grub2 bootloader config template
Load fonts only when they exist, do not duplicate font
setup in template
2016-06-21 11:18:12 +02:00
Marcus Schäfer
a4a9ffa9aa Added support for setting the bootloader console
Some bootloader e.g grub supports graphics, text and also
serial consoles to hand over the output of the bootloader
menu. With this patch we allow to customize the console
used by the bootloader. So far only grub makes use of the
new attribute

    <type ... bootloader_console="serial|console|gfxterm"/>

This references Trello:

    https://trello.com/c/q9EhNKKV/155-support-for-grub2-serial-console
2016-06-20 18:24:43 +02:00
Marcus Schäfer
5e8c10471a
Update grub2 config tempplate
Load font collection
2016-06-09 17:50:07 +02:00
Marcus Schäfer
e699dc10ee Fixup grub2 theme setup
We can't expect that specific fonts to exist for all theme packages
in all distributions. The code here should rely only on theme.txt
In addition we check if any theme or font related data is found
in the legacy grub location boot/grub which imho should not be
used for grub2
2016-06-08 20:41:10 +02:00
Marcus Schäfer
17de09d26d
Added support for grub2 console switch entry
An additional hidden entry allows the user to switch between the
graphics and the serial console by pressing the 't' key. The kiwi
grub2 template adds this switch if the terminal mode is set to
graphics. The additional entries are only effective of the
grub_platform is set to efi. Fixes #80
2016-05-23 11:33:46 +02:00
Marcus Schäfer
cf991c1a4c
Update grub2 bootloader template menuentries
Mark all menuentries as --unrestricted. Fixes #64
2016-04-29 15:49:10 +02:00
Marcus Schäfer
37ad6008aa
Update bootloader/template inline API documentation
References #49
2016-04-13 11:50:14 +02:00
Thomas Schraitle
45bc5a03a7 Refactor into subpackage to fix #23
Codecoverage are 100% and tests are green

Changes:
* Refactor archive_*.py -> archive subpackage
* Refactor partitioner_*.py -> partitioner subpackage
* Refactor package_manager_*.py -> package_manager/ subpackage
* Refactor bootloader_config*.py -> bootloader/config/ subpackage
* Refactor bootloader_template*.py -> bootloader/template/ subpackage
* Refactor bootloader_install*.py -> bootloader/install/ subpackage
* Refactor repository*.py -> repository/ subpackage
* Refactor filesystem*.py -> filesystem/ subpackage
* Refactor dist_*.py -> dist/dformat subpackage
  The name `dformat` as package name is needed to avoid any name
  conflicts with the built-in function `format`.
* Refactor volume_manager*.py -> volume_manager/ subpackage
* Refactor boot_image*.py -> boot/image/ subpackage
2016-02-27 10:31:31 +01:00