Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Minimal grub config does not boot the kernel automatically
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
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Tue Jul 02, 2013 9:31 pm    Post subject: Minimal grub config does not boot the kernel automatically Reply with quote

I have a very simple grub.conf as follows:

Code:

default 0
timeout 5

root (hd0,0)
kernel /3.8.13
initrd /initramfs.cpio.gz


This only gives me a grub prompt, no booting. I can then manually boot with specifying kernel, initrd and then "boot".

Why doesn't this happen automatically?

I have followed the guide at http://www.gentoo.org/doc/en/grub-error-guide.xml section 11. "Grub Just Shows a Grub Prompt"

In particular I have verified that the file grub.conf exists under /boot/grub and that the menu.lst in the same directory is a symbolic link to grub.conf. I have also executed the grub-install command.

My system has /dev/sda1 as /boot and /dev/sda2 as the root file system, which is encrypted.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7132
Location: almost Mile High in the USA

PostPosted: Tue Jul 02, 2013 9:40 pm    Post subject: Reply with quote

Probably don't have grub installed just right.

How did you grub-install?

What directory within that partition you have grub installed is your grub.conf sitting in?

I've had to make symlinks like boot -> . to "fix" a botched grub installation...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Tue Jul 02, 2013 9:48 pm    Post subject: Reply with quote

Maybe you dont have a separate /boot partition? If your grub and kernels are under root partition, you should use config as follow.

Code:

default 0
timeout 5

root (hd0,0)
kernel /boot/3.8.13
initrd /boot/initramfs.cpio.gz

_________________
https://github.com/defer-
Back to top
View user's profile Send private message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Tue Jul 02, 2013 9:51 pm    Post subject: Reply with quote

eccerr0r wrote:
Probably don't have grub installed just right.

How did you grub-install?

What directory within that partition you have grub installed is your grub.conf sitting in?

I've had to make symlinks like boot -> . to "fix" a botched grub installation...


I did grub-install --no-floppy /dev/sda

Since I didn't install grub to a specific partition I don't think the second question is valid, but in any case my grub.conf is in /dev/sda1, which is my /boot partition, and the full path would be (when mounting /dev/sda1 as root) /grub/grub.conf.
Back to top
View user's profile Send private message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Tue Jul 02, 2013 9:51 pm    Post subject: Reply with quote

defer- wrote:
Maybe you dont have a separate /boot partition? If your grub and kernels are under root partition, you should use config as follow.

Code:

default 0
timeout 5

root (hd0,0)
kernel /boot/3.8.13
initrd /boot/initramfs.cpio.gz


I do have a separate /boot partition.

I have one physical HDD.

I have /dev/sda1 as /boot (NOT encrypted)
I have /dev/sda2 as root (encrypted)
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Tue Jul 02, 2013 9:55 pm    Post subject: Reply with quote

[quote="deltamalloc"]
eccerr0r wrote:
Probably don't have grub installed just right.
Since I didn't install grub to a specific partition I don't think the second question is valid, but in any case my grub.conf is in /dev/sda1, which is my /boot partition, and the full path would be (when mounting /dev/sda1 as root) /grub/grub.conf.

Your grub.conf should be in /boot/grub/grub.conf

DO you get any error message when you boot up grub?
_________________
https://github.com/defer-
Back to top
View user's profile Send private message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Tue Jul 02, 2013 10:13 pm    Post subject: Reply with quote

[quote="defer-"]
deltamalloc wrote:
eccerr0r wrote:
Probably don't have grub installed just right.
Since I didn't install grub to a specific partition I don't think the second question is valid, but in any case my grub.conf is in /dev/sda1, which is my /boot partition, and the full path would be (when mounting /dev/sda1 as root) /grub/grub.conf.

Your grub.conf should be in /boot/grub/grub.conf

DO you get any error message when you boot up grub?


I believe you misread me.

Quote:
my grub.conf is in /dev/sda1, which is my /boot partition, and the full path would be (when mounting /dev/sda1 as root) /grub/grub.conf.


This means that when I have my /dev/sda2 mounted as / and /dev/sda1 mounted as /boot, my grub would be in /boot/grub/grub.conf.

Edit: I do not get any error messages.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7132
Location: almost Mile High in the USA

PostPosted: Tue Jul 02, 2013 10:36 pm    Post subject: Reply with quote

Did you have your boot partition mounted when running grub-install?

One trap I've fallen into is running grub-install /dev/sda1. You'll see an extra boot directory hierarchy if you do this, and your grub.conf needs to be /boot/grub/grub.conf on /dev/sda1 (/boot/boot/grub/grub.conf on fully mounted system). The hack of linking boot to the current directory on that partition was the simple fix, else I would need to reinstall grub (which was risky as this grub is installed on an mdraid1... it works, stop fscking with it...)
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Tue Jul 02, 2013 11:02 pm    Post subject: Reply with quote

eccerr0r wrote:
Did you have your boot partition mounted when running grub-install?

One trap I've fallen into is running grub-install /dev/sda1. You'll see an extra boot directory hierarchy if you do this, and your grub.conf needs to be /boot/grub/grub.conf on /dev/sda1 (/boot/boot/grub/grub.conf on fully mounted system). The hack of linking boot to the current directory on that partition was the simple fix, else I would need to reinstall grub (which was risky as this grub is installed on an mdraid1... it works, stop fscking with it...)


I did have /dev/sda1 mounted as /boot (in my chrooted environment) when running grub-install.

I did not run grub-install /dev/sda1.

I don't think the boot symlink in /boot is relevant for this problem.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 7132
Location: almost Mile High in the USA

PostPosted: Wed Jul 03, 2013 5:35 am    Post subject: Re: Minimal grub config does not boot the kernel automatical Reply with quote

If you aren't willing to at least try things, I don't know how you can be helped. Either it works or it doesn't work, not "I don't think it's relevant".

Then the other problem is possibly this: Lexical error:

deltamalloc wrote:

default 0
timeout 5
title Default Boot Option Title
root (hd0,0)
kernel /3.8.13
initrd /initramfs.cpio.gz

_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Wed Jul 03, 2013 8:52 am    Post subject: Reply with quote

Yeah you are missing title line from the grub.conf. You should have been following the gentoo handbook / install guide more carefully.

Code Listing 2.30: Example grub.conf
Quote:

default 0
timeout 10

title Gentoo
root (hd0,0)
kernel /boot/kernel root=/dev/sda3
initrd /boot/initramfs # Only when initramfs is needed

_________________
https://github.com/defer-
Back to top
View user's profile Send private message
deltamalloc
Apprentice
Apprentice


Joined: 18 Jan 2013
Posts: 279

PostPosted: Wed Jul 03, 2013 12:23 pm    Post subject: Re: Minimal grub config does not boot the kernel automatical Reply with quote

eccerr0r wrote:
If you aren't willing to at least try things, I don't know how you can be helped. Either it works or it doesn't work, not "I don't think it's relevant".

Then the other problem is possibly this: Lexical error:

deltamalloc wrote:

default 0
timeout 5
title Default Boot Option Title
root (hd0,0)
kernel /3.8.13
initrd /initramfs.cpio.gz


I am (was) willing to try anything that haven't been tried already. I should have pointed that out though, I already had a symbolic link there but removed it later, it didn't change the results.

However, the lexical error was probably the problem. Now I'm using LILO though (which works fine). I can try later to see if it works after I have sorted out my other problems.
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