Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Problems booting Gentoo
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
micaldas
n00b
n00b


Joined: 12 Mar 2018
Posts: 37

PostPosted: Sat Apr 28, 2018 10:51 am    Post subject: Problems booting Gentoo Reply with quote

Hi,
I installed Gentoo amd-64, in a external hard drive, on a computer running arch.
At first Grub wouldn't recognize gentoo, until I found out I didin't have os-prober installed. After installation, and running "sudo grub-mkconfig -o /boot/grub/grub.cfg", grub finally recognized gentoo.
But when I tried to boot gentoo, by choosing the gentoo entry in the grub menu, it boots arch instead.
I looked at grub.cfg and noticed a couple of things:
1 - the "set root" defined goes to the boot partition of the arch disk,
2 - the UUID's on the configuration, correspond to the boot and root partition of the arch disk.
I tried changing these values manually on the grub.cfg file (although I know I shouldn't), to the ones on the gentoo disk, but it didn't change anything.

Any help or suggestions would be greatly appreciated.

Below goes the contents of grub.cfg

Code:
#
# 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 ###
insmod part_gpt
insmod part_msdos
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  0c169834-97a0-4dc0-9b71-28987366e636
else
  search --no-floppy --fs-uuid --set=root 0c169834-97a0-4dc0-9b71-28987366e636
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_input console
terminal_output gfxterm
if [ x$feature_timeout_style = xy ] ; then
  set timeout_style=menu
  set timeout=15
# Fallback normal timeout code in case the timeout_style feature is
# unavailable.
else
  set timeout=15
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/06_grub-customizer_menu_color_helper ###
### END /etc/grub.d/06_grub-customizer_menu_color_helper ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-0c169834-97a0-4dc0-9b71-28987366e636' {
   load_video
   set gfxpayload=keep
   insmod gzio
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos2'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos2' --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  f51cc451-1576-4aba-852a-e23af142ebec
   else
     search --no-floppy --fs-uuid --set=root f51cc451-1576-4aba-852a-e23af142ebec
   fi
   echo   'Loading Linux linux ...'
   linux   /vmlinuz-linux root=UUID=0c169834-97a0-4dc0-9b71-28987366e636 rw  quiet
   echo   'Loading initial ramdisk ...'
   initrd   /initramfs-linux.img
}
submenu 'Advanced options for Arch Linux' $menuentry_id_option 'gnulinux-advanced-0c169834-97a0-4dc0-9b71-28987366e636' {
   menuentry 'Arch Linux, with Linux linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-advanced-0c169834-97a0-4dc0-9b71-28987366e636' {
      load_video
      set gfxpayload=keep
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos2'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos2' --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  f51cc451-1576-4aba-852a-e23af142ebec
      else
        search --no-floppy --fs-uuid --set=root f51cc451-1576-4aba-852a-e23af142ebec
      fi
      echo   'Loading Linux linux ...'
      linux   /vmlinuz-linux root=UUID=0c169834-97a0-4dc0-9b71-28987366e636 rw  quiet
      echo   'Loading initial ramdisk ...'
      initrd   /initramfs-linux.img
   }
   menuentry 'Arch Linux, with Linux linux (fallback initramfs)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-0c169834-97a0-4dc0-9b71-28987366e636' {
      load_video
      set gfxpayload=keep
      insmod gzio
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos2'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos2' --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  f51cc451-1576-4aba-852a-e23af142ebec
      else
        search --no-floppy --fs-uuid --set=root f51cc451-1576-4aba-852a-e23af142ebec
      fi
      echo   'Loading Linux linux ...'
      linux   /vmlinuz-linux root=UUID=0c169834-97a0-4dc0-9b71-28987366e636 rw  quiet
      echo   'Loading initial ramdisk ...'
      initrd   /initramfs-linux-fallback.img
   }
}

