Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GRUB can't boot
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
zhangyubaka
n00b
n00b


Joined: 04 Mar 2015
Posts: 11

PostPosted: Wed Mar 04, 2015 1:53 pm    Post subject: GRUB can't boot Reply with quote

I installed gentoo from a Archlinux's LiveCD and followed this:https://wiki.gentoo.org/wiki/Handbook:X86
When I restart my computer,grub says:could not find the root device in UUID:XXXXXXXX←/dev/sda4 's UUID
Kernel and initramfs were build by genkernel
This is my fstab:https://pastebin.anthonos.org/view/6958e8c8
And this is grub.cfg:https://pastebin.anthonos.org/view/6bd13f1a
/dev/sda4 is the root,and /dev/sda3 is boot
lsblk:
Code:
NAME            MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda               8:0    0 298.1G  0 disk
├─sda1            8:1    0  48.8G  0 part
├─sda2            8:2    0     1K  0 part
├─sda3            8:3    0   128M  0 part /boot
├─sda4            8:4    0    20G  0 part
└─sda5            8:5    0   120G  0 part
sdb               8:16   1  14.4G  0 disk
├─sdb1            8:17   1   595M  0 part
└─sdb2            8:18   1    31M  0 part
sr0              11:0    1  1024M  0 rom 
loop0             7:0    0 252.5M  1 loop
loop1             7:1    0    32G  1 loop
└─arch_airootfs 254:0    0    32G  0 dm   
loop2             7:2    0   256M  0 loop
└─arch_airootfs 254:0    0    32G  0 dm 

How can I solve this problem?
Back to top
View user's profile Send private message
tryn
Guru
Guru


Joined: 21 Dec 2002
Posts: 319
Location: 39.885° N. -88.913° W.

PostPosted: Wed Mar 04, 2015 3:03 pm    Post subject: Reply with quote

zhangyubaka

The file listed as grub.cfg is not that file. It is the /etc/default/grub file.

I have not used the genkernel option so do not know just how it builds the grub.cfg file. I do it by hand and first you need.
To have boot mounted and then run the command as root
Code:
 grub2-mkconfig -o /boot/grub/grub.cfg


Any way the file that you have listed as the grub.cfg isn't the file.
Hope that this will give you some kind of help.
Back to top
View user's profile Send private message
zhangyubaka
n00b
n00b


Joined: 04 Mar 2015
Posts: 11

PostPosted: Wed Mar 04, 2015 4:37 pm    Post subject: Reply with quote

tryn wrote:
zhangyubaka

The file listed as grub.cfg is not that file. It is the /etc/default/grub file.

I have not used the genkernel option so do not know just how it builds the grub.cfg file. I do it by hand and first you need.
To have boot mounted and then run the command as root
Code:
 grub2-mkconfig -o /boot/grub/grub.cfg


Any way the file that you have listed as the grub.cfg isn't the file.
Hope that this will give you some kind of help.

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,msdos4'
if [ x$feature_platform_search_hint = xy ]; then
  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos4' --hint-bios=hd0,msdos4 --hint-efi=hd0,msdos4 --hint-baremetal=ahci0,msdos4  0b716477-d162-4b42-b52a-ee26a9efc73d
else
  search --no-floppy --fs-uuid --set=root 0b716477-d162-4b42-b52a-ee26a9efc73d
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=en_US
  insmod gettext
fi
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=5
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=5
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-0b716477-d162-4b42-b52a-ee26a9efc73d' {
   load_video
   insmod gzio
   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-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  ab8313f8-2c6d-4f60-88a0-f3d8e1472437
   else
     search --no-floppy --fs-uuid --set=root ab8313f8-2c6d-4f60-88a0-f3d8e1472437
   fi
   echo   'Loading Linux x86-3.18.7-gentoo ...'
   linux   /kernel-genkernel-x86-3.18.7-gentoo root=UUID=0b716477-d162-4b42-b52a-ee26a9efc73d ro 
   echo   'Loading initial ramdisk ...'
   initrd   /initramfs-genkernel-x86-3.18.7-gentoo
}
submenu 'Advanced options for Gentoo GNU/Linux' $menuentry_id_option 'gnulinux-advanced-0b716477-d162-4b42-b52a-ee26a9efc73d' {
   menuentry 'Gentoo GNU/Linux, with Linux x86-3.18.7-gentoo' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86-3.18.7-gentoo-advanced-0b716477-d162-4b42-b52a-ee26a9efc73d' {
      load_video
      insmod gzio
      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-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  ab8313f8-2c6d-4f60-88a0-f3d8e1472437
      else
        search --no-floppy --fs-uuid --set=root ab8313f8-2c6d-4f60-88a0-f3d8e1472437
      fi
      echo   'Loading Linux x86-3.18.7-gentoo ...'
      linux   /kernel-genkernel-x86-3.18.7-gentoo root=UUID=0b716477-d162-4b42-b52a-ee26a9efc73d ro 
      echo   'Loading initial ramdisk ...'
      initrd   /initramfs-genkernel-x86-3.18.7-gentoo
   }
   menuentry 'Gentoo GNU/Linux, with Linux x86-3.18.7-gentoo (recovery mode)' --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-x86-3.18.7-gentoo-recovery-0b716477-d162-4b42-b52a-ee26a9efc73d' {
      load_video
      insmod gzio
      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-ieee1275='ieee1275//disk@0,msdos3' --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3  ab8313f8-2c6d-4f60-88a0-f3d8e1472437
      else
        search --no-floppy --fs-uuid --set=root ab8313f8-2c6d-4f60-88a0-f3d8e1472437
      fi
      echo   'Loading Linux x86-3.18.7-gentoo ...'
      linux   /kernel-genkernel-x86-3.18.7-gentoo root=UUID=0b716477-d162-4b42-b52a-ee26a9efc73d ro single
      echo   'Loading initial ramdisk ...'
      initrd   /initramfs-genkernel-x86-3.18.7-gentoo
   }
}

### 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 NT/2000/XP (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-2A1D-0905' {
   insmod part_msdos
   insmod fat
   set root='hd0,msdos1'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1  2A1D-0905
   else
     search --no-floppy --fs-uuid --set=root 2A1D-0905
   fi
   parttool ${root} hidden-
   drivemap -s (hd0) ${root}
   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 ###
Back to top
View user's profile Send private message
tryn
Guru
Guru


Joined: 21 Dec 2002
Posts: 319
Location: 39.885° N. -88.913° W.

PostPosted: Thu Mar 05, 2015 2:43 am    Post subject: Reply with quote

So are you now able to boot into Gentoo?
Back to top
View user's profile Send private message
zhangyubaka
n00b
n00b


Joined: 04 Mar 2015
Posts: 11

PostPosted: Thu Mar 05, 2015 8:11 am    Post subject: Reply with quote

tryn wrote:
So are you now able to boot into Gentoo?

Yeah...I found problem,ext4 was sat as module in Genkernel.
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