PDA

View Full Version : [SOLVED] Grub2: linux16 and initrd16 instead linux and initrd



pfedort
12th December 2014, 11:14 PM
I don't know why but when I run "grub2-mkconfig -o /boot/grub2/grub.cfg" I get linux16 and initrd16 instead linux and initrd in the /boot/grub2/grub.cfg file.
This has never happened to me before.
Is it possible to revert this situation?

pfedort
13th December 2014, 09:20 PM
Is this common or hard to fix?

dobbi
13th December 2014, 09:30 PM
Have you tried looking into /etc/default/grub


The file /etc/default/grub controls the operation of grub-mkconfig. It is sourced by a shell script, and so must be valid POSIX shell input; normally, it will just be a sequence of ‘KEY=value’ lines, but if the value contains spaces or other special characters then it must be quoted.
source:
https://www.gnu.org/software/grub/manual/html_node/Simple-configuration.html

pfedort
13th December 2014, 11:22 PM
Yes, I've tried and found nothing. :dis:

imsedgar
16th December 2014, 07:08 AM
Why do you want to revert to linux and initrd?

pfedort
16th December 2014, 08:11 PM
Because Plymouth doesn't show up with linux16 and inirtd16. It falls back to text mode(tricolor progress bar).

dobbi
16th December 2014, 09:28 PM
In the cfg file I think I saw something about GRUB looking into the font type if it was UTF8 it would choose the normal initrd and if not it would go with 16 bits, so you could try changing the font there.

pfedort
16th December 2014, 11:13 PM
Did you see that information in /boot/grub2/grub.cfg?

I know TTF fonts but don't know UTF-8 fonts.

imsedgar
16th December 2014, 11:50 PM
I suppose you are writing about Fedora 21 on an x86_64 oder i?86 system?

The lines with linux16 and initrd16 are generated by /etc/grub.d/10_linux .

The function linux_entry contains

linux${sixteenbit}
initrd${sixteenbit}

The variable sixteenbit is set in this part of function linux_entry:

sixteenbit=""
linuxefi="linux"
initrdefi="initrd"
case "$machine" in
i?86|x86_64)
sixteenbit="16"
linuxefi="linuxefi"
initrdefi="initrdefi"
;;
aarch64)
linuxefi="linux"
initrdefi="initrd"
;;
esac


So, this shell script doesn't contain variables that can be set in /etc/default/grub . The decition to use the 16 bit variant is hard coded and only based on the hardware architecture.

You can modify this script, but I think it may be overwritten by the next update of grub2-tools.


Can you test if your problem is solved if you use linux and initrd?
1. Log in as root (or use "sudo bash" to get a root shell).
2. Save the original file /etc/grub.d/10_linux to a save place (but not in /etc/grub.d/ because each file will be executed by grub2-mkconfig).
# cp -a /etc/grub.d/10_linux /root/etc-grub2-10_linux.original
3. Modify the script:
# sed -i -e 's/sixteenbit="16"/sixteenbit=""/' /etc/grub.d/10_linux
4. Recreate grub.conf:
# grub2-mkconfig -o /boot/grub2/grub.cfg
5. Try to reboot and test if your problem still exists.

If you need to undo the test configuration, do:
1. Restore the script:
# cp -a /root/etc-grub2-10_linux.original /etc/grub.d/10_linux
2. Recreate grub.conf:
# grub2-mkconfig -o /boot/grub2/grub.cfg


If this solves your problem, please file a bug report against Fedora 21 package grub2-tools and describe what your problem is (on what hardware, what is displayed, etc.) and what changes solved it for you. Please add a descrition how the maintainers can reproduce your bug.

pfedort
17th December 2014, 12:05 AM
imsedgar,

You solved my problem. Many thanks!!! :D

mikeym
25th February 2015, 10:00 AM
I have created a bug report for this: https://bugzilla.redhat.com/show_bug.cgi?id=1196065