Commit Graph

190 Commits

Author SHA1 Message Date
Roland Clobus 0959dda89f
dracut: Support diverted configuration files of Calamares
When a configuration file for Calamares is diverted by e.g.
`config-package-dev`, it becomes a symlink. The in-place modifications
must be applied on the symlinked file, not on a newly created copy.
After removal of the package, no remainders are left.

See https://salsa.debian.org/live-team/live-build/-/merge_requests/353#note_540394
2024-11-01 17:39:22 +01:00
Roland Clobus 567e03034b
Add support for dracut
Mini case:
`lb config --distribution sid --debian-installer none --cache-packages false --archive-areas "main" --initramfs dracut-live`

Support includes debian-installer and Calamares

Closes: #1031903
2024-10-25 11:39:28 +02:00
Roland Clobus f290d31960 hooks: Remove /etc/.pwd.lock and /run/mount/utab
When the zero-byte file /etc/.pwd.lock is present in the ISO image,
diffoscope will abort
(https://salsa.debian.org/reproducible-builds/diffoscope/-/issues/367)

This file will be generated when needed, so it can be removed from the
image.

Cleanup /run/mount/utab (and its directory)
2024-04-29 16:27:41 +00:00
Roland Clobus 724f449e0d binary_bootloader_splash: New script
Allows for scenarios without syslinux (e.g. arm64)
Breaking change: custom splash.svg images must be placed in
config/bootloaders
2024-04-29 16:27:41 +00:00
Roland Clobus 0845468303 Reproducible install-info
This fixes the last non-reproducible file for KDE (bookworm):
* install-info has an unstable sort when a new section is started
  Newer versions (not yet released) have been fixed
* The backup file (dir.old) does not need to be in the live image
2024-02-23 16:54:07 +00:00
Marcel Partap 95fc0dfdaf Remove ancient hook 9030-remove-apt-sources-lists that was never run
because it doesn't end on ".hook.chroot", so it wouldn't be linked from
the `lb config` stage. Probably to the better, as it does not seem very
useful to indiscriminately raze all apt sources lists.
2023-07-18 13:12:29 +02:00
Roland Clobus 2944c4652a
UEFI-secure: Use the signed font
In secure boot mode, only the unifont.pf2 is inside the signed
.efi-file. To make secure and non-secure boot identical, use only the
unifont.
2023-04-30 12:53:32 +02:00
Roland Clobus 809346bc1e
Update splash image
The font size was reduced to fully capture the long live-build version.
Exported without Inkscape information.
Manually adjusted the coordinates to use integers instead of fractional
coordinates (for sharper conversion to png).
2023-04-30 10:02:19 +02:00
Roland Clobus 7690fb206f
Share the splash screen from isolinux in grub
This adds the version information on the grub splash screen and offers
the image at 800x600 instead of 640x480, which looks less unsharp.
2023-04-30 09:15:44 +02:00
Roland Clobus efa9ed8b59
Update for Lintian warnings 2023-03-05 09:59:49 +01:00
Roland Clobus 045de9bf64
Renumber hooks and update where needed
See https://lists.debian.org/debian-live/2022/04/msg00014.html
2023-03-04 17:08:44 +01:00
Ryan Finnie 5e01a0c09f
Memtest GRUB fixes
Previous commits to support Memtest86+ 6.00+ split the files into
"memtest" (backwards compatible / new BIOS name) and "memtest.efi"
(new EFI name).  However, the 6.00 non-EFI binaries are now
32/64-bit, and will not work with GRUB's linux16 boot when using GRUB
for BIOS boot.

- Legacy Memtest86+ pre-6.00 will continue to be "memtest", linux16
  (continue to support builds on current Debian stable bullseye)
- Change 6.00+ filename to "memtest.bin"
- GRUB memtest.cfg contains logic for legacy / new bios / new EFI
- Change EFI boot from "chainloader" to "linux", which allows for
  passing command line options to Memtest86+
- syslinux @MEMTEST@ will conditionally be memtest.bin or memtest
- @MEMTEST_BIN@ will conditionally be memtest.bin or memtest, but is
  completely legacy at this point (all internal code paths now check
  for @MEMTEST_DIR@/memtest or @MEMTEST_DIR@/memtest.bin)

Getting complicated, but this logic can be simplified again once we
no longer need to support current Debian stable.
2023-01-02 09:40:17 -08:00
Ryan Finnie 1d6f6dd178
memtest: Support arch-specific and EFI memtest86+ 6.00
- BIOS: Final filename doesn't change (memtest), but now uses a
  64-bit version on amd64.
- EFI: Now included as memtest.efi; 32-bit on i386, 64-bit on amd64.
  As it's GRUB-only, we can test for the existence of memtest.efi
  (6.00+ only) in GRUB itself.
- Add @MEMTEST_DIR@ to facilitate directory-based testing in GRUB.

This expands upon the previous MVP commit
15e78a3eec .
2022-10-31 21:55:14 -07:00
Sophie Brun b9b32ad41f
Harmonize menu entries (uefi / bios) and add a variable for the templates 2022-01-26 11:13:30 +01:00
Roland Clobus dc1a03d053
Reproducible fix for glibc 2021-01-23 21:26:09 +01:00
Ryan Finnie b8279ed4a1
Bugfix: Fix grub.cfg pc/ENABLE_MEMTEST check
Grub [ uses "-a", not "&&".
2021-01-01 22:54:47 -08:00
Ryan Finnie 169645b478 grub-efi: Show fwsetup, do not show incompatible memtest even if enabled 2020-10-12 11:34:52 +00:00
Raphaël Hertzog c3968cf1c6
Use truncate --no-create --size=0 to truncate files
This avoids the permission error due to /proc/sys/fs/protected_regular = 2
setting which is now enabled by default in bullseye.
2020-09-25 11:49:03 +02:00
Lyndon Brown 0afd3625ed bootloaders: reorganise installer menu entries
per layout from MR #199 discussion.

under "Advanced install options" we have:
  - Graphical installer
  - Text installer
  - Graphical installer with dark theme
  - Text installer with dark theme
  - Installer with speech synthesis

under each of these we have a set of:
  - Install
  - Expert install
  - Automated install
  - Rescue mode

note that the 'automated' entries are moved up before the 'rescue' entries.

for hotkeys, the four entries above have hotkeys of 'i', 'x', 'a', and 'r'
respectively. ('x' is used instead of 'e' to avoid clash with standard
grub hotkey). this means that some entries that previous had no hotkeys
due to the flat list now have them. the other big difference is the main
graphical install entry going from 'g' to 'i' for consistency and the main
speech synth entry going from 's' to 'i' for the same reason.

furthermore, in the level above we have 'g' for normal graphical, 't' for
normal text install, 's' for speech synth, 'd' for graphical dark mode,
and 'k' for text dark mode.

the text-only sets are identical to the graphical ones except only for
dropping the graphical groups, simplifying maintenance, bringing clarity
to users of images (who may not have even made the image) that the set is
text-only, and keeping consistent hotkeys between graphical and text-only.

a 'start installer with speech synthesis' entry shortcut has been placed
at the top menu level alongside the 'start installer' shortcut.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown ab2e8a91f5 bootloaders: add accessible dark contrast installer menu options
following official install discs.

i've not bothered to update grub-legacy this time.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown 9b2564a3ff bootloaders: add advanced speech synth install entries
following the presence of them in the official install discs.

also drops unnecessary word "graphical" from existing speech
synth entry, following official Debian install discs.

i've not bothered to update grub-legacy this time.

Gbp-Dch: Short
2020-05-15 19:35:09 +00:00
Lyndon Brown 21c697617d bootloaders: add timezone to splash timestamp 2020-05-03 23:20:39 +01:00
Lyndon Brown 69dc8c21cb bootloaders: tweak default splash text to avoid overlap
the default grub config has a quirk of using the syslinux splash when
present, which as a sidenote i believe is because only the syslinux script
has the code for converting an SVG (i've not researched to confirm).

the problem is that the default splash is such, with the text listing
package versions used, that this overlaps with the menu title in grub.

i've tweaked the "built on" and package details text to reduce its size
(bumped the line-height up slightly though) to avoid the overlap.

this was a pain in the *** to get done. inkscape likes to crash at the
slightest little thing like clicking on interface controls; each time it
saves it seems to swap a bunch of stuff in the file which can make a
hugely messy diff, i had to save, close, open, change, undo, and save
again, just to get a sain diff; and numerous times testing different sizes
and such in actual builds (rather than separate conversions) some of the
package detail lines would for some unknown reason decide to end up on the
same line as another, wth...

anyway, i've finally managed to get a new revision successfully created
and it seems bug free wrt. that same line issue to me, both converting
outside of live-build (in my sid host), and within a buster build. the size
of the text changed seems closer to the size of the actual menu entries
(there's no need for it to be bigger), and now is nicely clear of the menu
title.

Gbp-Dch: Short
2020-05-02 02:09:38 +01:00
Lyndon Brown d4a1e110ed syslinux: updated SVG for splash
opening the file in inkscape resulted in a dialog explaining that inkscape
used to work on a 90 DPI basis but switched to 96 DPI for better
compatibility reasons, and wanted to convert the file.

this is simply the result of it having done the conversion.

it advised that for documents not intended to be printed that there should
be no noticeable difference. i checked the output and it seems identical
to before. i tried to look at the actual diff, but it's a lot of noise,
most of which is just reordering, and i gave up, since the output looks
identical i'm not going to worry.

Gbp-Dch: Ignore
2020-05-02 00:02:31 +01:00
Lyndon Brown 1892f97ce6 grub2: fix missed vga= consistency adjustment
Gbp-Dch: Ignore
2020-05-01 22:36:10 +01:00
Lyndon Brown 578dbee516 bootloaders: change 'Advanced options' to 'Utilities'
more fitting now that we've moved the advanced installer entries
out to a different submenu, leaving just memtest (and HDT on
syslinux).

the advanced.cfg file is also renamed to utilities.cfg in the syslinux
case, but in a backwards compatible way of moving the user advanced.cfg
file over the new one, if the user provides a file with the old name.
alternatively we could just leave the old name in place, but that would be
a little odd.

Gbp-Dch: Short
2020-05-01 12:38:04 +02:00
Lyndon Brown d22c1f177d grub2: fix vga= consistency
- most entries used vga=788 rather than vga=normal (which are equivalent)
 - the syslinux menu uses 788 exclusively
 - so do the official install discs

Gbp-Dch: Short
2020-05-01 12:37:36 +02:00
Lyndon Brown 375ff465e5 grub2: tiny label consistency tweak
as per style in official Debian install discs

Gbp-Dch: Ignore
2020-05-01 12:05:35 +02:00
johnraff 0e5d0483e5 Replace 'which' with 'command -v' to test for the existance of an executable
This is considered to be more robust.

Two instances remain:

scripts/build/chroot_archives, line 257:
if [ "${LB_APT}" = "aptitude" ] && [ ! $(Chroot chroot "which aptitude") ]
The command is run inside a chroot where the environment might be special,
and would need further testing.

manpages/Makefile, line 42:
@if [ ! -x "$$(which po4a 2>/dev/null)" ]; \
I am insufficiently familiar with makefile syntax to edit this.
2020-05-01 09:59:11 +00:00
Lyndon Brown 82f0acb091 grub2|loopback: fix theme issues for submenus
also enables greater flexibility for users to override more aspects of
theme separate from menu entries, and similarly the initial config details
separate from the menu entries. (with the recent change to merge user files
with the defaults rather than replace them, users can pick which of these
individual components they wish to customise.

identical to change as sent in to Kali and accepted by Raphaël.

Gbp-Dch: Short
2020-04-30 07:36:51 +01:00
Lyndon Brown 96ade65e65 grub2: fix lost pre-prepared files detail
partly lost in some adjustments that were made to the submitted work,
which was focused on restoring the 'start installer' entry.

there is no need for dynamic setting of these two `source` imports in the
default file, in fact user modifications should also use the fixed import
commands in future.

note that the old placeholders however remain replaced, which inject
precisely this string, for backwards compatibility.

Gbp-Dch: Ignore
2020-04-30 07:10:08 +01:00
jnqnfe 24c2b3e119 syslinux: deduplicate common files
there are several files of which identical duplicate copies are held in:
 - share/bootloaders/extlinux
 - share/bootloaders/pxelinux
 - share/bootloaders/isolinux
 - share/bootloaders/syslinux

it is a pain to maintain this from a development standpoint, having to
copy modified config files into the other directories each time changes
are made and mistakes have been made before due to this.

this creates a new folder share/bootloaders/syslinux_common and moves them
to this new directory.

it also expands the binary_syslinux stage to use it, with it now
constructing the installed set of bootloader files as follows:
 1. copy {LB_DIR}/bootloaders/syslinux_common
 2. copy {LB_DIR}/bootloaders/{syslinux|isolinux|extlinux|pxelinux} on top
 3. copy config/bootloaders/syslinux_common on top
 4. copy config/bootloaders/{syslinux|isolinux|extlinux|pxelinux} on top

note, to explain part of the binary_syslinux change, instead of just
copying the correct bootloader folder full of the files, we now make the
target bootloader specific directory, then copy the contents of source
directories into it.

Gbp-Dch: Short
2020-04-24 18:50:37 +01:00
Raphaël Hertzog 34a72caf49 Synchronize syslinux menu structure with the grub-pc one
* Use same menu labels
* Use same hotkeys
* Get rid of a nested menu that is not present in grub
* Add "menu title" statement to hide the caret of the hotkey (^)
2020-04-24 18:57:03 +02:00
Lyndon Brown 47b0a623dd syslinux: fix lack of top level install option
0bf9d2d390 expanded the set of install
options, whilst also moving them all to a submenu.

it has since been raised that this is not actually what is wanted, that
having an entry for the most common install option is wanted at the top
level, like currently with grub2.

this adds such an entry.

Gbp-Dch: Short
2020-04-24 15:38:55 +00:00
Lyndon Brown 41ca745b6c syslinux: fix missing hotkeys
for some reason the syslinux folder one had these but not the others.
probably a result of having four separate copies of the files and this
part of the past change to expand the install menus failed to be
duplicated.

Gbp-Dch: Short
2020-04-24 14:43:20 +00:00
Lyndon Brown 49794f118f syslinux: use linux/initrd placeholders
enabling improved flexibility for any possible future
path changes.

Gbp-Dch: Ignore
2020-04-23 15:51:57 +00:00
Raphaël Hertzog c3a6e65438 Add updated directives to enable cryptsetup support in initrd
This fixes cryptsetup modules not being installed into initrd with warning:
> cryptsetup: WARNING: The initramfs image may not contain cryptsetup binaries
>     nor crypto modules. If that's on purpose, you may want to uninstall the
>     'cryptsetup-initramfs' package in order to disable the cryptsetup initramfs
>     integration and avoid this warning.

Thanks-to: Marcel Partap
2020-04-23 17:47:12 +02:00
Raphaël Hertzog aa8f8323f7 Fix indentation 2020-04-23 17:46:47 +02:00
Lyndon Brown 46b0d85021 grub2|loopback: avoid empty submenu
don't include the advanced menu at all if it's only entry - memtest - is
not included (you just get a menu entry that does nothing, which may
confused users into thinking that something is broken, as opposed to
showing an empty submenu as i expected).

Gbp-Dch: Short
2020-04-23 10:18:43 +02:00
Lyndon Brown 077d005a84 grub2|loopback: extract memtest menu entry creation to config file
backwards compatibility:

 1. the new file will be included alongside any user custom config
 2. rather than replace MEMTEST with an actual config entry, we replace it
    with a line to import the content of the new file, and thus will work
    just as before.

thus no backwards compatible breakage

Gbp-Dch: Short
2020-04-23 09:59:56 +02:00
Lyndon Brown 69093d9e3b grub2|loopback: extract install menu entries to config files
backwards compatibility:

 1. the new install.cfg and install_start.cfg files (chosen
    automatically from the install_*gui.cfg and install_*test.cfg
    files) will be included alongside any user custom config.
 2. the placeholders are now replaced with lines importing these files

thus everything will work just as before, i.e. no backwards
compatibility breakage.

Gbp-Dch: Short
2020-04-23 09:59:56 +02:00
Lyndon Brown 457e800c94 grub2|loopback: move advanced installer entries under own submenu
this takes a step forward in moving towards the same updated layout as
with syslinux; here we get:

 - <live entries>
 - Start installer
 - Advanced install options...
    - <full set of install options>
 - Advanced options...
    - Memory Diagnostic Tool (memtest86[+])

note that this only affects the default menu. custom configs are not
affected by this change.

further steps to complete the move to the updated layout will follow
later.

"Advanced options..." should perhaps be renamed later.

Gbp-Dch: Short
2020-04-23 09:59:51 +02:00
Lyndon Brown 04a0ffb2f4 grub2|loopback: add hotkey for advanced options submenu (a) 2020-04-23 09:12:52 +02:00
Lyndon Brown 40a076bf35 grub2|loopback: use '@' bookended placeholders
...for consistency with syslinux config placeholders and improved
clarity of what text is a placeholder.

the old placeholders without the bookends are still replaced for
user configs for backwards compatibility.

the new ones are little used just at the moment but are expected to
become used much more in later commits.

Gbp-Dch: Short
2020-04-23 09:12:24 +02:00
Lyndon Brown 8775c8075c syslinux: properly fix shortcut caret appearing in menu entries
this reverts commit 0cef87ffca though
retaining the 'advanced options' menu entry using a label rather than a
title.

despite having done a lot of testing back in 2015 with my bootloader
improvements, i notice now that in fact the syslinux caret fix has an
undesired side effect of modifying the title displayed above the menus. it
does not help that the text embedded into the splash overlaps with this
menu title; perhaps this explains why i missed this problem back in 2015.

purely reverting the implemented fix solves this title problem, but
restores the caret problem to the advanced options menu (in menu.cfg);
however that menu was using a caret in a title entry, unlike everywhere
else where they are only used with labels, which must have been the
original source of the problem all along. ensuring that this menu uses a
label instead of a title in this reversion leaves everything working
correctly afaict.

Gbp-Dch: Ignore
2020-03-25 01:25:50 +00:00
jnqnfe a25b77e099 bootloaders: remove old "video=vesa:ywrap,mtrr" kernel param, as done in d-i
d-i removed this in commit 0917b2dde3ff73a204d27dd2f2fffc8a41175ddd

Note: There was inconsistency between grub and syslinux in use of this, with
syslinux not having it on graphical rescue and auto modes while grub entries
did. The patch to fix that has been dropped since we're removing it everywhere
anyway.

(#395040)

Gbp-Dch: Short
2020-03-22 19:43:56 +00:00
jnqnfe 38af959aa5 syslinux: use more dynamic memtest menu config file
Fixes the following
 - Correct version (memtest86/memtest86+) shown instead of fixed 'memtest86+' text
 - Ensure correct directory path always used by using replaceable placeholder

Gbp-Dch: Short
2020-03-16 23:08:26 +00:00
jnqnfe 31fa6abd36 syslinux: add memtest menu entry only if including memtest 2020-03-16 23:08:26 +00:00
jnqnfe 7ffd2288d9 syslinux: add install menu entries only if including installer 2020-03-16 23:08:26 +00:00
jnqnfe 0bf9d2d390 syslinux: expand list of install options 2020-03-16 23:08:26 +00:00