Description of problem: Fedora 16 uses Grub2 by default, but memtest-setup doesn't understand it. After a clean F16 install, and installing memtest86+, running memtest-setup gives [root@localhost ~]# memtest-setup cat: /boot/grub/grub.conf: No such file or directory sed: can't read /boot/grub/grub.conf: No such file or directory sed: can't read /boot/grub/grub.conf: No such file or directory Setup complete. [root@localhost ~]# Of course the setup could be done manually, if I understood Grub2 better. Version-Release number of selected component (if applicable): memtest86+-4.20-1.fc16
The current support of grub legacy is hack. I am currently completely rewriting it with grub2 taken into account. It will take a while - ETA: this week.
It gets a delay, because it's a bit more complicated than expected, but it is still moving.
*** Bug 734104 has been marked as a duplicate of this bug. ***
As I understand it, the reason memtest-setup puts the memtest entry at the beginning of the grub menu instead of the end (bug 489110) is that it uses grubby. Is it possible for the modified version to avoid this? (I'm guessing not, just thought I should ask before you did the work.)
(In reply to comment #4) No problem, my new memtest-setup is flexible. I will add the option for the insert position and make the last position the default if not specified. I am not using grubby now, because it doesn't count with non-kernel images and the memtest installation still required helper script and sed for ugly non-portable grub conf patching. The situation went even worse with grub2. Currently the grubby cannot be easily modified. In the future I am going to create and post grubby patches that simplifies the installation of non-kernel images but it would be longer term goal.
Hi, rather than using grubby and some post install, wouldn't it be better to use some template at the /etc/grub.d/? For example /etc/grub.d/23_memtest would move the entry to the end of the grub2 menu. I am attaching the template script I modified from the 10_linux for the need of memtest. New grub2 configuration is generated by: grub2-mkconfig -o /boot/grub2/grub.cfg Best regards Michal Ambroz
Created attachment 525969 [details] /etc/grub.d/23_memtest
Michal's template works great for me, just wanted to say thanks.
Appologies
Ping? Template works for me too.
Guys, sorry for delay. Michal thanks for your work. Personally I was interested in robust grub1/2 capable script that do not force user to run grub2-mkconfig (i.e. it patch directly grub.cfg), but also generates grub2 templates to support grub2-mkconfig. Currently I am in approx. 50% of implementation (I was busy with more prio tasks). I think we can go with the template to fix this problem quickly. Maybe I will release the script later. Again thanks.
I am changing the name of the tempalte to 20_memtest according to /etc/grub.d/README.
I added support to memtest-setup for the template. It should now support grub/grub2. Thanks for the template. I will integrate my rewritten version of memtest-setup later, when finished and fully tested.
memtest86+-4.20-2.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/memtest86+-4.20-2.fc16
It works, just two minor issues: 1) When updating memtest86+, get the warning Running Transaction Updating : memtest86+-4.20-2.fc16.x86_64 1/2 Cleanup : memtest86+-4.20-1.fc16.x86_64 2/2 sed: can't read /boot/grub/grub.conf: No such file or directory 2) I have a dual-boot machine (Fedora/Vista), and the memtest86+ entry is after the Fedora entries but before the Vista entry. Is it possible to have the memtest86+ entry always be last (below all OS entries)?
Package memtest86+-4.20-2.fc16: * should fix your issue, * was pushed to the Fedora 16 testing repository, * should be available at your local mirror within two days. Update it with: # su -c 'yum update --enablerepo=updates-testing memtest86+-4.20-2.fc16' as soon as you are able to. Please go to the following url: https://admin.fedoraproject.org/updates/FEDORA-2011-16801/memtest86+-4.20-2.fc16 then log in and leave karma (feedback).
Created attachment 541145 [details] /boot/grub2/grub.cfg for VirtualBox guest with non-working memtest86+ grub2 entry But doesn't work in my VirtualBox 4.1.6 F16 x86_64 guest with updates-testing enabled. I just get the message Loading Fedora Memtest ...Loading memtest86+-4.20 ... [Linux-zImage, setup=0x800, size=0x2a878] and it hangs there. Corresponding grub.cfg attached.
Works for me in my VirtualBox 4.1.6 Rawhide x86_64 guest with updates-testing enabled, though. Weird.
(In reply to comment #15) > It works, just two minor issues: > > 1) When updating memtest86+, get the warning > It seems to be caused by %preun of the old memtest that has hardcoded grub1. New version has conditional. I guess it would require some triggers magic to kill this, but the added complexity woulnd't be probably worth to fix such harmless warning that appears only once. > 2) I have a dual-boot machine (Fedora/Vista), and the memtest86+ entry is after > the Fedora entries but before the Vista entry. Is it possible to have the > memtest86+ entry always be last (below all OS entries)? > I will check this.
(In reply to comment #18) > Works for me in my VirtualBox 4.1.6 Rawhide x86_64 guest with updates-testing > enabled, though. Weird. It blows down my VirtualBox-4.1.6_74713 x86_64, but it probably doesn't mean anything (I have similar opinion with some F16 kernels :). There was no code change and it seems to work OK on my real testing HW.
I spotted typo in memtest86+ spec file, that caused the 20_memtest not to be removed from your /etc/grub.d/ upon package uninstall. I fixed this in memtest86+-4.20-3. I also renamed the 20_memtest to 20_memtest86+ to be in sync with upstream docs.
(In reply to comment #15) > 2) I have a dual-boot machine (Fedora/Vista), and the memtest86+ entry is after > the Fedora entries but before the Vista entry. Is it possible to have the > memtest86+ entry always be last (below all OS entries)? > If you install your second OS (Vista) by 30_os-prober or by 40_custom or $prefix/custom.cfg scripts, they appeared after the memtest in the bootmenu, because memtest uses prefix 20_*. This number seems to be reserved by grub2 upstream, according to their docs: 20_*: Third party apps (e.g. memtest86+) You can rename the 20_memtest86+ to e.g. 50_memtest86+ to be the last in the menu, but you will have to also remove it by hand if you uninstall the memtest86+ package later. I think we should use the 20_* for compatibility.
memtest86+-4.20-3.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/memtest86+-4.20-3.fc16
Does it matter that it's not using the elf-memtest image anymore? That one can be booted with: knetbsd /elf-memtest86+-4.20
(In reply to comment #24) > Does it matter that it's not using the elf-memtest image anymore? That one can > be booted with: > knetbsd /elf-memtest86+-4.20 AFAIK probably better not to change this. I will revert this in memtest86+-4.20-4.fc16, thanks.
memtest86+-4.20-4.fc16 has been submitted as an update for Fedora 16. https://admin.fedoraproject.org/updates/memtest86+-4.20-4.fc16
Created attachment 544966 [details] /boot/grub2/grub.cfg for VirtualBox 4.1.6 Rawhide x86_64 guest with 2 memtest86+ entries After updating my Rawhide guest to memtest86+-4.20-4.fc17.x86_64, running memtest-setup and then grub2-mkconfig, I now have 2 memtest86+ entries. grub.cfg attached.
Same behavior with the F16 version of 4.20-4. Here is the output when running grub2-mkconfig after memtest-setup: [root@compaq-pc RPMS]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.1.4-1.fc16.x86_64 Found initrd image: /boot/initramfs-3.1.4-1.fc16.x86_64.img Found linux image: /boot/vmlinuz-3.1.2-1.fc16.x86_64 Found initrd image: /boot/initramfs-3.1.2-1.fc16.x86_64.img Found linux image: /boot/vmlinuz-3.1.1-2.fc16.x86_64 Found initrd image: /boot/initramfs-3.1.1-2.fc16.x86_64.img Found memtest image: /boot/memtest86+-4.20 Found memtest image: /boot/elf-memtest86+-4.20 Found Windows Vista (loader) on /dev/sda1 done [root@compaq-pc RPMS]#
I downgraded my F16 version to 4.20-2, ran memtest-setup and grub2-mkconfig again, and now have only one memtest entry again. Note, though, that when running memtest-setup it doesn't tell me to run grub2-mkconfig, so it would have been easy to forget. [root@compaq-pc RPMS]# memtest-setup grub2 detected, installing template... grub2 template is already installed. Exiting... [root@compaq-pc RPMS]# grub2-mkconfig -o /boot/grub2/grub.cfg Generating grub.cfg ... Found linux image: /boot/vmlinuz-3.1.4-1.fc16.x86_64 Found initrd image: /boot/initramfs-3.1.4-1.fc16.x86_64.img Found linux image: /boot/vmlinuz-3.1.2-1.fc16.x86_64 Found initrd image: /boot/initramfs-3.1.2-1.fc16.x86_64.img Found linux image: /boot/vmlinuz-3.1.1-2.fc16.x86_64 Found initrd image: /boot/initramfs-3.1.1-2.fc16.x86_64.img Found memtest image: /boot/memtest86+-4.20 Found Windows Vista (loader) on /dev/sda1 done [root@compaq-pc RPMS]#
(In reply to comment #29) Thanks for testing. The two memtest86+ entries are caused by bug introduced by typo in 4.20-2 - it doesn't remove its template and it is leftover. It gets fixed in 4.20-3. You need to remove the leftover 4.20-2 template by hand: # rm /etc/grub.d/20-memtest I am not sure if it is worth to add hack for this, because the 4.20-2 didn't left updates-testing and was there only for short time. > Note, though, that when > running memtest-setup it doesn't tell me to run grub2-mkconfig, so it would > have been easy to forget. > > [root@compaq-pc RPMS]# memtest-setup > grub2 detected, installing template... > grub2 template is already installed. Exiting... > If the grub template is already there (the leftover template in this case) I guess it doesn't need to tell you to run grub2-mkconfig, because there was done no change to your grub2 config.
(In reply to comment #29) Upgrade path 4.20-1 to 4.20-4 should work without the leftover file. Also the leftover file is only present if you install 4.20-2 and then run memtest-setup, otherwise it is not created.
Confirmed that the old file /etc/grub.d/20_memtest is not owned by any package, and removed it. Running grub2-mkconfig then gives me one memtest entry. This entry also works both in my F16 and Rawhide guests.
memtest86+-4.20-4.fc16 has been pushed to the Fedora 16 stable repository. If problems still persist, please make note of it in this bug report.
A call to memtest-setup followed by grub2-mkconfig in post-install would be nice, otherwise you're still without a menu entry (no /etc/grub.d/20_memtest86+ and no update to grub.cfg).