Java Mailing List Archive

http://www.redhatconfig.com/

Home » Gentoo Linux »

[gentoo-user] Re: Grub heartbreaker

reader

2008-04-24

Replies:

Author LoginPost Reply
Alan McKinnon <alan.mckinnon@(protected):

> On Thursday 24 April 2008, reader@(protected):
>
>> So assuming I've made some mistake in grub.conf I try to boot from
>> grub command line.
>>
>>  root = (hd0,0) (which is /dev/sda1 in linux terms)
>>
>>  kernel /kernel-2.6.25-r1
>
> Nope. Kernel needs a root=<device> parameter. It can't know what is your
> root partition, that info is in fstab and fstab is on the root
> partition.So you tell it via a parameter
>

[...]

>>  kernel /kernel-2.6.25-r1 root=(hd0)/sda3
>>
>> Fails

> Won't work. (hd0) is a grub thing. You need a /dev/sda3 or similar in
> there

I think you are wrong about that. But just a fine point and not
central to the problem.
For example I know for sure you can use the grub notation at the
kernel address like:

kernel (hd0,0)/kernel-XXXXXX

At least I know for sure it was possible at one time.. I haven't
actully used that notation in grub for quite a while. I do have that
notation as the address for the splash image in several working
grub.confs. (like splashimage=(hd0,0)/grub/splash.xpm.gz)


[...]

>
>> So reloading the install ISO I mount /mnt/gentoo/boot and edit
>> grub.conf to say:
>>
>>   title=kernel-2.6.25-r1
>>   root (hd0,0)
>>   kernel /kernel-2.6.25-r1 root=/dev/sda3
>>
>> That fails
>>   kernel /kernel-2.6.25-r1 root=/dev/hda3 (Thinking maybe grub
>>   does not understand sda)
>
> Nothing to do with grub. It's a kernel boot parameter passed verbatim to
> the kernel and needs valid kernel device names.
>
> What's the error you get? Is (hd0,0) a separate /boot? Does it contain a
> file called kernel-2.6.25-r1 at the top level? And you also should have
> a "ro" kernel parameter in there

Using your point from above (but as I've posted, in the actual
grub.conf I do have a legitimate kernel device appended.

The latest attempt brings me to a grub command line as posted so
grub.conf didn't work.

So to give more meaning-full errors I will list my steps and the output
below including a screen shot of the kernel-panic error message

At grub prompt:

grub> root (hd0.0)
(That works and indicates an ext2fs)

grub> kernel /kernel-2.6.25-r1 root=/dev/sda3
(This also works as noted by using completion at `/k<tab>')

grub> boot

In the screen shot provided note that it appears grub is expecting an
intramfs and only lists those types of devices, rejecting both
(hd0,0) and /dev/sda3.

http://www.jtan.com/~reader/vu/disp.cgi

> here's a working grub.conf for illustration:
>
> default      0
> timeout      10
> splashimage=(hd0,0)/grub/splash.xpm.gz
>
> title       Default
> root        (hd0,0)
> kernel       /vmlinuz root=/dev/sda3 ro
>
> title       Gentoo-2.6.25
> root        (hd0,0)
> kernel       /vmlinuz-2.6.25-gentoo root=/dev/sda3 ro
>
> Seems my setup is identical to yours:
> /boot on /dev/sda1 aka (hd0,0) to grub
> / on /dev/sda3
>
> Only difference is the "ro" boot parameter, which shouldn't make a
> difference - it's there for fsck purposes during start-up.


Yes, I fdisked the `virtual' disk into boot=/dev/sda1 root=/dev/sda3

> What disk driver and disks do you have? Are you 100% sure you are either
> using the new ata driver (everything is an sd) or have scsi/sata disks?
> If your disk is IDE with the old driver, it will be an hd and will
> require that on the kernel line

I'm not really sure about all this, its on a brand new gateway laptop
running Vista Home Premium on core 2 dua processor T5550

The system information tool doesn't give the type of harddisk but does
shwo goose eggs at a scsi listing... and its very unlikely to be scsi
anyway.

Device manager doesn't do any better. Under Disk drives it just gives
the brand (Western Digital) and the model number:
  WDC WD2500BEVS-22USTO

I don't think that part number is a scsi part number.

I don't know any other ways to tell if its Sata or IDE but I think its
IDE.

I did mention in OP that this intall is inside a vmware machine hosted
on Vista Home Premium OS. The `virutal' disk is seen as scsi hence
the /dev/sda notations.

(Vmware workstation 6.5)
In the vmware harware settings its listed as 12 GB scsi disc.

My current grub.conf:

default 0
timeout 5
splashimage=(hd0,0)/grub/splash.xpm.gz

title=kernel-2.6.25-r1-0x31a-1280x1024
root (hd0,0)
kernel /kernel-2.6.25-r1 root=/dev/sda3

--
gentoo-user@(protected)

©2008 redhatconfig.com - Jax Systems, LLC, U.S.A.