Why does Installer include deprecated "vga=791" in grub.cfg?

Installer Issues via Installer -- Not for global upgrades or upgrading individual packages -- ONLY ISSUES WITH INSTALLATION OF THE OS -- Can't get Sabayon installed, than post here, otherwise use correct forums

Moderator: Moderators

Re: Why does Installer include deprecated "vga=791" in grub.

Postby micia » Mon Dec 10, 2012 3:33

On Sabayon the gfxpayload option doesn't get included at all and is not mentioned by either /etc/default/grub or /etc/default/sabayon-grub:
Code: Select all
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_fonts ###
### END /etc/grub.d/00_fonts ###

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
set default="${saved_entry}"

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}

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
}

if [ x$feature_default_font_path = xy ] ; then
   font=unicode
else
insmod part_gpt
insmod zfs
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  5c8bfe4209adc5d1
else
  search --no-floppy --fs-uuid --set=root 5c8bfe4209adc5d1
fi
    font="/ROOT/sabayon@//usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1024x600
  load_video
  # vga= is deprecated, grub2 handles this just fine
  # making grub2 res == linux fb res
  set gfxpayload=keep
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=it_IT
  insmod gettext
fi
terminal_output gfxterm
insmod part_gpt
insmod zfs
set root='hd0,gpt1'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  5c8bfe4209adc5d1
else
  search --no-floppy --fs-uuid --set=root 5c8bfe4209adc5d1
fi
insmod jpeg
background_image -m stretch /ROOT/sabayon@//boot/grub/nu13.jpg
if sleep --interruptible 0 ; then
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Sabayon GNU/Linux' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-5c8bfe4209adc5d1' {
   load_video
   insmod gzio
   insmod part_gpt
   insmod zfs
   set root='hd0,gpt1'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  5c8bfe4209adc5d1
   else
     search --no-floppy --fs-uuid --set=root 5c8bfe4209adc5d1
   fi
   echo   'Caricamento Linux x86_64-3.6.0-sabayon...'
   linux   /ROOT/sabayon@//boot/kernel-genkernel-x86_64-3.6.0-sabayon ro dozfs acpi_osi=Linux init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 quiet dokeymap keymap=it root=UUID=fa62b399-afe7-4bbf-b961-ece94e894d46
   echo   'Caricamento ramdisk iniziale...'
   initrd   /ROOT/sabayon@//boot/initramfs-genkernel-x86_64-3.6.0-sabayon
}
submenu 'Opzioni avanzate per Sabayon GNU/Linux' $menuentry_id_option 'gnulinux-advanced-5c8bfe4209adc5d1' {
   menuentry 'Sabayon GNU/Linux, con Linux x86_64-3.6.0-sabayon' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-3.6.0-sabayon-advanced-5c8bfe4209adc5d1' {
      load_video
      insmod gzio
      insmod part_gpt
      insmod zfs
      set root='hd0,gpt1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  5c8bfe4209adc5d1
      else
        search --no-floppy --fs-uuid --set=root 5c8bfe4209adc5d1
      fi
      echo   'Caricamento Linux x86_64-3.6.0-sabayon...'
      linux   /ROOT/sabayon@//boot/kernel-genkernel-x86_64-3.6.0-sabayon ro dozfs acpi_osi=Linux init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 quiet dokeymap keymap=it root=UUID=fa62b399-afe7-4bbf-b961-ece94e894d46
      echo   'Caricamento ramdisk iniziale...'
      initrd   /ROOT/sabayon@//boot/initramfs-genkernel-x86_64-3.6.0-sabayon
   }
   menuentry 'Sabayon GNU/Linux, con Linux x86_64-3.6.0-sabayon (modalità ripristino)' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-3.6.0-sabayon-recovery-5c8bfe4209adc5d1' {
      load_video
      insmod gzio
      insmod part_gpt
      insmod zfs
      set root='hd0,gpt1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  5c8bfe4209adc5d1
      else
        search --no-floppy --fs-uuid --set=root 5c8bfe4209adc5d1
      fi
      echo   'Caricamento Linux x86_64-3.6.0-sabayon...'
      linux   /ROOT/sabayon@//boot/kernel-genkernel-x86_64-3.6.0-sabayon ro single init_opts=single dozfs acpi_osi=Linux init=/linuxrc splash=verbose,theme:sabayon video=vesafb:ywrap,mtrr:3 quiet dokeymap keymap=it root=UUID=fa62b399-afe7-4bbf-b961-ece94e894d46
      echo   'Caricamento ramdisk iniziale...'
      initrd   /ROOT/sabayon@//boot/initramfs-genkernel-x86_64-3.6.0-sabayon
   }
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
fi
### END /etc/grub.d/41_custom ###

(notice that I've customized a bit my GRUB setup, but that shouldn't matter in the scope of this discussion)

The only line that mentions gfxpayload is:
# vga= is deprecated, grub2 handles this just fine
# making grub2 res == linux fb res
set gfxpayload=keep


Which, through a bit of grepping in /etc/grub.d (and as noted by grub.cfg itself), is generated by:
/etc/grub.d/00_header
line: 182

The VGA line could be inserted because it appears to be more reliable than the gfxpayload option on some systems, and it is compatible with the way the syslinux bootloader (used in the live medium) specifies video modes, but I am not 100% sure of this.

Probably changing the way the installer works could be more clumsy with the gfxpayload option, I imagine a new variable should be added to sabayon-grub with special attention to set it only if it isn't already set (unless the inclusion of the file is moved on top of /etc/default/grub, but it would be equally troublesome), also retrieving its value in live mode reliably could be more painful (since an actual resolution is required rather than a VESA mode), but again, I'm not entirely sure about this.
micia
Sagely Hen
 
Posts: 2718
Joined: Wed Nov 26, 2008 16:41

Re: Why does Installer include deprecated "vga=791" in grub.

Postby Fitzcarraldo » Mon Dec 10, 2012 9:28

I see that in your case the kernel boot line in your grub.cfg does not contain either "gfxpayload=1024x768x16" or "vga=791", but look again at my first post:

Fitzcarraldo wrote:This is something I've been curious about for a long time, and have finally got around to posting following my latest installation of SL10 64-bit Xfce (this time onto someone's Acer Aspire 5536-635G25Mn laptop).

The SL Installer installed a grub.cfg that included the following comment:

if loadfont $font ; then
set gfxmode=1024x768
load_video
# vga= is deprecated, grub2 handles this just fine
# making grub2 res == linux fb res
set gfxpayload=keep
insmod gfxterm
fi

and yet the kernel boot line in that file was:

linux /kernel-genkernel-x86_64-3.5.0-sabayon ro init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 gfxpayload=1024x768x16 console=tty1 quiet dokeymap keymap=uk domdadm resume=swap:UUID=21d41eeb-fdbb-4722-a766-00f64b857ef6 real_resume=UUID=21d41eeb-fdbb-4722-a766-00f64b857ef6 root=UUID=fd1b4e08-fc28-4a2b-898a-a729887ea756 docrypt

If "vga=" is deprecated in GRUB 2, why does the SL Installer add it in the kernel boot line? Or to put the question another way, why have the SL developers not changed the SL Installer's code or files so as to not add the "vga=791" in grub.cfg? Is there a specific reason why it has been left in? I'd be interested to hear from the developer responsible (lxnay?).

Notice that the Linux kernel boot line created by SL contains both "vga=791" and "gfxpayload=1024x768x16". :)

According to lxnay in an earlier post, the SL Installer inserted the "vga=791" in my case (but not in your case), so what inserted the "gfxpayload=1024x768x16" in my case (but not in your case)? I assume it must also have been the SL Installer. I'll have another look at the files on the Acer Aspire 5536 when I arrive home after 22 December, as I remember seeing a comment in a file in, I think, the /etc/default/ directory on the Acer Aspire 5536 with a comment saying something along the lines of "Do not edit this file, which was put here by Anaconda". Does your file /etc/default/sabayon-grub have a comment like that in it? If not, is there another file in /etc/default/ that has a comment in it like that?

Something does not appear to be working well for everyone in the installation process because a number of SL users have had to remove the "vga=791" from the kernel boot line in grub.cfg (I did, as well) to get the machine to boot to a working desktop. And it still appears to me that, even if the SL Installer is putting "vga=791" in the kernel boot line (at least for some machines), there should not be "gfxpayload=1024x768x16" in the kernel boot line (irrespective of whether or not it contains "vga=791").
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Why does Installer include deprecated "vga=791" in grub.

Postby micia » Mon Dec 10, 2012 12:08

Curious fact, by the way I've removed the vga entry from my sabayon-grub actually, because I enabled kernel modesetting in this machine (I should have explained it earlier), so if you were wondering why the vga mode isn't in my kernel boot line, that is why. :lol:

Regardless, I don't recall ever seeing gfxpayload toghether with vga in any of my installations. The generation of grub.cfg should depend only on /etc/default/grub, the installer produces /etc/default/sabayon-grub (which is the only file with the comment you are referring to on my installation) and it only affects grub.cfg because it gets included at the end of /etc/default/grub.
I can't find anything suspect in /etc/grub.d either.
micia
Sagely Hen
 
Posts: 2718
Joined: Wed Nov 26, 2008 16:41

Re: Why does Installer include deprecated "vga=791" in grub.

Postby Fitzcarraldo » Mon Dec 10, 2012 21:39

micia wrote:by the way I've removed the vga entry from my sabayon-grub actually, because I enabled kernel modesetting in this machine (I should have explained it earlier)

You certainly should have mentioned it! ;-)

I can't investigate further until I'm back at home on 22 December. Immediately following installation, the Acer Aspire 5536 booted to a black screen so I logged-in via TTY1 and backed up grub.cfg to grub.cfg.original, so I'll have another look in that backup (and the files in /etc/default/) when I'm home. But I'm pretty sure the contents I quoted in my earlier posts before I left home are from the backup file before I fixed the SL installation*. To be continued...

* Which wasn't easy; a newcomer to SL would never have been able to do it, and it wasn't just a case of deleting the "vga=791" either, but that's another story.
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Why does Installer include deprecated "vga=791" in grub.

Postby Fitzcarraldo » Sun Dec 23, 2012 18:18

OK, I'm back at home now. I checked again on the Acer Aspire 5536-643G25Mn laptop on which I installed SL 10 Xfce and rolled to latest, and the kernel boot line in grub.cfg is:

linux /kernel-genkernel-x86_64-3.6.0-sabayon ro init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 gfxpayload=1024x768x16 console=tty1 quiet dokeymap keymap=uk domdadm resume=swap:UUID=21d41eeb-fdbb-4722-a766-00f64b857ef6 real_resume=UUID=21d41eeb-fdbb-4722-a766-00f64b857ef6 root=UUID=fd1b4e08-fc28-4a2b-898a-a729887ea756 docrypt

and I've also had a look at the Acer Aspire 5920-5A2G25MI on which I also installed SL 10 Xfce and rolled to latest, and the kernel boot line in grub.cfg on that laptop is:

linux /kernel-genkernel-x86_64-3.6.0-sabayon ro init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 gfxpayload=1024x768x16 console=tty1 quiet dokeymap keymap=uk domdadm resume=swap:UUID=afca0136-e924-46ce-bb6a-0adc7180f870 real_resume=UUID=afca0136-e924-46ce-bb6a-0adc7180f870 root=UUID=426cdc4d-c78f-4b95-b133-35d6c62113e0 docrypt

So, as you can see, something is inserting "gfxpayload=1024x768x16" into the kernel boot line in grub.cfg. So then I looked in /etc/default/ on the Acer Aspire 5536-643G25Mn and that directory contains four files: grub, sabayon-grub, ufw and useradd. The file sabayon-grub contains:

# this file has been added by the Anaconda Installer
# containing default installer bootloader arguments.
# DO NOT EDIT NOR REMOVE THIS FILE DIRECTLY !!!
GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 gfxpayload=1024x768x16 console=tty1 quiet dokeymap keymap=uk domdadm resume=swap:UUID=21d41eeb-fdbb-4722-a766-00f64b857ef6 real_resume=UUID=21d41eeb-fdbb-4722-a766-00f64b857ef6 root=UUID=fd1b4e08-fc28-4a2b-898a-a729887ea756 docrypt"

Then I looked in the directory /etc/default/ on the Acer Aspire 5920-5A2G25MI and it contains six files: cdrecord, grub, rscsi, sabyon-grub, ufw and useradd, and the file sabayon-grub contains:

# this file has been added by the Anaconda Installer
# containing default installer bootloader arguments.
# DO NOT EDIT NOR REMOVE THIS FILE DIRECTLY !!!
GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 gfxpayload=1024x768x16 console=tty1 quiet dokeymap keymap=uk domdadm resume=swap:UUID=afca0136-e924-46ce-bb6a-0adc7180f870 real_resume=UUID=afca0136-e924-46ce-bb6a-0adc7180f870 root=UUID=426cdc4d-c78f-4b95-b133-35d6c62113e0 docrypt"

So, there you have it. The SL Installer puts the "gfxpayload=1024x768x16" as well as the "vga=791" in the kernel boot line in grub.cfg.

