Problema Grub2

Tutto ciò che è pertinente a Sabayon Linux, indipendentemente dall'architettura e dall'ambiente grafico

Moderator: Moderators

Problema Grub2

Postby anonimo » Fri Oct 12, 2012 20:33

Ciao a tutti!
Dopo parecchi giorni sono ritornato a casa e metter mano sul mio pc fisso, e non so come di preciso - ho aggiornato il kernel, ho ripristinato il bootloader da livecd e sono riuscito a reinstallare GRUB2 - son riuscito a far aggiornare il grub col comando:
Code: Select all
# grub-mkconfig -o /boot/grub/grub.cfg

Ora mi vede anche il nuovo kernel 3.5.0 . Tuttavia non mi carica lo spash screen (grub è in bianco e nero), e, cosa ben più grave, l'os predefinito di avvio è diventato windows7 (riconosciuto non perché come 8 ) e non più sabayon.
Come posso fare? Non so dove mettere le mani, però intanto vi posto i miei /etc/default/grub e /boot/grub/grub.cfg perché ho letto su vari forum che in genere sono loro che creano problemi.

/etc/default/grub
Code: Select all
# /etc/default/grub
# If you change this file, run 'grub-mkconfig -o /boot/grub/grub.cfg' afterwards to update
# /boot/grub/grub.cfg.

GRUB_DEFAULT=saved
GRUB_DISTRIBUTOR="Sabayon"
GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=5
GRUB_DISABLE_LINUX_UUID=true

# Add your extra parameters here below
# Dear user, put your boot flags here ;-)
GRUB_CMDLINE_LINUX_DEFAULT=""
# ATTENTION ATTENTION ATTENTION
# DO NOT EDIT THIS MANUALLY NOR SET IT TO EMPTY IF IT'S ALREADY FILLED WITH
# SOMETHING (DONE BY THE INSTALLER). REALLY, DON'T !
GRUB_CMDLINE_LINUX=""
# ATTENTION ATTENTION ATTENTION

# Uncomment to disable graphical terminal (grub-pc only)
# GRUB_TERMINAL=console

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1024x768

# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true

# Uncomment to disable generation of recovery mode menu entrys
# GRUB_DISABLE_LINUX_RECOVERY="false"

# Default wallpaper image path
GRUB_WALLPAPER="/boot/grub/default-splash.png"

# Boot menu option normal color
GRUB_COLOR_NORMAL="white/black"

# Boot menu option "highlight" color
GRUB_COLOR_HIGHLIGHT="magenta/black"

if [ -f "/etc/default/sabayon-grub" ]; then
   # this file is placed by the Sabayon Installer and contains
   # custom GRUB_CMDLINE_LINUX parameters created at install
   # time.
   source /etc/default/sabayon-grub
fi

# DO NOT REMOVE THIS IF YOUR GRUB_CMDLINE_LINUX IS EMPTY (BACKWARD COMPAT)
if [ -z "${GRUB_CMDLINE_LINUX}" ]; then
   if [ ! -e "/proc/cmdline" ]; then
      echo "ATTENTION ATTENTION ATTENTION" >&2
      echo "GRUB_CMDLINE_LINUX is not set inside /etc/default/grub" >&2
      echo "  cannot generate a bootable configuration." >&2
   else
      echo "ATTENTION ATTENTION ATTENTION" >&2
      echo "GRUB_CMDLINE_LINUX is not set inside /etc/default/grub" >&2
      echo "  grub is going to use your /proc/cmdline content" >&2
      GRUB_CMDLINE_LINUX="`cat /proc/cmdline | sed -e 's#BOOT_IMAGE=.* ro ##g'`"
   fi
fi


/boot/grub/grub.cfg
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_msdos
insmod lvm
insmod ext2
set root='lvm/vg_anonimo-lv_root'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint='lvm/vg_anonimo-lv_root'  281db2b1-cad4-4315-accf-2f48ca11ebfd
else
  search --no-floppy --fs-uuid --set=root 281db2b1-cad4-4315-accf-2f48ca11ebfd
fi
    font="/usr/share/grub/unicode.pf2"
fi

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
  set locale_dir=$prefix/locale
  set lang=it_IT
  insmod gettext
fi
terminal_output gfxterm
if sleep --interruptible 0 ; then
  set timeout=5
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/09_os-prober ###
menuentry 'Windows 8 (loader) (su /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-CC003DC0003DB276' {
   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  CC003DC0003DB276
   else
     search --no-floppy --fs-uuid --set=root CC003DC0003DB276
   fi
   drivemap -s (hd0) ${root}
   chainloader +1
}
### END /etc/grub.d/09_os-prober ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Sabayon GNU/Linux' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-281db2b1-cad4-4315-accf-2f48ca11ebfd' {
   load_video
   insmod gzio
   insmod part_msdos
   insmod ext2
   set root='hd1,msdos1'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  9880412a-9577-43c4-94d1-4b775e27cb5c
   else
     search --no-floppy --fs-uuid --set=root 9880412a-9577-43c4-94d1-4b775e27cb5c
   fi
   echo   'Caricamento Linux x86_64-3.5.0-sabayon...'
   linux   /kernel-genkernel-x86_64-3.5.0-sabayon ro  init=/linuxrc splash=silent,theme:sabayon vga=791 console=tty1 quiet dokeymap keymap=it domdadm resume=swap:/dev/mapper/vg_anonimo-lv_swap real_resume=/dev/mapper/vg_anonimo-lv_swap dolvm root=/dev/mapper/vg_anonimo-lv_root docrypt
   echo   'Caricamento ramdisk iniziale...'
   initrd   /initramfs-genkernel-x86_64-3.5.0-sabayon
}
submenu 'Opzioni avanzate per Sabayon GNU/Linux' $menuentry_id_option 'gnulinux-advanced-281db2b1-cad4-4315-accf-2f48ca11ebfd' {
   menuentry 'Sabayon GNU/Linux, con Linux x86_64-3.5.0-sabayon' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-3.5.0-sabayon-advanced-281db2b1-cad4-4315-accf-2f48ca11ebfd' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd1,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  9880412a-9577-43c4-94d1-4b775e27cb5c
      else
        search --no-floppy --fs-uuid --set=root 9880412a-9577-43c4-94d1-4b775e27cb5c
      fi
      echo   'Caricamento Linux x86_64-3.5.0-sabayon...'
      linux   /kernel-genkernel-x86_64-3.5.0-sabayon ro  init=/linuxrc splash=silent,theme:sabayon vga=791 console=tty1 quiet dokeymap keymap=it domdadm resume=swap:/dev/mapper/vg_anonimo-lv_swap real_resume=/dev/mapper/vg_anonimo-lv_swap dolvm root=/dev/mapper/vg_anonimo-lv_root docrypt
      echo   'Caricamento ramdisk iniziale...'
      initrd   /initramfs-genkernel-x86_64-3.5.0-sabayon
   }
   menuentry 'Sabayon GNU/Linux, con Linux x86_64-3.5.0-sabayon (modalità ripristino)' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-3.5.0-sabayon-recovery-281db2b1-cad4-4315-accf-2f48ca11ebfd' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd1,msdos1'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  9880412a-9577-43c4-94d1-4b775e27cb5c
      else
        search --no-floppy --fs-uuid --set=root 9880412a-9577-43c4-94d1-4b775e27cb5c
      fi
      echo   'Caricamento Linux x86_64-3.5.0-sabayon...'
      linux   /kernel-genkernel-x86_64-3.5.0-sabayon ro single init_opts=single  init=/linuxrc splash=verbose,theme:sabayon vga=791 console=tty1 quiet dokeymap keymap=it domdadm resume=swap:/dev/mapper/vg_anonimo-lv_swap real_resume=/dev/mapper/vg_anonimo-lv_swap dolvm root=/dev/mapper/vg_anonimo-lv_root docrypt
      echo   'Caricamento ramdisk iniziale...'
      initrd   /initramfs-genkernel-x86_64-3.5.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/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 ###


Vi ringrazio in anticipo
Ciao! :)
User avatar
anonimo
Simple Hen
 
Posts: 85
Joined: Tue Feb 01, 2011 14:00

Re: Problema Grub2

Postby sabayonino » Fri Oct 12, 2012 20:38

mi sembra che sabayon sia installata su un disco a parte ... o sbaglio ?
User avatar
sabayonino
Sagely Hen
 
Posts: 1563
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Problema Grub2

Postby anonimo » Fri Oct 12, 2012 20:44

Sì, esatto. Sono due dischi diversi: windows sda (e anche grub), e sabayon sdb
User avatar
anonimo
Simple Hen
 
Posts: 85
Joined: Tue Feb 01, 2011 14:00

Re: Problema Grub2

Postby anonimo » Sat Oct 13, 2012 15:39

Ho risolto il problema più grave: quello di impostare come os predefinito al grub sabayon e non windows.
Mi è bastato aggiungere questa stringa
Code: Select all
GRUB_SAVEDEFAULT=true
al /etc/default/grub così come scritto su questo thread: http://forum.sabayon.org/viewtopic.php?t=23153#p129976
Ora mi aiutate a capire però perché non carica lo splash screen?
Grazie :mrgreen:
User avatar
anonimo
Simple Hen
 
Posts: 85
Joined: Tue Feb 01, 2011 14:00

Re: Problema Grub2

Postby sabayonino » Sat Oct 13, 2012 18:11

anonimo wrote:Ho risolto il problema più grave: quello di impostare come os predefinito al grub sabayon e non windows.
Mi è bastato aggiungere questa stringa
Code: Select all
GRUB_SAVEDEFAULT=true
al /etc/default/grub così come scritto su questo thread: http://forum.sabayon.org/viewtopic.php?t=23153#p129976
Ora mi aiutate a capire però perché non carica lo splash screen?
Grazie :mrgreen:


:mrgreen:

output di :

Code: Select all
# cat /etc/default/sabayon-grub
User avatar
sabayonino
Sagely Hen
 
Posts: 1563
Joined: Sun Sep 21, 2008 1:12
Location: Italy


Return to Sabayon Linux Discussioni Generali

Who is online

Users browsing this forum: No registered users and 1 guest

cron