### 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_proxy ###
menuentry "Gentoo/Linux (on /dev/sdc4)" --class gentoo --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-eacee572-c583-4995-ac17-7dcf50e1d96f' {
   insmod part_msdos
   insmod ext2
   set root='hd0,msdos2'
   if [ x$feature_platform_search_hint = xy ]; then
     search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos2' --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  f51cc451-1576-4aba-852a-e23af142ebec
   else
     search --no-floppy --fs-uuid --set=root f51cc451-1576-4aba-852a-e23af142ebec
   fi
   linux /vmlinuz-linux root=UUID=0c169834-97a0-4dc0-9b71-28987366e636 rw quiet
   initrd /initramfs-linux.img
}




### END /etc/grub.d/30_os-prober_proxy ###

### BEGIN /etc/grub.d/41_os-prober_proxy ###
submenu "Advanced options for Gentoo/Linux (on /dev/sdc4)"{
menuentry "Arch Linux (on /dev/sdc4)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--eacee572-c583-4995-ac17-7dcf50e1d96f' {
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos2'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos2' --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  f51cc451-1576-4aba-852a-e23af142ebec
      else
        search --no-floppy --fs-uuid --set=root f51cc451-1576-4aba-852a-e23af142ebec
      fi
      linux /vmlinuz-linux root=UUID=0c169834-97a0-4dc0-9b71-28987366e636 rw quiet
      initrd /initramfs-linux.img
}
menuentry "Arch Linux, with Linux linux (on /dev/sdc4)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--eacee572-c583-4995-ac17-7dcf50e1d96f' {
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos2'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos2' --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  f51cc451-1576-4aba-852a-e23af142ebec
      else
        search --no-floppy --fs-uuid --set=root f51cc451-1576-4aba-852a-e23af142ebec
      fi
      linux /vmlinuz-linux root=UUID=0c169834-97a0-4dc0-9b71-28987366e636 rw quiet
      initrd /initramfs-linux.img
}
menuentry "Arch Linux, with Linux linux (fallback initramfs) (on /dev/sdc4)" --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-linux--eacee572-c583-4995-ac17-7dcf50e1d96f' {
      insmod part_msdos
      insmod ext2
      set root='hd0,msdos2'
      if [ x$feature_platform_search_hint = xy ]; then
        search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos2' --hint-bios=hd0,msdos2 --hint-efi=hd0,msdos2 --hint-baremetal=ahci0,msdos2  f51cc451-1576-4aba-852a-e23af142ebec
      else
        search --no-floppy --fs-uuid --set=root f51cc451-1576-4aba-852a-e23af142ebec
      fi
      linux /vmlinuz-linux root=UUID=0c169834-97a0-4dc0-9b71-28987366e636 rw quiet
      initrd /initramfs-linux-fallback.img
}
}
### END /etc/grub.d/41_os-prober_proxy ###

### BEGIN /etc/grub.d/42_custom_proxy ###

# 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/42_custom_proxy ###

### BEGIN /etc/grub.d/43_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/43_custom ###
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Sat Apr 28, 2018 1:13 pm    Post subject: Reply with quote

micaldas

Can you clarify a few details please?

You did a complete Gentoo install on an external drive, so it has its own /boot and grub and grub.cfg files.
You boot Gentoo by telling your BIOS to boot from the external drive and the internal HDD is not involved at all.

Your gentoo kernel command line will need the rootwait parameter because the kernel mounts root before it starts the USB subsystem.
Thus mounting a root filesystem will fail by design.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
micaldas
n00b
n00b


Joined: 12 Mar 2018
Posts: 37

PostPosted: Sat Apr 28, 2018 1:39 pm    Post subject: Reply with quote

I installed gentoo, but didn't install grub, as I want to use the grub I previously installed in the arch disk.

Can you explain how should I add a rootwait parameter? Should I edit /etc/default/grub?

Thank you for the help.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 43213
Location: 56N 3W

PostPosted: Sat Apr 28, 2018 2:08 pm    Post subject: Reply with quote

micaldas,

I don't use grub2 yet and when I do, I won't use the autoconfig because I like to understand how my system boots.
I would write grub.cfg by hand including the kernel command line. Then I don't have any problem editing it.

I can only refer you to the Wiki.
rootwait is harmless where its not needed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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