(BTW, the Acer Aspire 5536-643G25Mn has an ATI Radeon HD 3200 GPU and is using the open-source Radeon driver (radeon module loaded with "modeset=1" option in /etc/conf.d/modules), and the Acer Aspire 5920-5A2G25MI has an Intel Mobile GM965/GL960 Integrated Graphics Controller and is using the open-source Intel driver.)
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Re: Why does Installer include deprecated "vga=791" in grub.

Postby raman » Mon Dec 24, 2012 13:04

Fitz you have right and for my experiences for installing about 30 Sabayons are the same. Something is not right with Sabayon installator, very often everything is fine when you start system from USB, but if you install on hard drive, the parameters are not right and I must change them manually. I understand if problems is cuz wrong discs mapping in system and grub, when grub is looking for bios mapping (it's very wrong but independent problem from Sabayon), but maybe this problem could be corrected on Sabayon side?

But I can't understand why correctly working graphical setup on USB live session is not cloning to hard disc installation. That not will be easier? To check hardware on live session and copying correctly?
The problem is with grub parameters often.

Sorry a little offtopic.
raman
Advanced Hen
 
Posts: 236
Joined: Mon Sep 06, 2010 17:18
Location: Poland

Re: Why does Installer include deprecated "vga=791" in grub.

Postby micia » Fri Dec 28, 2012 0:34

Sorry for the delay, my connection isn't that good these days. :lol:

Fitzcarraldo wrote:
# this file has been added by the Anaconda Installer
# containing default installer bootloader arguments.
# DO NOT EDIT NOR REMOVE THIS FILE DIRECTLY !!!
GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX} init=/linuxrc splash=silent,theme:sabayon video=vesafb:ywrap,mtrr:3 vga=791 gfxpayload=1024x768x16 console=tty1 quiet dokeymap keymap=uk domdadm resume=swap:UUID=afca0136-e924-46ce-bb6a-0adc7180f870 real_resume=UUID=afca0136-e924-46ce-bb6a-0adc7180f870 root=UUID=426cdc4d-c78f-4b95-b133-35d6c62113e0 docrypt"

So, there you have it. The SL Installer puts the "gfxpayload=1024x768x16" as well as the "vga=791" in the kernel boot line in grub.cfg.


Today I've installed Sabayon from a Daily ISO (Xfce4 daily, downloaded on December the 26th), I can confirm I have the same sabayon-grub file, I always use regular release versions for my installation, so apparently something has changed from release to daily version, I didn't have the gfxpayload parameter in my previous installations.

(Late) Merry Christmas and Happy New Year. :alien:
micia
Sagely Hen
 
Posts: 2718
Joined: Wed Nov 26, 2008 16:41

Re: Why does Installer include deprecated "vga=791" in grub.

Postby Fitzcarraldo » Fri Dec 28, 2012 12:12

I didn't use a Daily ISO. In both cases I used the SL 10 amd64 Xfce ISO.

Anyway, the bottom line as far as I can tell is that both parameters should not be in the kernel boot line simultaneously (see the grub.cfg from my Gentoo installation in a previous post, for example). In fact, I still cannot find an authoritative reference that says that "gfxpayload=1024x768x16" should be in the kernel boot line at all. Assigned to GRUB_GFXPAYLOAD_LINUX in /etc/default/grub, yes, but not in the kernel boot line in grub.cfg (read again my post http://forum.sabayon.org/viewtopic.php? ... 70#p155846, especially the excerpt from the GNU GRUB 2 manual). As I mentioned in an earlier post, in the grub.cfg of the Gentoo installation on my main laptop the gfxpayload commands for each kernel image are located elsewhere in the grub.cfg file, not in the linux boot line, if I specify GRUB_GFXPAYLOAD_LINUX=1024x768 in /etc/default/grub and run the grub2-mkconfig command.

In fact, as mentioned in previous posts, according to the GNU GRUB manual and comments in grub.cfg, if "GRUB_GFXPAYLOAD_LINUX=1024x768" is included in /etc/default/grub then the "vga=791" is not required in the kernel boot line in grub.cfg either (see the grub.cfg from my Gentoo installation in a previous post, for example).
User avatar
Fitzcarraldo
Sagely Hen
 
Posts: 7981
Joined: Sat Mar 10, 2007 5:40
Location: United Kingdom

Previous

Return to Installer Issues - Calamares **Not for Package Manager Stuff**

Who is online

Users browsing this forum: No registered users and 4 guests

cron