Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Grub2 boots to prompt [Solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
mrdavedog
n00b
n00b


Joined: 11 Feb 2004
Posts: 34

PostPosted: Mon Nov 04, 2013 7:53 am    Post subject: Grub2 boots to prompt [Solved] Reply with quote

Hi all,

Fresh install of Gentoo on this laptop, I started with GRUB .097 to get things up and running since the compile time is shorter. That works fine. I previously had Arch Linux on this particular laptop booting GRUB 2.00 and it booted just fine as well. I went to follow Upgrade instructions but with the GRUB's config moving from /boot/grub2/ to /boot/grub/ in section 2.3 you end up overwriting the 0.97 config making chaining impossible (if you follow those specific instructions). So I decided to just throw caution to the wind and just upgrade. It's two steps. Of course something went wrong.

I generated a config with:
Code:
grub2-mkconfig -o /boot/grub/grub.cfg


Installed GRUB2
Code:
grub2-install /dev/sda


then I unmerged sys-boot/grub:0

rebooted and it the machine drops right into the GRUB console. I'm assuming this means that it can't find the config file, but the config file resides in /boot/grub/ (currently renamed grub.conf.newgrub)

Code:

phatgentoobox:~ $ ls -al /boot/grub
total 3129
drwxr-xr-x 6 root root    1024 Nov  3 22:47 .
drwxr-xr-x 5 root root    1024 Nov  3 19:06 ..
-rw-r--r-- 1 root root   12377 Nov  3 18:45 ascii.h
-rw-r--r-- 1 root root    4987 Nov  3 18:45 ascii.pf2
-rw-r--r-- 1 root root     197 Nov  3 22:43 default
-rw-r--r-- 1 root root      30 Nov  3 01:59 device.map
-rw-r--r-- 1 root root   10032 Nov  3 22:43 e2fs_stage1_5
-rw-r--r-- 1 root root   51613 Nov  3 18:45 euro.pf2
-rw-r--r-- 1 root root    9212 Nov  3 22:43 fat_stage1_5
-rw-r--r-- 1 root root    8524 Nov  3 22:43 ffs_stage1_5
drwxr-xr-x 2 root root    1024 Nov  3 18:12 fonts
-rw-r--r-- 1 root root    8708 Nov  3 18:45 grub-mkconfig_lib
-rw------- 1 root root     218 Nov  3 21:10 grub.conf
-rw------- 1 root root    4743 Nov  3 22:32 grub.conf.newgrub
-rw-r--r-- 1 root root    1024 Nov  3 18:12 grubenv
drwxr-xr-x 2 root root    9216 Nov  3 22:37 i386-pc
-rw-r--r-- 1 root root    8572 Nov  3 22:43 iso9660_stage1_5
-rw-r--r-- 1 root root   10220 Nov  3 22:43 jfs_stage1_5
drwxr-xr-x 2 root root    1024 Nov  3 22:37 locale
lrwxrwxrwx 1 root root       9 Nov  3 01:59 menu.lst -> grub.conf
-rw-r--r-- 1 root root    8700 Nov  3 22:43 minix_stage1_5
-rw-r--r-- 1 root root   11260 Nov  3 22:43 reiserfs_stage1_5
-rw-r--r-- 1 root root   33856 Nov  3 19:37 splash.xpm.gz
-rw-r--r-- 1 root root     512 Nov  3 22:43 stage1
-rw-r--r-- 1 root root  118388 Nov  3 22:43 stage2
-rw-r--r-- 1 root root  118388 Nov  3 18:27 stage2.old
-rw-r--r-- 1 root root  118388 Nov  3 19:37 stage2_eltorito
drwxr-xr-x 3 root root    1024 Nov  3 18:12 themes
-rw-r--r-- 1 root root    8848 Nov  3 22:43 ufs2_stage1_5
-rw-r--r-- 1 root root 2560080 Nov  3 18:45 unicode.pf2
-rw-r--r-- 1 root root    8176 Nov  3 22:43 vstafs_stage1_5
-rw-r--r-- 1 root root   49237 Nov  3 18:45 widthspec.h
-rw-r--r-- 1 root root   10868 Nov  3 22:43 xfs_stage1_5


grub.conf
Code:

#
# 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_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,msdos3'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  67a31fec-ff2f-4a65-91a5-e9abc8e5df80
else
  search --no-floppy --fs-uuid --set=root 67a31fec-ff2f-4a65-91a5-e9abc8e5df80
fi
    font="/usr/share/grub/unicode.pf2"
fi

if loadfont $font ; then
  set gfxmode=auto
  load_video
  insmod gfxterm
  set locale_dir=$prefix/locale
  set lang=
  insmod gettext
fi
terminal_output gfxterm
if sleep --interruptible 0 ; then
  set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Gentoo GNU/Linux' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-67a31fec-ff2f-4a65-91a5-e9abc8e5df80' {
   load_video
   insmod gzio
   insmod part_msdos
   insmod ext2
   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'  352f9dca-bc37-4282-afb7-c999ee42addf
   else
     search --no-floppy --fs-uuid --set=root 352f9dca-bc37-4282-afb7-c999ee42addf
   fi
   echo   'Loading Linux 3.10.17-gentoo ...'
   linux   /kernel-3.10.17-gentoo root=/dev/sda3 ro 
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-67a31fec-ff2f-4a65-91a5-e9abc8e5df80' {
   menuentry 'Gentoo GNU/Linux, with Linux 3.10.17-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.17-gentoo-advanced-67a31fec-ff2f-4a65-91a5-e9abc8e5df80' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      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'  352f9dca-bc37-4282-afb7-c999ee42addf
      else
        search --no-floppy --fs-uuid --set=root 352f9dca-bc37-4282-afb7-c999ee42addf
      fi
      echo   'Loading Linux 3.10.17-gentoo ...'
      linux   /kernel-3.10.17-gentoo root=/dev/sda3 ro 
   }
   menuentry 'Gentoo GNU/Linux, with Linux 3.10.17-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-3.10.17-gentoo-recovery-67a31fec-ff2f-4a65-91a5-e9abc8e5df80' {
      load_video
      insmod gzio
      insmod part_msdos
      insmod ext2
      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'  352f9dca-bc37-4282-afb7-c999ee42addf
      else
        search --no-floppy --fs-uuid --set=root 352f9dca-bc37-4282-afb7-c999ee42addf
      fi
      echo   'Loading Linux 3.10.17-gentoo ...'
      linux   /kernel-3.10.17-gentoo root=/dev/sda3 ro single
   }
}

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


my disk layout with UUIDs (sda1 = /boot sda3 = /)

Code:

phatgentoobox:~ $ sudo blkid
/dev/sda1: UUID="352f9dca-bc37-4282-afb7-c999ee42addf" TYPE="ext4"
/dev/sda2: UUID="2cde4616-f38c-4dc6-a789-853313ae011c" TYPE="swap"
/dev/sda3: UUID="67a31fec-ff2f-4a65-91a5-e9abc8e5df80" TYPE="ext4"


The only thing fishy I saw was that in places in the grub.conf, the boot partition is referenced instead of the / partion. I manually fixed that and retried with no luck.

I've been banging my head on this for the past few hours with no luck. Everything I've read points to the config being in the wrong place, but I'm pretty sure it's not. It must be something silly I'm overlooking. Any ideas?

Thanks!


Last edited by mrdavedog on Mon Nov 04, 2013 10:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
TomWij
Retired Dev
Retired Dev


Joined: 04 Jul 2012
Posts: 1553

PostPosted: Mon Nov 04, 2013 1:19 pm    Post subject: Reply with quote

Try to autocomplete your partitions in the GRUB shell; if that doesn't work, you have forgotten to build in support for reading the partitions and then you need to check the USE flags on the package.
Back to top
View user's profile Send private message
mv
Watchman
Watchman


Joined: 20 Apr 2005
Posts: 6281

PostPosted: Mon Nov 04, 2013 1:23 pm    Post subject: Reply with quote

The file should be called grub.cfg, not grub.conf (the latter is the name of the config-file of legacy grub).
Back to top
View user's profile Send private message
mrdavedog
n00b
n00b


Joined: 11 Feb 2004
Posts: 34

PostPosted: Mon Nov 04, 2013 10:20 pm    Post subject: Reply with quote

mv wrote:
The file should be called grub.cfg, not grub.conf (the latter is the name of the config-file of legacy grub).


That was it. I knew it was something silly I was overlooking.

Thank you both for the replies.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum