MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

Report Bugs, Issues and non- package Requests
Message
Author
User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#1 Post by fehlix »

MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

Summary:
MXBO settings can make system unusable, booting in a memtest-boot-loop only.

Symptom:
When the user changes the default boot-entry to „Memory Test“ the next and the future boots are set to boot into the „Memory Test“ boot-menu entry. To change the default entry back the user needs to choose another boot-menu entry within the grub-menu, open MXBO again and select another boot-entry to generate a new grub.cfg boot-menu.
5-memtest-boot-loop.png
When the user selects “Menu timeout” as ‚0‘ and „Memory test“ as default „Boot to“ option, he will not presented with grub-menu but will always boot straight into „Memory Test“. By this he is presented with a „Memory Test“ boot-loop. By pressing “Esc” to cancel the memory test the system boots immediately into “Memory test” again.
memtest.png
Mitigation:
- Instruct the user not to choose ‚0‘ menu-timeout, to avoid having the “unbreakable” boot-loop.
- Disable “Menu timeout” ‘0’ to avoid stuck within a boot-loop.
- Provide information how to access hidden grub-menu during boot-loop, if available.
- change the technical implementation of MXBO design by introducing one-time next-boot feature for memory test.
- Take out “Memory Test” boot-option from MXBO

Recommandation:
As grub does already provide the technical infrastructure for one-time boot options we recommend to utilize existing next one-time feature of grub.

Technical Hint:
Instead of using grub→GRUB_DEFAULT to set a fixed default boot entry, implement the GRUB-Environment feature to set default and next-ontime boot-entries.
→ grub→GRUB_DEFAULT=saved within /etc/default/grub
grub-set-default → to save default boot within grubenv as „saved_entry“
grub-reboot → to set next-ontime boot within grubenv as „next_entry“
grub-editenv /boot/grub/grubenv unset next_entry → remove next-ontime boot-entry
grub-editenv /boot/grub/grubenv list → to query grubenv for default and next-onetime boot-entries

WARNING:
Don’t try it out!
If you want to try out the magic memtest-boot-loop, you may end up within an unusable system.
You do not have the required permissions to view the files attached to this post.
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
dolphin_oracle
Developer
Posts: 19926
Joined: Sun Dec 16, 2007 1:17 pm

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#2 Post by dolphin_oracle »

To those reading along, mxbo can change that setting from a live usb.
http://www.youtube.com/runwiththedolphin
lenovo ThinkPad X1 Extreme Gen 4 - MX-23
FYI: mx "test" repo is not the same thing as debian testing repo.

User avatar
Adrian
Developer
Posts: 8250
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#3 Post by Adrian »

Hmm, I guess that would be valid for every entry in GRUB that doesn't give access back to user to change the menu, for example Windows, if you select 0 and Windows then it will always boot to Windows. It's a feature of GRUB and I just propage it to MX Boot Options, now if people choose it it's kind of up to them, you have the option to shoot yourself in the foot but you don't have too.

You can boot however to LiveCD and fix it from there MX Boot Option should work from live environment, prompt you to select the partition where you have MX installed and you should be able to change the timeout to something else.

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#4 Post by fehlix »

Reply to comments:
  • - Repairing with LiveMedia:
This is possible, but only if the user still have access to a LiveMedia to boot from.
  • - Menu-timeout ‘0’ into other OS/boot entry:
With timeout of ‘0’ booting into another OS, the user would still have access to an usable operating system. He might repair from the other OS the Grub menu or would be able to create a LiveMedia to boot from.
  • - Use-Case Memtest-boot as default
I can not imagine any use-case, where a user wants to have “Memory Test” as his/her
default boot-entry instead of a one-time next-boot only. The current design is simply dangerous (memtest boot-”loop”), not user friendly (even with timeout non zero, he needs to change with MXBO the default again - awkward) and technical not necessary (use existing grub build-in for next only one-time boot)
--fehlix
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Adrian
Developer
Posts: 8250
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#5 Post by Adrian »

OK, made the change to use "grub-reboot" option, but I saw at least once that exiting from Memtest didn't reset that, so I will also add manually the 5 second timeout in case somebody selects Memtest

male

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#6 Post by male »

I hope I understand the reason for this controversy...

Every Linux user should know that if the time is set to 0 seconds in the Grub_Menu, he will never see this Grub_Menu again.
To make this visible again, the shift key must be pressed and held simultaneously by pressing the power key of the computer.
This memtest shouldn't be any different.

Unfortunately I can't check this, because the MXBO tool is not offered to me during the update.
Did you get a scare about @felix's clues now?

User avatar
Adrian
Developer
Posts: 8250
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#7 Post by Adrian »

male wrote: Sun Aug 12, 2018 1:04 pm Unfortunately I can't check this, because the MXBO tool is not offered to me during the update.
Why is that, you are not on MX-17? It should be offered with an "apt-get full-upgrade" in any case I made the change and forced a 5 sec timeout on memtest just to make it easier for people to switch (update will probably come by the end of the day). Good point about holding Shift I forget about that.

User avatar
fehlix
Developer
Posts: 10310
Joined: Wed Apr 11, 2018 5:09 pm

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#8 Post by fehlix »

Adrian wrote: Sun Aug 12, 2018 12:53 pm OK, made the change to use "grub-reboot" option, but I saw at least once that exiting from Memtest didn't reset that, so I will also add manually the 5 second timeout in case somebody selects Memtest
grub-reboot will only work in conjuntion with GRUB_DEFAULT=saved, as both grubenv-entries for default and next-boot
will be ignore if GRUB_DEFAULT is not set to "saved" within generatd grub.cfg.

I.i if you had before GRUB_DEFAULT="XYZ" , you need to save "default-boot" and next-one-time boot using
grub-set-deault "XYZ" and grub-reboot 'Memory Test' also
and set GRUB_DEFAULT="saved" and generate grub.cfg.
If you already had GRUB_DEFAULT="saved", you would not need to regenrate grub.cfg ( better check within grub.cfg to be sure), but only update grubenv with grub-reboot 'Memory Test", as the defaul-entry "saved_entry") is already stored within grubenv .
Sorry for the rush ...
Gigabyte Z77M-D3H, Intel Xeon E3-1240 V2 (Quad core), 32GB RAM,
GeForce GTX 770, Samsung SSD 850 EVO 500GB, Seagate Barracuda 4TB

User avatar
Adrian
Developer
Posts: 8250
Joined: Wed Jul 12, 2006 1:42 am

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#9 Post by Adrian »

fehlix wrote: Sun Aug 12, 2018 1:08 pm grub-reboot will only work in conjuntion with GRUB_DEFAULT=saved, as both grubenv-entries for default and next-boot
will be ignore if GRUB_DEFAULT is not set to "saved" within generatd grub.cfg.
Doesn't seem to be correct at least in my trials, I left GRUB_DEFAULT to something else and used grub-reboot that set memtest as default at the next reboot. I'm satisfied with forcing a 5 seconds timeout when somebody selects memtest. It's a good failsafe should not confuse people too much.

male

Re: MX Boot Options – „Boot to“ Memory Test with Boot-“Loop“

#10 Post by male »

Adrian wrote:
male wrote:Unfortunately I can't check this, because the MXBO tool is not offered to me during the update.
Why is that, you are not on MX-17?
surely ;)

Code: Select all

inxi -r
Repos:     Active apt repos in: /etc/apt/sources.list.d/antix.list 
           1: deb http://nl.mxrepo.com/antix/stretch stretch main
           Active apt repos in: /etc/apt/sources.list.d/debian-stable-updates.list 
           1: deb http://ftp.de.debian.org/debian/ stretch-updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/debian.list 
           1: deb http://ftp.de.debian.org/debian/ stretch main contrib non-free
           2: deb http://security.debian.org/ stretch/updates main contrib non-free
           Active apt repos in: /etc/apt/sources.list.d/mx.list 
           1: deb http://nl.mxrepo.com/mx/repo/ stretch main non-free
           No active apt repos in: /etc/apt/sources.list.d/various.list

Post Reply

Return to “Bugs and Non-Package Requests Forum”