Re: Re: (Thread restarted!) Debian installation using debootstrap and grub-install - no entry in ESC boot menu
Hello everyone, I partly solved my problem and I would like to share my solution: Until now, I thought that the EFI removable media path (\EFI\BOOT\BOOTX64.EFI) is really a fallback location, i.e. a location for putting the boot loader that just always works. Therefore I thought that I could forget about EFI variables altogether if I just put the boot loader there. My recipes don't bind-mount /sys/firmware/efi/efivars for that reason. And when trying things out with the emulator, this assumption holds true, i.e. running "qemu-system-x86_64 -accel kvm -bios /usr/share/ovmf/OVMF.fd ..." will create a virtual machine that behaves like I expected. However, my Asus UX31A does things differently and insists on EFI variables being used for the internal drive, i.e. it doesn't look at the fallback location (\EFI\BOOT\BOOTX64.EFI) of the internal drive. That's the solution for the EFI boot interface, use EFI variables. For the BIOS boot interface, I'm still clueless why it doesn't work. However, I'll leave it at that. Thanks to everyone who helped! Kind regards, Valentin Caracalla
(Thread restarted!) Debian installation using debootstrap and grub-install - no entry in ESC boot menu
t 934240 Apr 26 09:33 /mnt/boot/efi/EFI/debian/shimx64.efi And finally, also notice that it uses the EFI fallback location which is guaranteed to work in every EFI implementation and doesn't depend on EFI variables. On my hardware, the problem exists no matter which of the two recipes I use. Can you reproduce the issue on your hardware? Or is it just my old hardware causing the problem? I'm really interested in people trying out my recipes on their hardware (not VMs, there it works) because this allows me to rule out any issues with my hardware. (And by the way, that is why I wanted to "restart" the thread: Because I want to attract people who have sparse hardware available for the experiment, but don't want to read through everything posted earlier.) Kind regards, Valentin Caracalla
Re: Re: Debian installation using debootstrap and grub-install - no entry in ESC boot menu
Here's the output you requested: user@host:~$ ls -dl $(find /mnt/boot/efi) drwxr-xr-x 3 root root 32768 Jan 1 1970 /mnt/boot/efi drwxr-xr-x 3 root root 32768 Apr 25 13:59 /mnt/boot/efi/EFI drwxr-xr-x 2 root root 32768 Apr 25 13:59 /mnt/boot/efi/EFI/debian -rwxr-xr-x 1 root root 108 Apr 25 13:59 /mnt/boot/efi/EFI/debian/BOOTX64.CSV -rwxr-xr-x 1 root root 84648 Apr 25 13:59 /mnt/boot/efi/EFI/debian/fbx64.efi -rwxr-xr-x 1 root root 126 Apr 25 13:59 /mnt/boot/efi/EFI/debian/grub.cfg -rwxr-xr-x 1 root root 4150720 Apr 25 13:59 /mnt/boot/efi/EFI/debian/grubx64.efi -rwxr-xr-x 1 root root 845480 Apr 25 13:59 /mnt/boot/efi/EFI/debian/mmx64.efi -rwxr-xr-x 1 root root 934240 Apr 25 13:59 /mnt/boot/efi/EFI/debian/shimx64.efiuser@host:~$ efibootmgr -v EFI variables are not supported on this system.
Boot an EFI system with QEMU
Hello Steve, thanks a lot for the tip! However, I'm a complete novice when it comes to running custom firmware in QEMU. I just tried the following: 1.: Download the latest EDK2 release from Github: https://github.com/tianocore/edk2/archive/refs/tags/edk2-stable202302.tar.gz 2.: Extract the OVMF firmware file: tar xz edk2-edk2-stable202302/OvmfPkg/OvmfPkgX64.fdf
Re: Re: Debian installation using debootstrap and grub-install - no entry in ESC boot menu
By the way: The disadvantage of using EFI is that it doesn't work in QEMU, i.e. the following will not show a GRUB command line: sudo qemu-system-x86_64 -accel kvm -smp 2 -m 2G /dev/sda The same thing works for the BIOS boot interface, however (as in my original recipe).
Re: Re: Debian installation using debootstrap and grub-install - no entry in ESC boot menu
I apologize for the formatting in my last post, I don't know what happened. And many thanks for your help! I checked my partition table using "sudo parted /dev/sda print" and it didn't show any flags for partition 1 (the "init" partition). Therefore I manually set the flags using "sudo parted /dev/sda set 1 boot on" and now it shows both flags, "boot" and "esp": Model: ATA ADATA XM11 256GB (scsi) Disk /dev/sda: 256GB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 128GB 128GB fat32 init boot, esp 2 128GB 256GB 128GB ext4 root However, after reboot, the ESC boot menu still doesn't show an entry for the installed system.
Re: Re: Debian installation using debootstrap and grub-install - no entry in ESC boot menu
> I can't see anything wrong with the script. Did that installation use> GPT > and a BIOS Boot Partition though?The successful installation (with official > installation media) used aBIOS partition table, but I prefer GPT.> I guess I > have to ask, why not just use UEFI?I also tried that and I considered posting > a similar recipe for EFI in thefirst message. But it doesn't work either, so > I thought it is better toask the question with BIOS, because it seemed easier > to me.Here's the recipe for EFI: sudo parted /dev/sda mklabel gpt sudo parted /dev/sda mkpart init 0% 50% sudo parted /dev/sda mkpart root 50% 100% sudo mkfs.vfat /dev/sda1 sudo mkfs.ext4 /dev/sda2 sudo mount /dev/sda2 /mnt sudo mkdir /mnt/boot sudo mkdir /mnt/boot/efi sudo mount /dev/sda1 /mnt/boot/efi sudo debootstrap stable /mnt sudo mount --bind /sys /mnt/sys sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo mount --bind /dev/pts /mnt/dev/pts sudo mount --bind /run /mnt/run sudo chroot /mnt apt install grub-efi sudo chroot /mnt grub-install /dev/sda sudo umount /mnt/run sudo umount /mnt/dev/pts sudo umount /mnt/dev sudo umount /mnt/proc sudo umount /mnt/sys sudo umount /mnt/boot/efi sudo umount /mntBut this doesn't work either. Same problem here. However I can make such anEFI installation using official installation media on the same machine andthat does work.
Re: Debian installation using debootstrap and grub-install - no entry in ESC boot menu
There are a few things I forgot to say: The recipe I posted earlier is executed on a system installed on the external drive /dev/sdb, which I call the installer system. It is also a Debian system, with the recipe's dependencies installed. To reproduce the issue (if you want), I suggest using a Debian Live-CD. After installation and before attempting to boot I unplug the external drive to make sure it doesn't interfere with the boot process. With the external drive unplugged, there should be exactly one entry in the ESC boot menu, but there is none: It only offers me to enter setup, and that is what it does when I boot without pressing ESC. Instead of booting the computer directly, I also tried booting the internal drive in a VM executed on the installer system using the following command: sudo qemu-system-x86_64 -accel kvm -smp 2 -m 2G /dev/sda This will show a GRUB command line as I expected. It just doesn't work on the real system, but in the VM it works (I hate that).
Debian installation using debootstrap and grub-install - no entry in ESC boot menu
Hello everyone, I'm trying to install Debian on my Asus UX31A using command line utilities like debootstrap and grub-install. However, the installed system is not bootable. The problem is that the internal drive (which I install the system to) doesn't show up in the boot menu (which is what the user sees when pressing ESC during power-on). I created a minimalist recipe demonstrating the issue: sudo parted /dev/sda mklabel gpt sudo parted /dev/sda mkpart init 0% 50% sudo parted /dev/sda mkpart root 50% 100% sudo parted /dev/sda set 1 bios_grub on sudo mkfs.ext4 /dev/sda2 sudo mount /dev/sda2 /mnt sudo debootstrap stable /mnt sudo mount --bind /sys /mnt/sys sudo mount --bind /proc /mnt/proc sudo mount --bind /dev /mnt/dev sudo mount --bind /dev/pts /mnt/dev/pts sudo mount --bind /run /mnt/run sudo chroot /mnt apt install grub-pc sudo chroot /mnt grub-install /dev/sda sudo umount /mnt/run sudo umount /mnt/dev/pts sudo umount /mnt/dev sudo umount /mnt/proc sudo umount /mnt/sys sudo umount /mnt I've intentionally stripped the parts concerning installation of a kernel and creating configuration files like grub.cfg and fstab, these things work already. For now, all I want to see is that the user can get a GRUB command line after power-on. The grub-install command outputs "Installation finished. No error reported." and therefore I expect being able to boot into the GRUB command line. But again, the problem is that the ESC boot menu doesn't show an entry for (the model name of) /dev/sda, so I can't boot into it. Previously, I've successfully installed Debian using official installation media on this machine (also using BIOS boot interface), so I know that it works in principle. But now I want to do it using command line utilities like debootstrap and grub-install. Any help would be very appreciated. Kind regards, Valentin Caracalla