[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Debian installer not install grub-efi



Hello,
I am currently mounting my own distribution called Kaisen Linux: https://kaisen-linux.org (for project details) However, I have a concern.
My ISO crashes (not the site but the one in preparation) when installing GRUB via the installer in UEFI, it automatically tries to install GRUB2 (therefore impossible to install, it not working systematically at this stage), and my ISO does not contain the shim and grub-efi packages in the ISO (in the pool section), and I have done a lot of research, but I cannot find a solution to my problem after several builds. I use the live-build tools. I am attaching my configurations (ISO GRUB file, the live-build configuration file, and my preseed file), (I am still on the Debian Buster repositories).

GRUB2 installs correctly with Debian Installer booting on isolinux on a classic BIOS boot, however when booting on UEFI, the GRUB installation step does not work indicating that the GRUB installation step failed (it is trying to install GRUB2 but not grub-efi and shim, the crash therefore makes sense), but I can't integrate the shim and grub-efi packages on my installer with live-build.

By precision, I use version 1: 20190311 of live-build and jer seeks to build my ISO and the debian installer with buster and my installer installs the content of my live.
Here is what I have already tried:

- Install mokutil, shim and grub-efi on the live and copy it to the ISO
- Try to integrate the concerned packages in the "pool" section of ISO (in the includes.binary section
- I indicated in my config file that I wanted syslinux and grub-efi as bootloaders
- Include file in packages-lists section for install shim and grub-efi sections
- Copy .deb packages in includes.installer section

Here are my confs:

Config file :

#!/bin/sh
#Build script for Kaisen Linux

lb config noauto \
--apt "apt" \
--apt-indices "true" \
--apt-recommends "true" \
--apt-secure "true" \
--architectures "amd64" \
--archive-areas "main contrib non-free" \
--binary-images  "iso-hybrid" \
--binary-filesystem "fat32" \
--bootappend-live "boot=live nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=fr_FR.UTF-8 keyboard-layouts=fr" \
--bootappend-live-failsafe "boot=live nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=fr_FR.UTF-8 keyboard-layouts=fr noapic noapm nodma nomce nolapic nomodeset nosmp nosplash" \
--bootloaders "syslinux,grub-efi" \
--cache "true" \
--cache-indices "yes" \
--cache-packages "true" \
--cache-stages "bootstrap" \
--checksums "md5" \
--clean \
--debian-installer "live" \
--debian-installer-distribution "buster" \
--debian-installer-gui "true" \
--distribution "buster" \
--linux-flavours "amd64" \
--linux-packages "linux-image" \
--iso-application "Kaisen Live" \
--iso-preparer "Kaisen" \
--iso-publisher "Kaisen" \
--iso-volume "Kaisen Linux Live" \
--keyring-package "debian-archive-keyring" \
--memtest "memtest86+" \
--mode "debian" \
--system "live" \
--security "true" \
--source "false" \
--uefi-secure-boot "enable" \
--backports "false" \
--updates "true" \
--parent-mirror-bootstrap "http://deb.debian.org/debian/" \
--parent-mirror-chroot "http://deb.debian.org/debian/" \
--parent-mirror-chroot-security "http://security.debian.org/debian-security" \
--parent-mirror-binary-security "http://security.debian.org/debian-security/" \
--parent-mirror-debian-installer "http://deb.debian.org/debian/" \
--mirror-bootstrap "http://deb.debian.org/debian/" \
--mirror-chroot "http://deb.debian.org/debian/" \
--mirror-chroot-security "http://security.debian.org/debian-security/" \
--mirror-binary "http://deb.debian.org/debian/" \
--mirror-binary-security "http://security.debian.org/debian-security/" \
--mirror-debian-installer "http://deb.debian.org/debian/" \
--verbose \

Preseed file :

#Désactiver la configuration du réseau et automatiser le nom de poste et domaine
d-i netcfg/enable boolean false
d-i hw-detect/load_firmware boolean false
#Changer le nom de poste par défaut
d-i netcfg/get_hostname string kaisenlinux
d-i netcfg/get_hostname seen false
# Ne pas créer de compte root
d-i passwd/root-login boolean false
#Ne pas utiliser de miroir APT (enlève la question du miroir supplémentaire pour APT, inutile ici puisque tout est déjà dans l'ISO)
d-i apt-setup/use_mirror boolean false
#Définition des miroirs à utiliser ainsi que l'activation des dépôts de sécurité et mises à jour (ces deux services ont la même adresse)
d-i apt-setup/services-select multiselect security, updates
d-i apt-setup/security_host string security.debian.org
#Ajouter les dépôts buster dans /etc/apt/sources.list (10 maximums)
d-i apt-setup/local0/repository string \
deb http://deb.debian.org/debian/ buster main contrib non-free
d-i apt-setup/local1/repository string \
deb http://deb.debian.org/debian/ buster-updates main contrib non-free
#Ajouter les deb-src dans le /etc/apt/sources.list
d-i apt-setup/local0/source boolean true
d-i apt-setup/local1/source boolean true
#Supprimer le message de fin d'installation et redémarrage automatique
d-i finish-install/reboot_in_progress note

GRUIB file (ISO launch EFI) :

loadfont $prefix/dejavu-bold-16.pf2
loadfont $prefix/dejavu-bold-14.pf2
loadfont $prefix/unicode.pf2
  set gfxmode=800x600
  set gfxpayload=keep
  insmod efi_gop
  insmod efi_uga
  insmod video_bochs
  insmod video_cirrus
  insmod gfxterm
  insmod png
  terminal_output gfxterm

if background_image /isolinux/splash.png; then
  set color_normal=light-gray/black
  set color_highlight=white/black
elif background_image /splash.png; then
  set color_normal=light-gray/black
  set color_highlight=white/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi

insmod play
play 960 440 1 0 4 440 1
if [ ${iso_path} ] ; then
set loopback="findiso=${iso_path}"
export loopback
fi

# Live boot
menuentry "Kaisen Linux Live (default, lang fr)" {
linux /live/vmlinuz boot=live nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components timezone=Europe/Paris locales=fr_FR.UTF-8 keyboard-layouts=fr
initrd /live/initrd.img
}
menuentry "Kaisen Linux Live (fail-safe mode, default, lang fr)" {
linux /live/vmlinuz boot=live nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components timezone=Europe/Paris locales=fr_FR.UTF-8 keyboard-layouts=fr noapic noapm nodma nomce nolapic nomodeset nosmp nosplash
initrd /live/initrd.img
}

menuentry "Kaisen Linux Live (charging in RAM, lang fr)" {
linux   /live/vmlinuz boot=live toram nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components timezone=Europe/Paris locales=fr_FR.UTF-8 keyboard-layouts=fr
initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (fail-safe mode, charging in RAM, lang fr)" {
linux /live/vmlinuz boot=live toram nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components timezone=Europe/Paris locales=fr_FR.UTF-8 keyboard-layouts=fr noapic noapm nodma nomce nolapic nomodeset nosmp nosplash
initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (with persistence, lang fr)" {
linux /live/vmlinuz boot=live noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components timezone=Europe/Paris locales=fr_FR.UTF-8 keyboard-layouts=fr persistence
        initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (with encrypted persistence, lang fr)" {
linux /live/vmlinuz boot=live persistent=cryptsetup persistence-encryption=luks noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components timezone=Europe/Paris locales=fr_FR.UTF-8 keyboard-layouts=fr persistence
initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (with persistence, charging in RAM, lang fr)" {
        linux   /live/vmlinuz boot=live toram noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components timezone=Europe/Paris locales=fr_FR.UTF-8 keyboard-layouts=fr persistence
        initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (with encrypted persistence, charging in RAM, lang fr)" {
        linux   /live/vmlinuz boot=live toram persistent=cryptsetup persistence-encryption=luks noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components timezone=Europe/Paris locales=fr_FR.UTF-8 keyboard-layouts=fr persistence
        initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (lang en)" {
linux /live/vmlinuz boot=live nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=en_US.UTF-8 keyboard-layouts=en
initrd /live/initrd.img
}
menuentry "Kaisen Linux Live (fail-safe mode, lang en)" {
linux /live/vmlinuz boot=live nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=en_US.UTF-8 keyboard-layouts=en noapic noapm nodma nomce nolapic nomodeset nosmp nosplash
initrd /live/initrd.img
}

menuentry "Kaisen Linux Live (charging in RAM, lang en)" {
linux   /live/vmlinuz boot=live toram nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=en_US.UTF-8 keyboard-layouts=en
initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (fail-safe mode, charging in RAM, lang en)" {
linux /live/vmlinuz boot=live toram nopersistence noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=en_US.UTF-8 keyboard-layouts=en noapic noapm nodma nomce nolapic nomodeset nosmp nosplash
initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (with persistence, lang en)" {
linux /live/vmlinuz boot=live noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=en_US.UTF-8 keyboard-layouts=en persistence
        initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (with encrypted persistence, lang en)" {
linux /live/vmlinuz boot=live persistent=cryptsetup persistence-encryption=luks noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=en_US.UTF-8 keyboard-layouts=en persistence
initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (with persistence, charging in RAM, lang en)" {
        linux   /live/vmlinuz boot=live toram noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=en_US.UTF-8 keyboard-layouts=en persistence
        initrd  /live/initrd.img
}

menuentry "Kaisen Linux Live (with encrypted persistence, charging in RAM, lang en)" {
        linux   /live/vmlinuz boot=live toram persistent=cryptsetup persistence-encryption=luks noeject autologin username=kaisen hostname=kaisenlinux user-default-group=kaisen,sudo user-fullname=Kaisen components locales=en_US.UTF-8 keyboard-layouts=en persistence
        initrd  /live/initrd.img
}

# Installer entry
#menuentry "Kaisen Linux install in text mode" {
# linux /install/vmlinuz vga=788 quiet
# initrd /install/initrd.gz
#}

#menuentry "Kaisen Linux install in graphical mode" {
# linux /install/gtk/vmlinuz video=vesa:ywrap,mtrr vga=788 quiet
# initrd /install/gtk/initrd.gz
#}

#menuentry "Kaisen Linux expert install in text mode" {
# linux /install/vmlinuz priority=low vga=788 quiet
# initrd /install/initrd.gz
#}

#menuentry "Kaisen Linux expert install in graphical mode" {
# linux /install/gtk/vmlinuz priority=low video=vesa:ywrap,mtrr vga=788 quiet
# initrd /install/gtk/initrd.gz
#}

#menuentry "Kaisen Linux rescue system in text mode" {
# linux /install/vmlinuz rescue/enable=true vga=788 quiet
# initrd /install/initrd.gz
#}

#menuentry "Kaisen Linux rescue system in graphical mode" {
# linux /install/gtk/vmlinuz rescue/enable=true video=vesa:ywrap,mtrr vga=788 quiet
# initrd /install/gtk/initrd.gz
#}

I don't have any log files, I just checked.
I hope I have given you as much detail as possible.

You will also find the configuration files in attachment.

I also specify that I installed a custom kernel built via a hook at the time of the ISO build.
I think it can play it, I haven't tried it yet (I'm still on the Debian Buster repositories during the build).

Thanks you.

Best regards

Attachment: config
Description: Binary data

Attachment: preseed.cfg
Description: Binary data

Attachment: grub.cfg
Description: Binary data


Reply to: