FedoraForum.org - Fedora Support Forums and Community
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2011
    Location
    /
    Posts
    5,242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Post GRUB2 and EFI installation questions

    Hi all,

    I did my first UEFI installation (Fedora 20) a few days back. As I was working on my system and carrying out general maintenance, I noticed something that I cannot understand. Here it is -

    I noticed some differences between the grub configuration file (grub.cfg) that I have under /boot/efi and the file generated using grub2-mkconfig. What I am talking about is -

    In the case of /boot/efi/EFI/fedora/grub.cfg, I have -

    Code:
    [...]
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Fedora (3.12.6-300.fc20.x86_64) 20 (Heisenbug)' --class fedora --class gnu-linux --class gnu --class os 
    $menuentry_id_option 'gnulinux-3.12.5-302.fc20.x86_64-advanced-UUID' {
    	load_video
    	set gfxpayload=keep
    	insmod gzio
    	insmod part_gpt
    
    [ ... ]
    Whereas, in the case of grub2-mkconfig

    Code:
    [ ... ]
    
    ### BEGIN /etc/grub.d/10_linux ###
    menuentry 'Fedora, with Linux 3.12.6-300.fc20.x86_64' --class fedora --class gnu-linux --class gnu --class os 
    $menuentry_id_option 'gnulinux-3.12.6-300.fc20.x86_64-advanced-UUID' {
    	set gfxpayload=text
    	insmod gzio
    	insmod part_gpt
    
    [ ... ]
    This diffference exists for all the installed kernels.

    Since grub.cfg is generated based on /etc/default/grub, I looked at it and found this

    Code:
    [ ... ]
    
    GRUB_CMDLINE_LINUX="rd.luks.uuid=luks-UUID vconsole.font=latarcyrheb-sun16 rd.luks.uuid=luks-UUID 
    $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rhgb quiet"
    GRUB_DISABLE_RECOVERY="true"
    GRUB_GFXPAYLOAD_LINUX=text
    I have been breaking my head over the following issues -

    1. If the GRUB_GFXPAYLOAD_LINUX value is set to text, why is my "automatically" generated grub.cfg contain set gfxpayload value as keep?

    2. Why is the function load_video appearing in one config file but not the other?

    3. Differences in the kernel versions listed (green text above).

    4. If I replace the automatically generated grub.cfg with manual grub2-mkconfig generated grub.cfg, I do not get GUI. (I am using NVIDIA driver package from rpmfusion, not nouveau). There are no problems with the original grub.cfg.

    ----------------------------------------

    I am not very familiar with GRUB other than reading the manual to solve any problems I have. I have not found answers from GRUB manual for these - If anyone can clarify one or more of the above stated issues, it would be much appreciated.

    Thanks much!

  2. #2
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: GRUB2 and EFI installation questions

    Ah, yeah, it's a bit of a struggle. I've got two F20 installs now on the same desktop pc (32 and 64 bit) and both using the Nvidia drivers. When you say:

    "If I replace the automatically generated grub.cfg with manual grub2-mkconfig generated grub.cfg, I do not get GUI."

    Do you mean the grub menu itself (low res screen, white text on plain black background), or the Plymouth boot screen, or both?

    Myself, I always use a text screen boot mode (no filling up Fedora logo gui), and want that in a somewhat hi-res mode for my 1920x1080 native res LCD monitor. The "rhgb" is taken out of my kernel boot lines and for good measure I also run:
    Code:
    # plymouth-set-default-theme details --rebuild-initrc
    What you DON'T want in your /etc/default/grub file is:

    GRUB_GFXPAYLOAD_LINUX=text

    That will only get you massive console ugliness and infuses the "set gfxpayload=text" entry. Either remove it altogether or replace it with:

    GRUB_GFXPAYLOAD=keep

    What you DO want in your /etc/default/grub file is:

    GRUB_GFXPAYLOAD=keep

    Which will get you the "set gfxpayload=keep" Without the "keep", if you have a nice colorful and themed grub menu screen, when it passes things over to Plymouth, it loses the higher resolution screen and current graphics mode and switches over to low res console text. Leigh claims you cannot have a gui Plymouth boot screen when using the nvidia drivers due to a frame buffer issue. Maybe that's so, but you can have a decent looking text mode Plymouth boot screen.

    Here are my /etc/default/grub files from both of my installs that you can crib from and try for yourself if you care to:

    F20 32 bit:
    Code:
    GRUB_TIMEOUT=10
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_DEFAULT=0
    GRUB_CMDLINE_LINUX="rd.md=0 rd.lvm=0 rd.dm=0 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) rd.luks=0 vconsole.keymap=us quiet LANG=en_US.UTF-8 nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off"
    GRUB_DISABLE_RECOVERY="true"
    GRUB_THEME="/boot/grub2/themes/system/theme.txt"
    F20 64 bit:
    Code:
    GRUB_TIMEOUT=10
    GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
    GRUB_DEFAULT=0
    GRUB_DISABLE_SUBMENU="true"
    GRUB_TERMINAL_OUTPUT="gfxterm"
    GRUB_CMDLINE_LINUX="vconsole.font=latarcyrheb-sun16 $([ -x /usr/sbin/rhcrashkernel-param ] && /usr/sbin/rhcrashkernel-param || :) vconsole.keymap=us quiet nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off"
    GRUB_DISABLE_RECOVERY="true"
    GRUB_GFXMODE=auto
    GRUB_GFXPAYLOAD=keep
    GRUB_THEME="/boot/grub2/themes/system/theme.txt"
    The 32 bit install never gets a "grub2-mkconfig" due to the 64 bit install is my "Master" grub2 boot menu, which boots 4 OS's (W7 and 3 Fedora's).
    And I admit to having to manually add "load_video" and "set gfxpayload=keep" into the other two Fedora menu entries in the F20 64 bit menu after running grub2-mkconfig, as they are then lost.

    Is there no "GRUB_THEME="/boot/grub2/themes/system/theme.txt"" in your /etc/default/grub file? If not, add that entry, and make sure you have the grub2-starfield-theme package installed.

    I can't really answer your opening question though, other than to say Anaconda's initial install and generation of the grub2 menu entries might have been done somewhat differently than what you do manually using the grub2-mkconfig command.
    Last edited by PabloTwo; 3rd January 2014 at 05:19 AM.

  3. #3
    Join Date
    Mar 2011
    Location
    /
    Posts
    5,242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GRUB2 and EFI installation questions

    Quote Originally Posted by PabloTwo
    Ah, yeah, it's a bit of a struggle. I've got two F20 installs now on the same desktop pc (32 and 64 bit) and both using the Nvidia drivers. When you say:

    "If I replace the automatically generated grub.cfg with manual grub2-mkconfig generated grub.cfg, I do not get GUI."

    Do you mean the grub menu itself (low res screen, white text on plain black background), or the Plymouth boot screen, or both?
    Hi PabloTwo! Thanks for the reply.

    What I meant by no GUI was this - You know how when booting is done, the nvidia green screen flashes and then lightdm shows up? I do not get that.

    If I enter VT and do startxfce4, I get nvidia - device not found (or something - I can post that complete error message later, if needed) error .....

    This happens only in the case of grub.cfg generated using grub2-config.

    I do not understand that "load_video" line either ....

    Quote Originally Posted by PabloTwo
    Leigh claims you cannot have a gui Plymouth boot screen when using the nvidia drivers due to a frame buffer issue. Maybe that's so, but you can have a decent looking text mode Plymouth boot screen.
    I remember Leigh mentioning that in another thread and I like the text mode myself and that's why I started messing around with /etc/default/grub, grub2-mkconfig, etc.

    I will try what you have suggested and post my observations again. Thanks again!

  4. #4
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: GRUB2 and EFI installation questions

    OK, understand now that you get no gui login screen. I'm not having that issue at all. I get a decent looking grub2 menu screen, then boot up with a hi res text mode, then a momentary blank screen, then the lightdm gui login screen.

    I don't know if it makes any difference, but I'm using the akmod-nvidia-304xx drivers from rpmfusion instead of the newer 331.xx drivers due to an issue I had with the 331.xx drivers not having any working CTRL-X in any X terms.

  5. #5
    Join Date
    Aug 2011
    Posts
    899
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GRUB2 and EFI installation questions

    From my grub.cfg:
    Code:
    function load_video {
      if [ x$feature_all_video_module = xy ]; then
        insmod all_video
      else
        insmod efi_gop
        insmod efi_uga
        insmod ieee1275_fb
        insmod vbe
        insmod vga
        insmod video_bochs
        insmod video_cirrus
      fi
    }
    IIUC, it's pretty much redundant if you're using text GRUB (i.e. grub terminal_output is not gfxmode).

    It could be that your current grub.cfg was created by Anaconda at install time, at which time you hadn't edited /etc/default/grub yet.

    IIRC the RpmFUsion nvidia packages modify grub.cfg (it runs grub2-mkconfig, edits /etc/default/grub, runs grubby).

    When the boot fails to bring up the GUI login screen, check if the nvidia kernel module is loaded, also if the nouveau module got loaded (it shouldn't). I couldn't see from your posts the kernel cmdline, are there differences too?

  6. #6
    PabloTwo's Avatar
    PabloTwo is offline "Fedora User" T-Shirt Winner
    Join Date
    Mar 2007
    Location
    Seville, FL
    Posts
    8,919
    Mentioned
    39 Post(s)
    Tagged
    0 Thread(s)

    Re: GRUB2 and EFI installation questions

    Duh, just getting awake with first cup of coffee and booting up the laptop and it suddenly hits me.

    When you install the nvidia drivers, it adds three parameters to your current kernel boot line in the grub.cfg file, mostly to blacklist nouveau. It does not add them to your /etc/default/grub file. So when you run the grub2-mkconfig command, those entries are removed from the kernel boot line. You need to manually include them in your /etc/default/grub file to keep that from happening.
    Code:
    nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off
    Sorry it took me so long to recall that.

  7. #7
    Join Date
    Mar 2011
    Location
    /
    Posts
    5,242
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: GRUB2 and EFI installation questions

    Quote Originally Posted by PabloTwo
    Duh, just getting awake with first cup of coffee and booting up the laptop and it suddenly hits me.

    When you install the nvidia drivers, it adds three parameters to your current kernel boot line in the grub.cfg file, mostly to blacklist nouveau. It does not add them to your /etc/default/grub file. So when you run the grub2-mkconfig command, those entries are removed from the kernel boot line. You need to manually include them in your /etc/default/grub file to keep that from happening.
    Code:
    nouveau.modeset=0 rd.driver.blacklist=nouveau video=vesa:off
    Sorry it took me so long to recall that.
    Yup! That was it!

    Thanks a lot! I did look at nouveau blacklist yesterday but I don't know what I have thinking I did not look in the one place that really matters -

    Thanks a lot PabloTwo! Everything resolved!

Similar Threads

  1. Grub2 loopback booting under EFI
    By kldixon in forum Installation, Upgrades and Live Media
    Replies: 1
    Last Post: 3rd October 2013, 08:24 PM
  2. Grub2, EFI, bad ELF header...
    By Thetargos in forum Mac Chat
    Replies: 1
    Last Post: 27th May 2012, 06:49 PM
  3. F16 - GRUB2 EFI non-Mac
    By Don3 in forum Using Fedora
    Replies: 32
    Last Post: 2nd March 2012, 04:33 PM
  4. [SOLVED] GRUB2-EFI, where is the config file?
    By chrismurphy in forum F16 Development
    Replies: 11
    Last Post: 21st October 2011, 03:16 PM
  5. [x86_64] Installing Grub2 on EFI
    By Elv13 in forum Mac Chat
    Replies: 1
    Last Post: 24th March 2010, 02:44 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •