summaryrefslogtreecommitdiffstats
path: root/perl-install/bootloader.pm
Commit message (Collapse)AuthorAgeFilesLines
* (get_grub2_pkg) split it outThierry Vignaud2024-01-041-10/+15
|
* Ensure efivars are mounted before installing a UEFI bootloader (mga#31008)Martin Whitaker2022-10-241-0/+4
| | | | | | | | | The old way of accessing EFI NVRAM variables via /sys/firmware/efi/vars was removed in Linux 6.0. The new way is to use the efivarfs pseudo- filesystem, which is usually mounted at /sys/firmware/efi/efivars. We need to make sure this is actually mounted before attempting to install a UEFI bootloader, otherwise any attempt to write to the EFI NVRAM will fail.
* Factor out code to mount the efivarfs pseudo-filesystem.Martin Whitaker2022-10-241-3/+1
|
* bootloader: don't completely remove failsafe/nonfb entries on upgrade.Martin Whitaker2022-08-111-1/+3
| | | | | | | | | bootloader::suggest() removes any failsafe and nonfb entries for old kernels on the assumption it will then add them for a newer kernel. This is particularly a problem when using rEFInd, where we only keep the entries for the default (unversioned) kernel, but would also eliminate the failsafe/nonfb entries when using the installer upgrade option to quickly repair the bootloader.
* drakboot: add options to change the rEFInd background (mga#28073)Martin Whitaker2022-08-091-4/+49
|
* Fix missing 'my' on local variable declaration.Martin Whitaker2022-08-091-1/+1
|
* bootloader: rework reading/writing of main rEFInd config file.Martin Whitaker2022-08-081-15/+54
| | | | | At the moment we only use and modify one setting, but the next commit will change that.
* Use substInFile instead of sed.Martin Whitaker2020-12-211-2/+2
|
* Add option to configure rEFInd to not use EFI NVRAM (mga#27838)Martin Whitaker2020-12-211-1/+40
| | | | | The combination of this and installing in \EFI\BOOT provides a workaround for machines where the NVRAM is broken or worn out.
* Factor out write to rEFInd PreviousBoot variable (prep. for next commit)Martin Whitaker2020-12-211-16/+21
|
* Fix false detection of GRUB2 when installed in ESP but not in /boot.Martin Whitaker2020-12-191-1/+1
| | | | | This caused the installer to select non-graphical GRUB2 as the default bootloader method (mga#27816).
* Keep timeout value when it's 0 (mga#27158)Thierry Vignaud2020-08-211-1/+2
| | | | | Rationale: setVarsInSh() excludes lines where value is 0, undefined or empty string
* Fix failure to update grub2 config when service_harddrake attempts to ↵Martin Whitaker2020-08-151-3/+5
| | | | add/remove the nokmsboot option.
* Fix switch from GRUB2 to rEFInd when installed in \EFI\BOOT.Martin Whitaker2020-06-211-0/+4
|
* Detect GRUB2 bootloader when installed in \EFI\BOOT.Martin Whitaker2020-06-211-1/+2
|
* Simplify UEFI bootloader detection.Martin Whitaker2020-06-211-10/+10
|
* Add option to install GRUB2 as EFI default/fallback bootloader.Martin Whitaker2020-06-161-1/+6
| | | | | | i.e. in \EFI\BOOT instead of in \EFI\mageia. This should be used if installing on a removable device, and provides a workaround for buggy BIOSs that don't respect the EFI NVRAM settings.
* Don't die in write_grub2 if grub.cfg doesn't exist (mga#26676).Martin Whitaker2020-05-291-1/+1
| | | | | This bug was introduced by the change from renaming to copying grub.cfg. renamef doesn't fail if the file doesn't exist. cp_af does.
* - bootloader:Thomas Backlund2020-05-081-2/+2
| | | | | | fix typo x86 -> x64 for matching 64bit grub2-efi(x86-64) (martinw) (bug introduced in commit: e540363478de809a2a9769c5794b3adab60b63eb)
* (install_raw_grub2) rename /boot/efi as /boot/EFIThierry Vignaud2020-05-011-0/+4
| | | | | | | Mageia mounts the ESP as /boot/EFI and thes grub2 looks at /boot/EFI/EFI But some windows installation end in having /boot/EFI/efi (lowercase) Rename the directory as upercase if needed so that grub2-install doesn't fail (mga#22395)
* simplifyThierry Vignaud2020-03-251-10/+4
|
* perl_checker cleanups + kill unused variableThierry Vignaud2020-03-251-3/+2
|
* copy instead of renaming grub.cfg (mga#25542)Thierry Vignaud2020-03-201-1/+2
| | | | | rationale: update-grub2 (or more likely os-prober) 's failure can leave the system in an unbootable state
* drakboot: support setting up uefi on aarch64Pascal Terjan2020-01-011-1/+4
| | | | | | | | Partially tested on Amazon EC2, instance still didn't boot (as it needed it to be installed in removable mode (EFI/boot/bootaa64.efi) to be found) but at least drakboot --boot worked (except for failing to enabled acpid service) and things seem to be in the expected place.
* Avoid calling ped_disk_probe() when setting up bootloader.Martin Whitaker2019-04-201-1/+1
|
* Support 32-bit UEFI with 64-bit O/S.Martin Whitaker2018-12-171-2/+13
|
* Only enable rEFInd bootloader if kernel type matches BIOS type.Martin Whitaker2018-12-171-1/+1
| | | | | | Although we could install a working rEFInd boot manager, it uses the kernel EFI stub loader to boot the O/S, and that won't work if the EFI types don't match.
* bootloader: only prefer rEFInd if it installed in the root fs (mga#23944)Martin Whitaker2018-12-081-1/+1
|
* doc: explain how to support a bootloaderThierry Vignaud2018-11-221-0/+46
|
* update doc after previous commitThierry Vignaud2018-11-221-4/+12
| | | | | should have been done with: commit 5583c3f9e8de83b614f0707c91ee40227ceec604
* ignore GPT disk w/o BIOS boot part (mga#23844)Thierry Vignaud2018-11-191-1/+1
| | | | | | | in automatic mode, we would potentially suggest a wrong disk if first disc has a GPT layout _without_ a BIOS boot partition. rationale: GPT disks w/o a BIOS boot partition do not have free space for grub2 to embed
* (allowed_boot_disks) split it outThierry Vignaud2018-11-191-4/+9
| | | | needed for next commit
* drakboot: minor fixes to reading/writing rEFInd config filesMartin Whitaker2018-10-121-2/+2
| | | | | | | Fixes a couple of issues found when reading a manually generated file: - allow for extra white space between label and append options - don't simplify the label when writing - rEFInd allows any text string here
* drakboot: add support for the rEFInd boot manager (mga#15153)Martin Whitaker2018-09-231-2/+107
|
* bootloader: include the 'Mageia' entry in the grub2 Default choices (mga#23393)Martin Whitaker2018-08-111-1/+1
| | | | | A parsing bug in bootloader::read_grub2() stopped the main menuentry being added to $bootloader{entries}.
* bootloader: add cma=256M@512M for Raspberry Pi DRM/VC4topic/extlinuxOlivier Blin2018-05-161-1/+1
|
* bootloader: add specific boot options for Raspberry Pi I/O scheduler (deadline)Olivier Blin2018-05-161-1/+1
| | | | | | | | | elevator=deadline is supposed to give better performance on flash storage, and used by default on most Raspberry Pi distributions. Ideally, this should not be set here for specific boards, but automatically for all architectures depending on the storage type. Archlinux appears to use a /etc/tmpfiles.d/set_IO_scheduler.conf file for this.
* bootloader: add specific boot cmdline options for Raspberry Pi serial consoleOlivier Blin2018-05-161-0/+5
| | | | | | | | | | console=ttyS0,115200 will work on Raspberry Pi 3. Raspberry Pi 2 does not boot without console=tty1 on cmdline. To have console output on both serial port and HDMI display, 8250.nr_uarts=1 is needed. On Raspberry Pi 2, though, it is required to edit /boot/extlinux/extlinux.conf to use ttyAMA0 instead of ttyS0 in the console parameter.
* bootloader: read/write extlinux.conf in U-Boot backend for ARMOlivier Blin2018-05-161-7/+87
| | | | | | | | | | | | | Read and write an extlinux.conf file in /boot/extlinux, it will be automatically found by U-boot if located on an active partition. Keep the "uboot" backend name, since we may do some U-Boot installation steps later on. Also, the extlinux.conf code could be used to support other bootloaders from the syslinux family. fixup extlinux
* bootloader: create /usr/lib/linux symlink for devicee tree filesOlivier Blin2018-05-131-0/+19
| | | | Also save it as fdtdir
* bootloader: build initrd for ARM archOlivier Blin2018-05-131-2/+0
| | | | It is needed for root devices with LABEL or UUID.
* drakboot: detect 32-bit UEFI GRUB2 bootloader when probing.Martin Whitaker2018-03-121-1/+1
| | | | This is the only missing piece for supporting 32-bit UEFI boot.
* Fix parsing of grub2 menu entries to support 16-bit mode (mga#21247).Martin Whitaker2018-01-091-1/+1
| | | | | This enables bootloader::read_grub2 to recognise the initrd16 keyword, which is used by default on x86 machines.
* Fix drakboot video mode selection when using grub2 (mga#21246)Martin Whitaker2018-01-091-3/+12
| | | | | | | | | | | | | The video mode needs to be extracted from and written back to the GRUB_CMDLINE_LINUX_DEFAULT parameter in /etc/defaults/grub2. This fix creates a new "default_vga" key in the $bootloader hash to hold the current selection. Using the existing "vga" key would cause the default video mode to be added to any bootloader entries that don't have a specific "vga" value, e.g. the "failsafe" entry. The $bootloader "vga" value doesn't appear to be set anywhere else, so may in fact be obsolete.
* Revert "do not alter /etc/default/grub on kernel updates"Thierry Vignaud2018-01-091-4/+6
| | | | | This reverts commit 7bb01fb038e0a882e755b963110bda381336b748 and commit 4c1cb5006360ccb780926000bd57f150e0fc8fbe
* Combine bootloader perImageAppend and default_append keys.Martin Whitaker2018-01-091-3/+5
| | | | | This allows changes to the append options to propagate to the grub2 configuration file, thus fixing mga#21263 and mga#21250.
* fix doble quotes in perldocThierry Vignaud2018-01-071-6/+6
|
* (read_grub2) handle several levels of submenusThierry Vignaud2017-09-181-1/+1
| | | | needed anyway after last commit
* read_grub2: fix undefined labels (mga#19014)Thierry Vignaud2017-09-181-1/+1
| | | | | | | | | | | we were wrongly assuming we entered a new entry when reading eg: "${xen_rm_opts}" (which is why most people never see that error and why I wasn't able to reproduce it, one would need Xen or similar to be installed) Then drakboot would crash with: drakboot crashed ("undefined value for mandatory argument 'text' encountered at ugtk3.pm" Theorically, it could happen with DrakX too when updating a system with Xen.
* (read_grub2) handle both linux & linux16Thierry Vignaud2017-09-181-1/+1
| | | | thus we got more data