public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Gentoo & GRUB help
@ 2007-12-31 19:16 BRM
  2008-01-01  1:25 ` Iain Buchanan
  2008-01-01 10:20 ` [gentoo-user] " Mick
  0 siblings, 2 replies; 9+ messages in thread
From: BRM @ 2007-12-31 19:16 UTC (permalink / raw
  To: Users Gentoo

I have an AMD64 system which I just installed the AMD64 Gentoo Image
onto, following AMD64 HowTo. However, I am having trouble getting grub
to find my kernel. I'm only using grub because of the warning about
LILO (which I much prefer due to the device naming convention it uses)
- I was using LILO under Slackware but that was 32-bit only, and not
I'm using the 64/32 bit mix - so I'm going with what's recommended for
now.

The system is set to boot off of /dev/hdb2 (ext2) and use /dev/hdb1 as
the root. I believe the boot device is hd1,1 in grub terminology. 

The system has 3 hard drives: hda, hdb, and sda; as well as a dvd drive
(hdc).

/dev/hdb2 has the following structure:
 - list of all my Slackware kernels
 - gentoo/bzImage
 - gentoo/bzImage_2-6-23-gentoo-r3
 - grub/

Below is my grub.conf (minus comment lines):

timeout 30
default 0
fallback 1
title Gentoo Linux
root (hd1,1)
kernel /gentoo/bzImage root=/dev/hdb1

title Slackware Linux
root (hd1,1)
kernel /vmlinuz root=/dev/sda1

title Install GRUB into the hard disk
root (hd1,1)
setup (hd1)

title Change the colors
color light-green/brown blink-red/blue

I installed it via:

# grub
grub: root (hd1,1)
grub: setup (hd1)
grub: exit

All seems well. It boots and presents the menu, but then can't find the
kernel when I select "Gentoo Linux" or try to manually run the lines. I
tried using "find" at the grub command prompt during the boot process,
but it couldn't find it either. I haven't tried the Slackware kernel
yet, as I am mostly concerned about the Gentoo kernel.

Note: I am using LVM2 under this Gentoo install - but not for /boot or
/.

What am I missing?

TIA,

Ben
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Gentoo & GRUB help
  2007-12-31 19:16 [gentoo-user] Gentoo & GRUB help BRM
@ 2008-01-01  1:25 ` Iain Buchanan
  2008-01-01 15:47   ` BRM
  2008-01-01 10:20 ` [gentoo-user] " Mick
  1 sibling, 1 reply; 9+ messages in thread
From: Iain Buchanan @ 2008-01-01  1:25 UTC (permalink / raw
  To: gentoo-user

Happy new year!

On Mon, 2007-12-31 at 11:16 -0800, BRM wrote:
[snip]
> The system is set to boot off of /dev/hdb2 (ext2) and use /dev/hdb1 as
> the root. I believe the boot device is hd1,1 in grub terminology. 

yep!

> The system has 3 hard drives: hda, hdb, and sda; as well as a dvd drive
> (hdc).
> 
> /dev/hdb2 has the following structure:
>  - list of all my Slackware kernels
>  - gentoo/bzImage
>  - gentoo/bzImage_2-6-23-gentoo-r3
>  - grub/
> 
> Below is my grub.conf (minus comment lines):

looks fine to me!

[snip]
> All seems well. It boots and presents the menu, but then can't find the
> kernel when I select "Gentoo Linux" or try to manually run the lines. I
> tried using "find" at the grub command prompt during the boot process,
> but it couldn't find it either. I haven't tried the Slackware kernel
> yet, as I am mostly concerned about the Gentoo kernel.

have you tried grubs completion?  if you type "kernel (hd1,1)/" and then
<tab> it should try and complete the line for you.  (from the grub
command prompt, once you've booted into the grub shell)  It could be
possible that your bios / grub have swapped the drive assignment around
during boot.  Try all your (hdx,y) combinations with grub completion
until you find one that has /gentoo on it.

> Note: I am using LVM2 under this Gentoo install - but not for /boot or
> /.

it shouldn't interfere with /boot or /

> What am I missing?

don't know, hope my hints can help.
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

Schapiro's Explanation:
	The grass is always greener on the other side -- but that's
	because they use more manure.

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* [gentoo-user]  Re: Gentoo & GRUB help
  2007-12-31 19:16 [gentoo-user] Gentoo & GRUB help BRM
  2008-01-01  1:25 ` Iain Buchanan
@ 2008-01-01 10:20 ` Mick
  2008-01-01 11:46   ` Iain Buchanan
  1 sibling, 1 reply; 9+ messages in thread
From: Mick @ 2008-01-01 10:20 UTC (permalink / raw
  To: gentoo-user

Happy New Year!

BRM wrote:

> The system is set to boot off of /dev/hdb2 (ext2) and use /dev/hdb1 as
> the root. I believe the boot device is hd1,1 in grub terminology.

Yes.

> The system has 3 hard drives: hda, hdb, and sda; as well as a dvd drive
> (hdc).

Check your /boot/grub/device.map to make sure that devices correspond to the
expected grub nomenclature.  Use <tab-completion> after you run # grub for
root to find out where Grub thinks its root fs resides.

> /dev/hdb2 has the following structure:
>  - list of all my Slackware kernels
>  - gentoo/bzImage
>  - gentoo/bzImage_2-6-23-gentoo-r3
>  - grub/
> 
> Below is my grub.conf (minus comment lines):
> 
> timeout 30
> default 0
> fallback 1
> title Gentoo Linux
> root (hd1,1)
> kernel /gentoo/bzImage root=/dev/hdb1

I assume from what you said above that when you run ls -la /gentoo/bzImage
you can see the kernel image you are trying to boot, right?

> title Slackware Linux
> root (hd1,1)
> kernel /vmlinuz root=/dev/sda1
> 
> title Install GRUB into the hard disk
> root (hd1,1)
> setup (hd1)
> 
> title Change the colors
> color light-green/brown blink-red/blue
> 
> I installed it via:
> 
> # grub
> grub: root (hd1,1)
> grub: setup (hd1)
> grub: exit
> 
> All seems well. It boots and presents the menu, but then can't find the
> kernel when I select "Gentoo Linux" or try to manually run the lines. I
> tried using "find" at the grub command prompt during the boot process,
> but it couldn't find it either. I haven't tried the Slackware kernel
> yet, as I am mostly concerned about the Gentoo kernel.
> 
> Note: I am using LVM2 under this Gentoo install - but not for /boot or
> /.
> 
> What am I missing?

Your system will look at the first device that the BIOS finds for a
bootloader.  That 'should' be /dev/hda, but it could well be /dev/sda
(check device map and also use Grub's tab completion to see what the
BIOS/Grub sees first).  Then install your grub in that first device. 
There's nothing wrong with your Grub installation other than it is in the
second (third?) device and it need to be either chainloaded or directly
booted from the Grub installation in the first device that comes up on boot
up.

HTH
-- 
Regards,
Mick

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user]  Re: Gentoo & GRUB help
  2008-01-01 10:20 ` [gentoo-user] " Mick
@ 2008-01-01 11:46   ` Iain Buchanan
  0 siblings, 0 replies; 9+ messages in thread
From: Iain Buchanan @ 2008-01-01 11:46 UTC (permalink / raw
  To: gentoo-user


On Tue, 2008-01-01 at 10:20 +0000, Mick wrote:
> Happy New Year!

so far :) 1 almost down and 365 to go!

> BRM wrote:
> 
> > The system is set to boot off of /dev/hdb2 (ext2) and use /dev/hdb1 as
> > the root. I believe the boot device is hd1,1 in grub terminology.
> 
> Yes.
> 
> > The system has 3 hard drives: hda, hdb, and sda; as well as a dvd drive
> > (hdc).
> 
> Check your /boot/grub/device.map to make sure that devices correspond to the
> expected grub nomenclature.  Use <tab-completion> after you run # grub for
> root to find out where Grub thinks its root fs resides.

in my experience, it is not enough just to run grub from within linux -
you have to boot to grub.  YMMV.

> > /dev/hdb2 has the following structure:
> >  - list of all my Slackware kernels
> >  - gentoo/bzImage
> >  - gentoo/bzImage_2-6-23-gentoo-r3
> >  - grub/
> > 
> > Below is my grub.conf (minus comment lines):
> > 
> > timeout 30
> > default 0
> > fallback 1
> > title Gentoo Linux
> > root (hd1,1)
> > kernel /gentoo/bzImage root=/dev/hdb1
> 
> I assume from what you said above that when you run ls -la /gentoo/bzImage
> you can see the kernel image you are trying to boot, right?

not quite!  root is (hd1,1) which is hdb2.  This is grub's root device,
ie your boot partition (if you have one).  The kernel line specifies the
linux root as hdb1.  so `ls -la /boot/gentoo/bzImage` should show as you
expected, given that hdb2 is mounted as /boot.

HTH!
-- 
Iain Buchanan <iaindb at netspace dot net dot au>

#if _FP_W_TYPE_SIZE < 32
#error "Here's a nickel kid.  Go buy yourself a real computer."
#endif
	-- linux/arch/sparc64/double.h

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Gentoo & GRUB help
  2008-01-01  1:25 ` Iain Buchanan
@ 2008-01-01 15:47   ` BRM
  2008-01-01 16:00     ` BRM
  0 siblings, 1 reply; 9+ messages in thread
From: BRM @ 2008-01-01 15:47 UTC (permalink / raw
  To: gentoo-user

--- Iain Buchanan <iaindb@netspace.net.au> wrote:
> Happy new year!

Happy new year to you all to!
 
> On Mon, 2007-12-31 at 11:16 -0800, BRM wrote:
> [snip]
> > All seems well. It boots and presents the menu, but then can't find
> the
> > kernel when I select "Gentoo Linux" or try to manually run the
> lines. I
> > tried using "find" at the grub command prompt during the boot
> process,
> > but it couldn't find it either. I haven't tried the Slackware
> kernel
> > yet, as I am mostly concerned about the Gentoo kernel.
> have you tried grubs completion?  if you type "kernel (hd1,1)/" and
> then
> <tab> it should try and complete the line for you.  (from the grub
> command prompt, once you've booted into the grub shell)  It could be
> possible that your bios / grub have swapped the drive assignment
> around
> during boot.  Try all your (hdx,y) combinations with grub completion
> until you find one that has /gentoo on it.
"Mick" <michaelkintzios@gmail.com> wrote:
> Your system will look at the first device that the BIOS finds for a
> bootloader.  That 'should' be /dev/hda, but it could well be /dev/sda
> (check device map and also use Grub's tab completion to see what the
> BIOS/Grub sees first).


Thanks. I had tried tab-completion while at the grub command-line from
the CD during install, but it wasn't working. When Grub came up, it was
thinking hdb equalled hd0 instead of hd1. So while it worked fine with
hd1 from the CD (it didn't like hd0 then), it was mixed up when grub
actually ran.

Any suggestions on how to fix this so that grub runs well from within
Linux?

"Mick" <michaelkintzios@gmail.com> wrote:
> Check your /boot/grub/device.map to make sure that devices correspond
> to the expected grub nomenclature.
Also - (per Mick's e-mail)

> > Note: I am using LVM2 under this Gentoo install - but not for /boot
> or
> > /.
> it shouldn't interfere with /boot or /

That's what I thought, I just figured I mention it just in case.
 
> > What am I missing?
> don't know, hope my hints can help.

Thanks, it sure did. :->

Ben
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Gentoo & GRUB help
  2008-01-01 15:47   ` BRM
@ 2008-01-01 16:00     ` BRM
  2008-01-02 10:43       ` Peter Humphrey
  0 siblings, 1 reply; 9+ messages in thread
From: BRM @ 2008-01-01 16:00 UTC (permalink / raw
  To: gentoo-user

--- BRM <bm_witness@yahoo.com> wrote:
> When Grub came up, it was
> thinking hdb equalled hd0 instead of hd1. So while it worked fine
> with
> hd1 from the CD (it didn't like hd0 then), it was mixed up when grub
> actually ran.

> Any suggestions on how to fix this so that grub runs well from within
> Linux?

Ok, well - I got it working by setting up grub.conf to focus on hd0,
while at the grub prompt I referred to it as hd1. That is, imho, just
weird, and another reason why LILO wins out in my book as LILO matches
Linux's device names pretty well.

Now if I can just figure out this "base-layout-1" versus
"base-layout-2" thing that Device Mapper and LVM init scripts are
complaining about. (Tips welcomed!)

Thanks!

Ben
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Gentoo & GRUB help
  2008-01-01 16:00     ` BRM
@ 2008-01-02 10:43       ` Peter Humphrey
  2008-01-02 13:43         ` BRM
  0 siblings, 1 reply; 9+ messages in thread
From: Peter Humphrey @ 2008-01-02 10:43 UTC (permalink / raw
  To: gentoo-user

On Tuesday 01 January 2008 16:00:51 BRM wrote:

> I got it working by setting up grub.conf to focus on hd0, while at the
> grub prompt I referred to it as hd1. That is, imho, just weird, and
> another reason why LILO wins out in my book as LILO matches Linux's device
> names pretty well. 

I suggest that you create /boot/grub/device.map with the bootable devices 
listed in the order in which the BIOS presents them to grub at boot time*. 
This will cause the run-time grub to use them in the same order as the 
boot-time grub. The grub manual tells you how to create and use this file. 
Here's mine:

$ cat /boot/grub/device.map
(hd0)   /dev/hda
(hd1)   /dev/sda
(hd2)   /dev/sdb
(hd3)   /dev/sdc
(hd4)   /dev/sdd

Note also that you can play various tunes on the boot-order theme by setting 
values in your BIOS. In my case I can select IDE or SATA to boot first, and 
separately I get a list of connected bootable devices to put in my 
preferred order. That setting seems to override the first one, so it's the 
only one I use nowadays. I think I have another setting as well, but I 
don't want to reboot the machine just to find out.

You should be able to get realities to match by judicious use of these 
settings.

* This is an advantage of grub's naming convention. If you interrupt the 
boot sequence and use grub to show the partitions on each drive in turn 
(hd0, hd1, ...), regardless of their interface types, you can thenceforward 
be confident of whether, say, hda or sda is presented first. If you had to 
specify each type separately, you still wouldn't know that.

-- 
Rgds
Peter
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Gentoo & GRUB help
  2008-01-02 10:43       ` Peter Humphrey
@ 2008-01-02 13:43         ` BRM
  2008-01-02 13:56           ` Neil Bothwick
  0 siblings, 1 reply; 9+ messages in thread
From: BRM @ 2008-01-02 13:43 UTC (permalink / raw
  To: gentoo-user

--- Peter Humphrey <prh@gotadsl.co.uk> wrote:
> On Tuesday 01 January 2008 16:00:51 BRM wrote:
> > I got it working by setting up grub.conf to focus on hd0, while at
> the
> > grub prompt I referred to it as hd1. That is, imho, just weird, and
> > another reason why LILO wins out in my book as LILO matches Linux's
> device
> > names pretty well. 
> I suggest that you create /boot/grub/device.map with the bootable
> devices 
> listed in the order in which the BIOS presents them to grub at boot
> time*. 
> This will cause the run-time grub to use them in the same order as
> the 
> boot-time grub. The grub manual tells you how to create and use this
> file. 

Thanks. Oddly, grub detects hda and fd0 as boot devices - there is no
floppy and hda does not have a partition marked for boot. Any how...at
least hd0 points to hdb now.

> * This is an advantage of grub's naming convention. If you interrupt
> the 
> boot sequence and use grub to show the partitions on each drive in
> turn 
> (hd0, hd1, ...), regardless of their interface types, you can
> thenceforward 
> be confident of whether, say, hda or sda is presented first. If you
> had to 
> specify each type separately, you still wouldn't know that.

>From one perspective yes. From other, more important povs, no. However,
this is not the place to go into that discussion. E-mail me off-line if
you want to discuss it. In either case...

Thanks for the helpful info with GRUB.

Ben
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-user] Gentoo & GRUB help
  2008-01-02 13:43         ` BRM
@ 2008-01-02 13:56           ` Neil Bothwick
  0 siblings, 0 replies; 9+ messages in thread
From: Neil Bothwick @ 2008-01-02 13:56 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 380 bytes --]

On Wed, 2 Jan 2008 05:43:09 -0800 (PST), BRM wrote:

> Thanks. Oddly, grub detects hda and fd0 as boot devices - there is no
> floppy and hda does not have a partition marked for boot.

GRUB does not need the boot partition to be flagged as such, that's only
needed for the MSDOS bootloaders.


-- 
Neil Bothwick

Photons have mass? I didn't know they were catholic!

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2008-01-02 14:04 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-31 19:16 [gentoo-user] Gentoo & GRUB help BRM
2008-01-01  1:25 ` Iain Buchanan
2008-01-01 15:47   ` BRM
2008-01-01 16:00     ` BRM
2008-01-02 10:43       ` Peter Humphrey
2008-01-02 13:43         ` BRM
2008-01-02 13:56           ` Neil Bothwick
2008-01-01 10:20 ` [gentoo-user] " Mick
2008-01-01 11:46   ` Iain Buchanan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox