Trouble with GRUB

If you are new to Linux or new to Sabayon Linux and just not sure where to post, here ya go. Post without fear of being told to RTFM :-)

Moderator: Moderators

Trouble with GRUB

Postby Agret » Sun Feb 17, 2013 8:31

I've been unable to boot my PC into linux after reinstalling Windows. The other day Steam came out of beta (had been previously running it on sabayon) so I decided i'll just "quickly reboot and reinstall grub". 9pm -1am much cursing and wiki reading and have gotten nowhere.

My root partition is /dev/sdd7 and formatted in btrfs, my boot partition is /dev/sdd5 and formatted in ext4.

I followed the Sabayon wiki on reinstalling GRUB and it put it as the bootloader and upon rebooting I got "Loading Grub." and then nothing. I then deleted grub.cfg and followed the second part of the tutorial about rebuilding the config from a chroot to my system (I used equo to update grub while I was at it in case a newer version fixed the bug) but no it just keeps getting stuck there. If I leave it for about 5 minutes it says "Welcome to Grub." and then nothing else but after leaving it for another 20 minutes or so it brings up a "grub error: no such partition" and gives me the "grub rescue>" prompt. I have no idea why it can't locate my boot partition.

This whole thing is driving me nuts and I'd love if someone could help .

Image
[IMG]
Agret
Baby Hen
 
Posts: 4
Joined: Thu Nov 15, 2012 12:40

Re: Trouble with GRUB

Postby sabayonino » Sun Feb 17, 2013 10:02

please copy and paste the output file. don't upload any image (if don't need)

your grub2-mkconfig command is wront (where do you find it ? )

generating grub.cfg (not grub.c)
Code: Select all
# grub2-mkconfig -o /boot/grub2/grub.cfg
User avatar
sabayonino
Sagely Hen
 
Posts: 1573
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Trouble with GRUB

Postby Agret » Sun Feb 17, 2013 11:57

lol if you look at screenshot fully I never generated grub.c it was called grub.cfg, I just hit tab there.

Here is grub.cfg:
Code: Select all
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub2-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 btrfs
set root='hd3,msdos7'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos7 --hint-efi=hd3,msdos7 --hint-baremetal=ahci3,msdos7  78fcf02b-484a-4815-9d93-4d81a7dc8855
else
  search --no-floppy --fs-uuid --set=root 78fcf02b-484a-4815-9d93-4d81a7dc8855
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=en_US
  insmod gettext
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='hd3,msdos5'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos5 --hint-efi=hd3,msdos5 --hint-baremetal=ahci3,msdos5  bf9b6d52-96ed-41a8-b2da-c2a2a0c2b549
else
  search --no-floppy --fs-uuid --set=root bf9b6d52-96ed-41a8-b2da-c2a2a0c2b549
fi
insmod png
background_image -m stretch /grub/default-splash.png
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-78fcf02b-484a-4815-9d93-4d81a7dc8855' {
   load_video
   insmod gzio
   insmod part_msdos
   insmod ext2
   set root='hd3,msdos5'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos5 --hint-efi=hd3,msdos5 --hint-baremetal=ahci3,msdos5  bf9b6d52-96ed-41a8-b2da-c2a2a0c2b549
   else
     search --no-floppy --fs-uuid --set=root bf9b6d52-96ed-41a8-b2da-c2a2a0c2b549
   fi
   echo   'Loading Linux x86_64-3.5.0-sabayon ...'
   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=us domdadm resume=swap:/dev/sde6 real_resume=/dev/sde6 root=UUID=78fcf02b-484a-4815-9d93-4d81a7dc8855 docrypt
   echo   'Loading initial ramdisk ...'
   initrd   /initramfs-genkernel-x86_64-3.5.0-sabayon
}
submenu 'Advanced options for Sabayon GNU/Linux' $menuentry_id_option 'gnulinux-advanced-78fcf02b-484a-4815-9d93-4d81a7dc8855' {
   menuentry 'Sabayon GNU/Linux, with 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-78fcf02b-484a-4815-9d93-4d81a7dc8855' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd3,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos5 --hint-efi=hd3,msdos5 --hint-baremetal=ahci3,msdos5  bf9b6d52-96ed-41a8-b2da-c2a2a0c2b549
      else
        search --no-floppy --fs-uuid --set=root bf9b6d52-96ed-41a8-b2da-c2a2a0c2b549
      fi
      echo   'Loading Linux x86_64-3.5.0-sabayon ...'
      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=us domdadm resume=swap:/dev/sde6 real_resume=/dev/sde6 root=UUID=78fcf02b-484a-4815-9d93-4d81a7dc8855 docrypt
      echo   'Loading initial ramdisk ...'
      initrd   /initramfs-genkernel-x86_64-3.5.0-sabayon
   }
   menuentry 'Sabayon GNU/Linux, with Linux x86_64-3.5.0-sabayon (recovery mode)' --class sabayon --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86_64-3.5.0-sabayon-recovery-78fcf02b-484a-4815-9d93-4d81a7dc8855' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd3,msdos5'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos5 --hint-efi=hd3,msdos5 --hint-baremetal=ahci3,msdos5  bf9b6d52-96ed-41a8-b2da-c2a2a0c2b549
      else
        search --no-floppy --fs-uuid --set=root bf9b6d52-96ed-41a8-b2da-c2a2a0c2b549
      fi
      echo   'Loading 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 video=vesafb:ywrap,mtrr:3 vga=791 gfxpayload=1024x768x16 console=tty1 quiet dokeymap keymap=us domdadm resume=swap:/dev/sde6 real_resume=/dev/sde6 root=UUID=78fcf02b-484a-4815-9d93-4d81a7dc8855 docrypt
      echo   'Loading initial ramdisk ...'
      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/30_os-prober ###
menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-9038477A38475DFA' {
   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  9038477A38475DFA
   else
     search --no-floppy --fs-uuid --set=root 9038477A38475DFA
   fi
   chainloader +1
}
menuentry 'Mac OS X (32-bit) (on /dev/sdb2)' --class osx --class darwin --class os $menuentry_id_option 'osprober-xnu-32-8e613d4da952402e'  {
   insmod part_gpt
   insmod hfsplus
   set root='hd1,gpt2'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  8e613d4da952402e
   else
     search --no-floppy --fs-uuid --set=root 8e613d4da952402e
   fi
        load_video
        set do_resume=0
        if [ /var/vm/sleepimage -nt10 / ]; then
           if xnu_resume /var/vm/sleepimage; then
             set do_resume=1
           fi
        fi
        if [ $do_resume = 0 ]; then
           xnu_uuid 8e613d4da952402e uuid
           if [ -f /Extra/DSDT.aml ]; then
              acpi -e /Extra/DSDT.aml
           fi
           if [ /kernelcache -nt /System/Library/Extensions ]; then
              xnu_kernel /kernelcache boot-uuid=${uuid} rd=*uuid
           else
              xnu_kernel /mach_kernel boot-uuid=${uuid} rd=*uuid
              if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
                xnu_mkext /System/Library/Extensions.mkext
              else
                xnu_kextdir /System/Library/Extensions
              fi
           fi
           if [ -f /Extra/Extensions.mkext ]; then
              xnu_mkext /Extra/Extensions.mkext
           fi
           if [ -d /Extra/Extensions ]; then
              xnu_kextdir /Extra/Extensions
           fi
           if [ -f /Extra/devprop.bin ]; then
              xnu_devprop_load /Extra/devprop.bin
           fi
           if [ -f /Extra/splash.jpg ]; then
              insmod jpeg
              xnu_splash /Extra/splash.jpg
           fi
           if [ -f /Extra/splash.png ]; then
              insmod png
              xnu_splash /Extra/splash.png
           fi
           if [ -f /Extra/splash.tga ]; then
              insmod tga
              xnu_splash /Extra/splash.tga
           fi
        fi
}
menuentry 'Mac OS X (64-bit) (on /dev/sdb2)' --class osx --class darwin --class os $menuentry_id_option 'osprober-xnu-64-8e613d4da952402e'  {
   insmod part_gpt
   insmod hfsplus
   set root='hd1,gpt2'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd1,gpt2 --hint-efi=hd1,gpt2 --hint-baremetal=ahci1,gpt2  8e613d4da952402e
   else
     search --no-floppy --fs-uuid --set=root 8e613d4da952402e
   fi
        load_video
        set do_resume=0
        if [ /var/vm/sleepimage -nt10 / ]; then
           if xnu_resume /var/vm/sleepimage; then
             set do_resume=1
           fi
        fi
        if [ $do_resume = 0 ]; then
           xnu_uuid 8e613d4da952402e uuid
           if [ -f /Extra/DSDT.aml ]; then
              acpi -e /Extra/DSDT.aml
           fi
           if [ /kernelcache -nt /System/Library/Extensions ]; then
              xnu_kernel64 /kernelcache boot-uuid=${uuid} rd=*uuid
           else
              xnu_kernel64 /mach_kernel boot-uuid=${uuid} rd=*uuid
              if [ /System/Library/Extensions.mkext -nt /System/Library/Extensions ]; then
                xnu_mkext /System/Library/Extensions.mkext
              else
                xnu_kextdir /System/Library/Extensions
              fi
           fi
           if [ -f /Extra/Extensions.mkext ]; then
              xnu_mkext /Extra/Extensions.mkext
           fi
           if [ -d /Extra/Extensions ]; then
              xnu_kextdir /Extra/Extensions
           fi
           if [ -f /Extra/devprop.bin ]; then
              xnu_devprop_load /Extra/devprop.bin
           fi
           if [ -f /Extra/splash.jpg ]; then
              insmod jpeg
              xnu_splash /Extra/splash.jpg
           fi
           if [ -f /Extra/splash.png ]; then
              insmod png
              xnu_splash /Extra/splash.png
           fi
           if [ -f /Extra/splash.tga ]; then
              insmod tga
              xnu_splash /Extra/splash.tga
           fi
        fi
}
menuentry 'Windows 7 (loader) (on /dev/sdd1)' --class windows --class os $menuentry_id_option 'osprober-chain-3628183F28180113' {
   insmod part_msdos
   insmod ntfs
   set root='hd3,msdos1'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-bios=hd3,msdos1 --hint-efi=hd3,msdos1 --hint-baremetal=ahci3,msdos1  3628183F28180113
   else
     search --no-floppy --fs-uuid --set=root 3628183F28180113
   fi
   chainloader +1
}
### 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 ###


Edited by Moderator to use Code BBCode.
Agret
Baby Hen
 
Posts: 4
Joined: Thu Nov 15, 2012 12:40

Re: Trouble with GRUB

Postby sabayonino » Sun Feb 17, 2013 12:18

Check BIOS boot priority

Install grub2 on /dev/sdd and make sure that BIOS first boot is /dev/sdd

In my case I Have :
/dev/sda --> data storage
/dev/sdb --> data storage
/dev/sdc ---> / (2 partitions /boot(ext4) /(btrfs) )
/dev/sdd ---> external data storage

I've installed grub on /dev/sdc
and set BIOS boot priority : fisrt boot device : /dev/sdc

good luck
User avatar
sabayonino
Sagely Hen
 
Posts: 1573
Joined: Sun Sep 21, 2008 1:12
Location: Italy

Re: Trouble with GRUB

Postby Agret » Sun Feb 17, 2013 13:08

Well grub is installed on /dev/sdd but it won't boot off it. I might have to try installing grub on a different drive hmm
Agret
Baby Hen
 
Posts: 4
Joined: Thu Nov 15, 2012 12:40


Return to Beginners|Newbies Area

Who is online

Users browsing this forum: LAPB and 1 guest