Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Unable to automatically boot via grub
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
tokiwinter
n00b
n00b


Joined: 04 May 2016
Posts: 2

PostPosted: Wed May 04, 2016 1:04 am    Post subject: Unable to automatically boot via grub Reply with quote

Hi all,

I'm new to Gentoo and GRUB2, but generally a very experienced Linux administrator - just a bit stumped with an issue I'm having. I've built two Gentoo machines, one with OpenRC and standard partitions (kurns), the other with LVM and systemd (snrub).

I completed the installation, and ran grub2-install /dev/sda and grub2-mkconfig -o /boot/grub/grub.cfg on both. I also updated /etc/default/grub on snrub with the following:

Code:

GRUB_CMDLINE_LINUX="dolvm init=/usr/lib/systemd/systemd"


before running the grub2-mkconfig. If I check /boot/grub/grub.cfg on snrub it all appears fine. If I reboot them ... kurns boots fine. Snrub just sits at the grub prompt. If I manually enter

Code:

set root=(hd0,1)
linux /path/to/vmlinuz root=/dev/vg_sys/lv_root dolvm init=/usr/lib/systemd/systemd
initrd /path/to/initramfs
boot


the box comes up fine. Or, if I type

Code:

configfile (hd0,1)/grub/grub.conf


I can boot from the menu. I've created the menu.lst symlink. Any ideas why it's seemingly not reading grub.conf automatically? Of course, happy to provide whatever configs/command output you guys need.

Thanks in advance for the help!

Cheers,
Toki
Back to top
View user's profile Send private message
Logicien
Veteran
Veteran


Joined: 16 Sep 2005
Posts: 1555
Location: Montréal

PostPosted: Wed May 04, 2016 2:00 am    Post subject: Reply with quote

On Gentoo if I am right, using Grub2 mean that grub2-install and grub2-mkconfig are working in the /boot/grub2 directory and not /boot/grub as with Grub1. So, if you do
Code:
grub2-mkconfig -o /boot/grub2/grub.cfg

than the Bios Grub2 boot loader in the Mbr should see it's configuration file at the right place /boot/grub2/grub.cfg.

I think things are tricky like this. The configuration file path may be /boot/grub2/grub2.cfg instead. I am not sure exactly. You problem may be just to give the right path and the right configuration file name to grub2-mkconfig. Check what you have as sub-directories in the /boot directory after you do grub2-install.

And other tricky thing you have to deal with is when you have a boot partition. It must be mounted before you do grub2-install and grub2-mkconfig and you must configure Grub2 to look in this partition for everything and not in the boot directory of the root partition.

It is the reason why I don't like a boot partition. You need to be more cautious for things to work with few benifits in Bios mode.
_________________
Paul
Back to top
View user's profile Send private message
tokiwinter
n00b
n00b


Joined: 04 May 2016
Posts: 2

PostPosted: Wed May 04, 2016 6:15 am    Post subject: Reply with quote

Logicien wrote:
than the Bios Grub2 boot loader in the Mbr should see it's configuration file at the right place /boot/grub2/grub.cfg.


I don't think that's it - on a working system my grub.cfg is in /boot/grub:

Code:

kurns ~ # ls -l /boot
total 39076
drwxr-xr-x 6 root root     4096 May  4 20:43 grub
-rw-r--r-- 1 root root 32052336 May  4 20:41 initramfs-genkernel-x86_64-4.4.6-gentoo
-rw-r--r-- 1 root root  4938528 May  4 20:15 kernel-genkernel-x86_64-4.4.6-gentoo
drwx------ 2 root root    16384 May  4 02:22 lost+found
-rw-r--r-- 1 root root  2995312 May  4 20:15 System.map-genkernel-x86_64-4.4.6-gentoo
kurns ~ # ls -l /boot/grub/
total 36
drwxr-xr-x 2 root root  4096 May  4 04:11 fonts
-rw------- 1 root root  5405 May  4 20:43 grub.cfg
-rw-r--r-- 1 root root  1024 May  4 04:11 grubenv
drwxr-xr-x 2 root root 12288 May  4 20:42 i386-pc
drwxr-xr-x 2 root root  4096 May  4 20:42 locale
drwxr-xr-x 3 root root  4096 May  4 04:11 themes
Back to top
View user's profile Send private message
Syl20
l33t
l33t


Joined: 04 Aug 2005
Posts: 619
Location: France

PostPosted: Tue May 17, 2016 12:45 pm    Post subject: Re: Unable to automatically boot via grub Reply with quote

tokiwinter wrote:
and ran grub2-install /dev/sda and grub2-mkconfig -o /boot/grub/grub.cfg on both.

(snip)

Or, if I type

Code:

configfile (hd0,1)/grub/grub.conf


I can boot from the menu.

As you mention both grub.cfg and grub.conf, maybe the error is there ?
By default, Grub 2 uses /boot/grub/grub.cfg as its config file.
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