On Tue 15 Feb 2022 at 10:37:52 (+0100), Sébastien Kalt wrote: > > I'm experiencing something weird on my ASUS PN50 : I have a dual boot, > windows and Sid. > > CPU: 8-core AMD Ryzen 7 4700U with Radeon Graphics (-MCP-) > speed/min/max: 2514/1400/2000 MHz Kernel: 5.15.0-3-amd64 x86_64 Up: 3h 1m > Mem: 9300.6/15483.7 MiB (60.1%) Storage: 238.47 GiB (66.6% used) Procs: 386 > Shell: Bash inxi: 3.3.12 > > Some time ago (say one month), I noticed that if I reboot my Sid (with KDE > menu or reboot from a console) the computer goes to the BIOS, loosing the > partition start order. > > If I choose my Debian partition first, everything returns to normal, > booting to grub, letting me choosing between Debian and Windows. > > If I stop the computer (shutdown -h now or with KDE menu) it boots > normally to grub when powered on. > > I don't really know when it starts, I rarely reboot my system, last time > might be last november. > > I don't really know where to look to find what might goes wrong during > reboot. > > Does anyone experienced this problem ? > > Any clue as where to look to find what is dysfunctionning ?
It sounds as if you've accidentally set your system to boot with an unsatisfactory default, but are using a one-shot scheme to override it. With BIOS systems, you can set up Grub to boot by default any particular menu entry (rather than 0, the first). Your default is written to /boot/grub/grubenv. However, if before you close down you run grub-reboot, a single-shot override value is written to grubenv, meaning that when the system powers up, Grub will read grubenv and automatically boot with the override, but will also clear the override setting from grubenv. EFI systems have a similar scheme that obviously runs before Grub is given control. (The grubenv scheme can still operate afterwards as well.) $ efibootmgr BootCurrent: 0000 Timeout: 2 seconds BootOrder: 0000,0006,0001,0002,0003,0004,0005 Boot0000* debian Boot0001* Diskette Drive Boot0002* ST500LX025-123456 Boot0003* USB Storage Device Boot0004* CD/DVD/CD-RW Drive Boot0005 Onboard NIC Boot0006* UEFI: ST500LX025-123456 $ This gives the default order when, for example, you force closedown and then boot up (ie preempting any configuration being set up). Ctrl-Alt-Del usually does the same sort of thing. I imagine that you have a bad default choice here, accidentally set up a while back. When you close down in the manner you have hinted at,¹ I again imagine that something in the bowels of your KDE is using the efibootmgr --bootnext facility to set up a more pleasing choice, but /for one-time only/. man 8 efibootmgr has copious examples to help you. ¹ You wrote "If I choose my Debian partition first" but you don't say how you made that choice. We are also left to guess whether it's affecting what's reported in the previous paragraph ("if I reboot my Sid …") or the next one ("If I stop the computer …"). Cheers, David.