GRUB2 (grub.cfg)

Arquivo de configuração de Grub para Sabayon após a versão 13.08

Categoria: Miscelânea

Software: GRUB2

[ Hits: 3.683 ]

Por: Alberto Federman Neto.


Meu arquivo de configuração do Grub, para o Sabayon versão 13.08 ou superior, agora compatível com Systemd e Plymouth.

Ele permite manter seu Grub funcionando, reconhecendo todas as suas distros e mantendo o Plymouth no boot.

Está sendo usado no Sabayon Linux 16.10, no Computador AMD Phenon 8 núcleos da USP. Este é o mais novo, Kernel 4.7, OpenSUSE etc.

Esta versão substitui o arquivo abaixo, agora obsoleto:

https://www.vivaolinux.com.br/etc/grubcfg/

Para usar, copie seu /boot/grub.cfg para proteger e depois, no lugar dele, use o arquivo abaixo.

Para detalhes, leia este artigo:

https://edpsblog.wordpress.com/2016/04/15/protegendo-configuracoes-de-grub-e-plymouth-um-jeito-facil...


# Arquivo de Configuração do Grub2, no Sabayon Linux, contendo Boot Correto para todos os meus SOs.
# Este Ativa o Plymouth, sem problema. 
# Publicado para protegê-lo.
# Por Joost Ruis e Time Sabayon.
# Modificado por Albfneto, 2016.
# Versão 10.
# instruções: Copie para /boot/grub/grub.cfg

#
# 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_header ###
if [ -s $prefix/grubenv ]; then
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

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_msdos
insmod ext2
set root='hd0,msdos6'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6'  896236bd-9da1-48ce-b4fe-7233436dbb47
else
  search --no-floppy --fs-uuid --set=root 896236bd-9da1-48ce-b4fe-7233436dbb47
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=1024x768
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=pt_BR
  insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=20
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=20
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Sabayon GNU/Linux Principal' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-896236bd-9da1-48ce-b4fe-7233436dbb47' {
   load_video
   insmod gzio
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos6'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6'  896236bd-9da1-48ce-b4fe-7233436dbb47
   else
     search --no-floppy --fs-uuid --set=root 896236bd-9da1-48ce-b4fe-7233436dbb47
   fi
   echo   'Carregando o Linux x86_64-4.7.0-sabayon...'
   linux   /boot/kernel-genkernel-x86_64-4.7.0-sabayon real_root=UUID=896236bd-9da1-48ce-b4fe-7233436dbb47 real_resume=/dev/sda8 ro quiet splash  
   echo   'Carregando o ramdisk inicial...'
   initrd   /boot/initramfs-genkernel-x86_64-4.7.0-sabayon
}
submenu 'Opções avançadas para Sabayon GNU/Linux' $menuentry_id_option 'gnulinux-advanced-896236bd-9da1-48ce-b4fe-7233436dbb47' {
   menuentry 'Sabayon GNU/Linux, com o Linux x86_64-4.7.0-sabayon' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.7.0-sabayon-advanced-896236bd-9da1-48ce-b4fe-7233436dbb47' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos6'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6'  896236bd-9da1-48ce-b4fe-7233436dbb47
      else
        search --no-floppy --fs-uuid --set=root 896236bd-9da1-48ce-b4fe-7233436dbb47
      fi
      echo   'Carregando o Linux x86_64-4.7.0-sabayon...'
      linux   /boot/kernel-genkernel-x86_64-4.7.0-sabayon root=UUID=896236bd-9da1-48ce-b4fe-7233436dbb47 ro  
      echo   'Carregando o ramdisk inicial...'
      initrd   /boot/initramfs-genkernel-x86_64-4.7.0-sabayon
   }
   menuentry 'Sabayon GNU/Linux, com o Linux x86_64-4.7.0-sabayon (modo de recuperação)' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.7.0-sabayon-recovery-896236bd-9da1-48ce-b4fe-7233436dbb47' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos6'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6'  896236bd-9da1-48ce-b4fe-7233436dbb47
      else
        search --no-floppy --fs-uuid --set=root 896236bd-9da1-48ce-b4fe-7233436dbb47
      fi
      echo   'Carregando o Linux x86_64-4.7.0-sabayon...'
      linux   /boot/kernel-genkernel-x86_64-4.7.0-sabayon root=UUID=896236bd-9da1-48ce-b4fe-7233436dbb47 ro single 
      echo   'Carregando o ramdisk inicial...'
      initrd   /boot/initramfs-genkernel-x86_64-4.7.0-sabayon
   }
   menuentry 'Sabayon GNU/Linux, com o Linux x86_64-4.6.0-sabayon' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.6.0-sabayon-advanced-896236bd-9da1-48ce-b4fe-7233436dbb47' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos6'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6'  896236bd-9da1-48ce-b4fe-7233436dbb47
      else
        search --no-floppy --fs-uuid --set=root 896236bd-9da1-48ce-b4fe-7233436dbb47
      fi
      echo   'Carregando o Linux x86_64-4.6.0-sabayon...'
      linux   /boot/kernel-genkernel-x86_64-4.6.0-sabayon root=UUID=896236bd-9da1-48ce-b4fe-7233436dbb47 ro  
      echo   'Carregando o ramdisk inicial...'
      initrd   /boot/initramfs-genkernel-x86_64-4.6.0-sabayon
   }
   menuentry 'Sabayon GNU/Linux, com o Linux x86_64-4.6.0-sabayon (modo de recuperação)' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.6.0-sabayon-recovery-896236bd-9da1-48ce-b4fe-7233436dbb47' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos6'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6'  896236bd-9da1-48ce-b4fe-7233436dbb47
      else
        search --no-floppy --fs-uuid --set=root 896236bd-9da1-48ce-b4fe-7233436dbb47
      fi
      echo   'Carregando o Linux x86_64-4.6.0-sabayon...'
      linux   /boot/kernel-genkernel-x86_64-4.6.0-sabayon root=UUID=896236bd-9da1-48ce-b4fe-7233436dbb47 ro single 
      echo   'Carregando o ramdisk inicial...'
      initrd   /boot/initramfs-genkernel-x86_64-4.6.0-sabayon
   }
   menuentry 'Sabayon GNU/Linux, com o Linux x86_64-4.1.0-sabayon' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.1.0-sabayon-advanced-896236bd-9da1-48ce-b4fe-7233436dbb47' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos6'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6'  896236bd-9da1-48ce-b4fe-7233436dbb47
      else
        search --no-floppy --fs-uuid --set=root 896236bd-9da1-48ce-b4fe-7233436dbb47
      fi
      echo   'Carregando o Linux x86_64-4.1.0-sabayon...'
      linux   /boot/kernel-genkernel-x86_64-4.1.0-sabayon root=UUID=896236bd-9da1-48ce-b4fe-7233436dbb47 ro  
      echo   'Carregando o ramdisk inicial...'
      initrd   /boot/initramfs-genkernel-x86_64-4.1.0-sabayon
   }
   menuentry 'Sabayon GNU/Linux, com o Linux x86_64-4.1.0-sabayon (modo de recuperação)' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-4.1.0-sabayon-recovery-896236bd-9da1-48ce-b4fe-7233436dbb47' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos6'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos6 --hint-efi=hd0,msdos6 --hint-baremetal=ahci0,msdos6 --hint='hd0,msdos6'  896236bd-9da1-48ce-b4fe-7233436dbb47
      else
        search --no-floppy --fs-uuid --set=root 896236bd-9da1-48ce-b4fe-7233436dbb47
      fi
      echo   'Carregando o Linux x86_64-4.1.0-sabayon...'
      linux   /boot/kernel-genkernel-x86_64-4.1.0-sabayon root=UUID=896236bd-9da1-48ce-b4fe-7233436dbb47 ro single 
      echo   'Carregando o ramdisk inicial...'
      initrd   /boot/initramfs-genkernel-x86_64-4.1.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 ###
menuentry 'Windows 7 (loader) (em /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-32A81DDEA81DA201' {
   insmod part_msdos
   insmod ntfs
   set root='hd0,msdos1'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1'  32A81DDEA81DA201
   else
     search --no-floppy --fs-uuid --set=root 32A81DDEA81DA201
   fi
   parttool ${root} hidden-
   chainloader +1
}
menuentry 'openSUSE 42.2 Alpha (x86_64) (em /dev/sda9)' --class suse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-38dac3da-5445-4be6-b85b-0cf28d598604' {
   insmod part_msdos
   insmod btrfs
   set root='hd0,msdos9'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 --hint='hd0,msdos9'  38dac3da-5445-4be6-b85b-0cf28d598604
   else
     search --no-floppy --fs-uuid --set=root 38dac3da-5445-4be6-b85b-0cf28d598604
   fi
   linux /boot/vmlinuz-4.4.13-1-default root=UUID=38dac3da-5445-4be6-b85b-0cf28d598604 ${extra_cmdline} quiet splash=silent resume=/dev/disk/by-uuid/8f525462-01ea-480c-aeca-422619212cd4 splash=silent quiet showopts
   initrd /boot/initrd-4.4.13-1-default
}
submenu 'Opções avançadas para openSUSE 42.2 Alpha (x86_64) (em /dev/sda9)' $menuentry_id_option 'osprober-gnulinux-advanced-38dac3da-5445-4be6-b85b-0cf28d598604' {
   menuentry 'openSUSE Leap 42.2 Alpha (em /dev/sda9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.4.13-1-default--38dac3da-5445-4be6-b85b-0cf28d598604' {
      insmod part_msdos
      insmod btrfs
      set root='hd0,msdos9'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 --hint='hd0,msdos9'  38dac3da-5445-4be6-b85b-0cf28d598604
      else
        search --no-floppy --fs-uuid --set=root 38dac3da-5445-4be6-b85b-0cf28d598604
      fi
      linux /boot/vmlinuz-4.4.13-1-default root=UUID=38dac3da-5445-4be6-b85b-0cf28d598604 ${extra_cmdline} quiet splash=silent resume=/dev/disk/by-uuid/8f525462-01ea-480c-aeca-422619212cd4 splash=silent quiet showopts
      initrd /boot/initrd-4.4.13-1-default
   }
   menuentry 'openSUSE Leap 42.2 Alpha, com o Linux 4.4.13-1-default (em /dev/sda9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.4.13-1-default--38dac3da-5445-4be6-b85b-0cf28d598604' {
      insmod part_msdos
      insmod btrfs
      set root='hd0,msdos9'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 --hint='hd0,msdos9'  38dac3da-5445-4be6-b85b-0cf28d598604
      else
        search --no-floppy --fs-uuid --set=root 38dac3da-5445-4be6-b85b-0cf28d598604
      fi
      linux /boot/vmlinuz-4.4.13-1-default root=UUID=38dac3da-5445-4be6-b85b-0cf28d598604 ${extra_cmdline} quiet splash=silent resume=/dev/disk/by-uuid/8f525462-01ea-480c-aeca-422619212cd4 splash=silent quiet showopts
      initrd /boot/initrd-4.4.13-1-default
   }
   menuentry 'openSUSE Leap 42.2 Alpha, com o Linux 4.4.13-1-default (modo de recuperação) (em /dev/sda9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.4.13-1-default--38dac3da-5445-4be6-b85b-0cf28d598604' {
      insmod part_msdos
      insmod btrfs
      set root='hd0,msdos9'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 --hint='hd0,msdos9'  38dac3da-5445-4be6-b85b-0cf28d598604
      else
        search --no-floppy --fs-uuid --set=root 38dac3da-5445-4be6-b85b-0cf28d598604
      fi
      linux /boot/vmlinuz-4.4.13-1-default root=UUID=38dac3da-5445-4be6-b85b-0cf28d598604 ${extra_cmdline}
      initrd /boot/initrd-4.4.13-1-default
   }
   menuentry 'openSUSE Leap 42.2 Alpha, com o Linux 4.4.11-2-default (em /dev/sda9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.4.11-2-default--38dac3da-5445-4be6-b85b-0cf28d598604' {
      insmod part_msdos
      insmod btrfs
      set root='hd0,msdos9'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 --hint='hd0,msdos9'  38dac3da-5445-4be6-b85b-0cf28d598604
      else
        search --no-floppy --fs-uuid --set=root 38dac3da-5445-4be6-b85b-0cf28d598604
      fi
      linux /boot/vmlinuz-4.4.11-2-default root=UUID=38dac3da-5445-4be6-b85b-0cf28d598604 ${extra_cmdline} quiet splash=silent resume=/dev/disk/by-uuid/8f525462-01ea-480c-aeca-422619212cd4 splash=silent quiet showopts
      initrd /boot/initrd-4.4.11-2-default
   }
   menuentry 'openSUSE Leap 42.2 Alpha, com o Linux 4.4.11-2-default (modo de recuperação) (em /dev/sda9)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-4.4.11-2-default--38dac3da-5445-4be6-b85b-0cf28d598604' {
      insmod part_msdos
      insmod btrfs
      set root='hd0,msdos9'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos9 --hint-efi=hd0,msdos9 --hint-baremetal=ahci0,msdos9 --hint='hd0,msdos9'  38dac3da-5445-4be6-b85b-0cf28d598604
      else
        search --no-floppy --fs-uuid --set=root 38dac3da-5445-4be6-b85b-0cf28d598604
      fi
      linux /boot/vmlinuz-4.4.11-2-default root=UUID=38dac3da-5445-4be6-b85b-0cf28d598604 ${extra_cmdline}
      initrd /boot/initrd-4.4.11-2-default
   }
}

### 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 ###
  


Comentários

Nenhum comentário foi encontrado.


Contribuir com comentário

  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts