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

Re: Bad Behavior by GRUB



Well I meant "two" more files and an "EFI" partition. I need some rest...

Le 11/01/2022 à 11:46, Didier Spaier a écrit :
> Hi,
> 
> thanks for the files.
> 
> First I need to more files:
>>From Slint type: find /boot/efi > efislint
>>From Debian type: find /boot/efi > efidebian
> (I mistakenly wrote find instead of find in my previous message)
> 
> Then you wrote:
> 
>> There is NO EFI partition on the USB File Stick that I was using to install
>> Debian, it is just an iso copied to the USB stick - it's a Debian installation
>> with firmware that I put on the USB stick with the command cp debian.iso /dev/sdc.
> 
> Actually there is an USB partition on the USB stick, the magic being done by
> xorriso from Thomas Schmitt when writing the ISO in case of Slint.
> 
> Example below:
> # cp debian-11.2.0-amd64-netinst.iso /dev/sdd
> # lsblk -lo name,size,fstype|grep sdd
> sdd     7,4G iso9660
> sdd1    378M iso9660
> sdd2    2,5M vfat
> # mount /dev/sdd2 /mnt
> # find /mnt
> /mnt
> /mnt/efi
> /mnt/efi/boot
> /mnt/efi/boot/bootx64.efi
> /mnt/efi/boot/grubx64.efi
> /mnt/efi/debian
> /mnt/efi/debian/grub.cfg
> 
> As an aside there is no /efi/boot/grub.cfg but only /efi/debian/grub.cfg so I
> fail to understand what told your firmware to look for \EFI\BOOT\grub.cfg
> (wich is equivalent to /efi/boot/grub.cfg)
> 
> Maybe the additional files that I requested will tell us?
> 
> Cheers,
> Didier
> 
> Le 11/01/2022 à 08:36, D.J.J. Ring, Jr. a écrit :
>> Didier, 
>>
>> I didn't know if you wanted me to reply also to the list, which I will do, but
>> I'm sending this to you only until you tell me otherwise.
>>
>> Yes I confused GRUB menu with the firmware, from what I understand it is GRUB
>> that is changing the UEFI settings in my firmware BIOS SETUP to boot to the last
>> operating system, even before my USB stick if I wanted to boot from one - say to
>> put a new distro on my computer.  I cannot interrupt the boot into the last
>> operating system which is at the top of the BIOS settings.  I will grab my
>> camera and take a picture!
>>
>>
>> Here are the files you asked for.
>>
>> >From Slint, type as root: efibootmgr > efivars and send me the file efivars
>> >From Slint, send me the file /boot/grub/grub.cfg renamed grubslint
>> >From Slint, type: file /boot/efi > efislint and send me the file efislint
>> >From Debian, send me the file /boot/grub/grub.cfg renamed grubdebian
>> >From Debian type: file /boot/efi > efidebain ans send me the file efidebian
>> >From Slint, identify the EFI partition of the repair bot stick; mount it on /mnt
>> and type: find /mnt > stick and send me the file stick.
>>
>> There is NO EFI partition on the USB File Stick that I was using to install
>> Debian, it is just an iso copied to the USB stick - it's a Debian installation
>> with firmware that I put on the USB stick with the command cp debian.iso /dev/sdc.
>>
>> So I used a file stick from the multi-boot utility SARDU and I'm sending you the
>> results of "find /mnt/efi > stick". I can use some of the programs on that to
>> repair grub and so forth.
>>
>> If you want me to send this to the debian-accessibility list, I will do so.
>>
>> Thanks again for your help, but I still am not sure you are understanding me,
>> but time will tell.
>>
>> BRGDS,
>> David
>>
>>
>> On Mon, Jan 10, 2022 at 5:53 PM Didier Spaier <didier@slint.fr
>> <mailto:didier@int.fr>> wrote:
>>
>>     Hi,
>>
>>     Le 10/01/2022 à 21:15, D.J.J. Ring, Jr. a écrit :
>>     > GRUB now puts a "Preferred Boot" at the top of GRUB's choices so that it goes
>>     > directly to the last successfully used operating system.
>>
>>     I think you are confusing the GRUB menu with the menu of the firmware.
>>
>>     > But here's the PROBLEM.
>>     >
>>     > As soon as my computer boots into one of the operating systems, either Slint,
>>     > Debian, or Windows 10, GRUB adds an entry to the very top of my computer's
>>     BIOS 
>>     > SETUP changing the boot device boot order, which previously was USB HD,
>>     then my
>>     > hard drive, and inserts whatever operating system it last booted into,
>>     modifying
>>     > the previous BIOS boot settings.
>>
>>     As I wrote in the Slint mailing list this is the expected behavior unless when
>>     installing grub you used the --no nvram option, which prevents GRUB to write a
>>     boot entry in the firmware's menu.
>>
>>     > Now on the next boot, my computer which previously booted from USB stick, now
>>     > will boot directly into the last operating system that I used and it's
>>     > impossible to enter BIOS Setup at all by pressing the setup key (usually F2).
>>
>>     If you can't enter the firmware setup in this context your firmware is buggy,
>>     this has nothing to do with GRUB.
>>
>>     > What I have to do is to use the GRUB entry in Debian or Slint to go to the
>>     last
>>     > entry which is "UEFI Firmware Settings" and this will cause my computer to
>>     > reboot into the UEFI Firmware Settings - the same settings that I mentioned
>>     > earier, that is accessed by a key press immediately when the BIOS name flashes
>>     > on the screen - which now is inaccessible for even the sighted because the
>>     > computer just directly goes to the last operating system that was used.
>>     > Without this entry in GRUB the only ways to go back to a BIOS SETUP that
>>     allows
>>     > me to boot to USB stick is to either boot into Windows and search for Advanced
>>     > Boot Settings, then UEFI Firmware settings, and reboot - which will do the
>>     exact
>>     > same thing as the bottom GRUB menu entry in Debian or Slint> Or I can take
>>     my computer apart and find the RESET button and press it and it
>>     > will reset my firmware to the original where I again have access to Boot
>>     device
>>     > choice - in my case by pressing F2.
>>     >
>>     > But whenever I boot into any operating system, I again lose the ability to
>>     boot
>>     > into a USB stick because GRUB places an entry at the top of my BIOS UEFI
>>     settings!
>>
>>     Again, rather because your firmware is buggy:
>>     1. That GRUB places an entry at the top of my BIOS UEFI (aka firmware) settings
>>     is perfectly normal. But you can prevent it if you want, see at the end of this
>>     message.
>>     2. That this prevent you to access your firmware settings is not normal at all,
>>     but you should blame his faulty behavior to your firmware, not to GRUB.
>>
>>     > Certainly this action by GRUB should be disabled in an accessible version of
>>     > Linux, or disabled altogether!
>>
>>     Not at all. If you install an OS, you most of the time expect it to start at
>>     next boot.
>>
>>     But if you do not want wall, you can avoid it several ways: include a custom
>>     boot entry in GRUB's menu or edit directly the firmware boot menu from a running
>>     OS. The second solution is easier, so I will describe it.
>>
>>     As I wrote in the Slint list you can use the efibootmgr application shipped in
>>     Slint and alos available in Debian for several purposes, among which
>>     a) Change the order of the boot entries permanently.
>>     b) Tell the firmware to boot a specific boot entry at next boot.
>>
>>     However in the Slint mailing list you wrote (my comments after the quotes)
>>
>>     > Jim has to run efibootmgr as root then find the USB HD on the list, which on
>>     > your list is Boot000C* USB HDD, so he substitutes the last four number after
>>     > Boot in the list for the USB HD and then he can boot directly into the USB
>>     stick.
>>     >
>>     > Mine was Boot0013* USB HDD:
>>     >
>>     > So I ran as root:
>>     >
>>     > efibootmgr -n 0013
>>     >
>>     > And then when I run as root:  reboot, I should boot directly to the USB stick.
>>     >
>>     > I tried, and it didn't go well at all.
>>     >
>>     > Booting brought me to EFI shell and it said:
>>     >
>>     > Failed to open \EFI\BOOT\grub.cfg
>>     >
>>     > Not found.
>>
>>     We do not know what is in your repair USB stick, thus cannot draw a conclusion.
>>
>>     It is possible that you typed a wrong number, or that you has several USB
>>     devices plugged in and you landed in another one, or that there be an issue with
>>     the content of the USB stick's EFI partition, or that this be the consequence of
>>     a bug in the firmware.
>>
>>     > If I type exit at the EFI shell, I eventually get to a firmware boot menu
>>     and I
>>     > use that menu to boot from a USB device which was listed containing my boot
>>     > repair USB stick.
>>     >
>>     > The boot repair USB sticks, which allowed me to update, repair and reinstall
>>     > GRUB on /dev/sda but now not with as good a result as before, because now if I
>>     > boot from the hard drive (I have /sda and /sdb) I get the same errors.
>>
>>     Again this can be an issue with your firmware
>>
>>     > So I have to insert my boot repair USB stick which has a menu utility and
>>     I can
>>     > boot to Slint, Debian or Windows from there.
>>     >
>>     > But now I have to always use the boot repair stick. I cannot boot from my hard
>>     > drive directly.
>>
>>     Again, probably a firmware bug.
>>
>>     2) You can
>>
>>     Now to investigate we need several information, so please do what follows. Yiu
>>     will need to be root or use sudo.
>>
>>     >From Slint, type as root: efibootmgr > efivars and send me the file efivars
>>     >From Slint, send me the file /boot/grub/grub.cfg renamed grubslint
>>     >From Debian, send me the file /boot/grub/grub.cfg renamed grubdebian
>>     >From Slint, type: file /boot/efi > efislint and send me the file efislint
>>     >From Debian type: file /boot/efi > efidebain ans send me the file efidebian
>>     >From Slint, identify the EFI partition of the repair bot stick; mount it on
>>     /mnt
>>     and type: find /mnt > stick and send me the file stick.
>>
>>     Cheers,
>>     Didier
>>
> 


Reply to: