[linux] help with grub

Helen Petropoulos elenip at u.washington.edu
Thu Jul 12 13:18:13 PDT 2007


Thanks Joshua,

I tried all of those.  I typed them as they appeared in the grub.conf 
file.  Still got the
File not found error.

I'm going to try booting off of either the original CD or a knoppix and 
let you know.  I'll
also get back to you on whether or not the ( makes a difference with 
respect to tab
completion.  (Josiah recommended that earlier).

HP

On Jul 12, 2007, at 12:34 PM, Joshua Daniel Franklin wrote:

> The RHEL default setup is to use a /boot partition,
> so Dell probably did that. You may just need to
> use the full name of the current RHEL4 kernel. Here
> is the current grub.conf entry for a Dell Precision
> I have:
>
> title Red Hat Enterprise Linux AS (2.6.9-55.0.2.EL)
>         root (hd0,0)
>         kernel /vmlinuz-2.6.9-55.0.2.EL ro root=LABEL=/ rhgb quiet
>         initrd /initrd-2.6.9-55.0.2.EL.img
>
>
> And here is a full list of kernels on that system:
>
>         kernel /vmlinuz-2.6.9-55.0.2.EL ro root=LABEL=/ rhgb quiet
>         kernel /vmlinuz-2.6.9-55.EL ro root=LABEL=/ rhgb quiet
>         kernel /vmlinuz-2.6.9-42.0.10.EL ro root=LABEL=/ rhgb quiet
>         kernel /vmlinuz-2.6.9-42.0.8.EL ro root=LABEL=/ rhgb quiet
>         kernel /vmlinuz-2.6.9-42.0.3.EL ro root=LABEL=/ rhgb quiet
>
>
>
>
> Helen Petropoulos wrote:
>> Hi,
>> Thanks Gordon (and Josiah).  The tab completion only works to 
>> complete the word "kernel".  It won't give me any
>> more options.  I tried kernel /vm and tab completion, but it just 
>> came back with an error that it could not find the file.
>> /boot should be on the /root system.  As far as I know, it is not a 
>> separate partition.  This RHE was configured by DELL
>> and actually belongs to another user.
>> I did a backup of the entire system a while back and was able to look 
>> into the (old) grub.conf.  Gordon, thanks for pointing
>> out that there is no /dev/hda0.  I assumed that partitions are 0 
>> indexed, as they are on my solaris machine.  Nevertheless, I also
>> tried /dev/hda1 and /dev/hda2 and neither could find the file.
>> I'm going to try linux rescue next and then maybe go to CD or else 
>> try knoppix, as suggested by another user.
>> Thanks, these are valuable skills to learn and know.
>> Best wishes to all who have answered and all who will continue to 
>> answer.  But I don't think you've heard the last of me yet.
>> Helen
>> On Jul 12, 2007, at 12:12 PM, Gordon Messmer wrote:
>>> Helen Petropoulos wrote:
>>>> I tried the following commands:
>>>> root (hd0, 1)
>>>> kernel /boot/vmlinuz root=/dev/hda0
>>>
>>> Above, the "root" line instructs grub to look at the first drive 
>>> reported by the BIOS (hda, under Linux), and the second partition on 
>>> that drive (grub is zero-indexed; 0 is the first partition).
>>>
>>> The "kernel" line instructs grub to look for a file named 
>>> "/boot/vmlinuz", which will only be valid if /boot is in the root 
>>> filesystem, and not on its own partition.  On your installation, is 
>>> /boot its own partition?
>>>
>>> The "kernel" line will also instruct the loaded kernel to use 
>>> "/dev/hda0" as the root filesystem.  Linux has no "/dev/hda0".  You 
>>> probably mean either "/dev/hda1" or "/dev/hda2".
>>>
>>> The question of your root filesystem's location, and the "root" line 
>>> in grub are related.  If /boot is in the root filesystem, rather 
>>> than its own partition, and the root filesystem is /dev/hda1, then 
>>> you'd need to tell grub:
>>>
>>> root (hd0,0)
>>> kernel /boot/vmlinuz root=/dev/hda1
>>>
>>> (hd0,0) and /dev/hda1 are different identifiers for the same 
>>> partition.
>>>
>>> However, if /boot were on its own partition (e.g. /dev/hda2), and 
>>> the root filesystem were on /dev/hda1, then you'd need to use 
>>> something like this:
>>>
>>> root (hd0,1)
>>> kernel /vmlinuz root=/dev/hda1
>>>
>>> It is probably very useful to point out that grub includes tab 
>>> completion.  If you tell grub "root (hd0,0)", and then "kernel=/", 
>>> you can press tab twice to get a list of all of the files under 
>>> whichever filesystem is on (hd0,0).  You can use tab completion to 
>>> help you determine where the kernels are located, but you'll still 
>>> need to figure out where your root filesystem is, in order to give 
>>> the kernel the right "root=" argument.
>>>
>>>> If the filesystem itself is corrupt, would I be able to
>>>> get into grub at all?
>>>
>>> Yes.  Grub installs itself on the MBR, and will load even if your 
>>> filesystems or partition tables are corrupt.
>>>
>>>> If the filesystem were not mounted, would I be able to get into 
>>>> grub?
>>>
>>> Filesystems are not "mounted" by grub, or anything else at that 
>>> stage of the boot sequence.
>>>
>>>> Do I need to boot from CD at this point to see what kernels are 
>>>> there?
>>>
>>> No, but you can.  The RHEL CDs include a rescue mode.  Type "linux 
>>> rescue" at the boot prompt.  You'll get a working linux system in 
>>> which to locate and correct the problem.
>>>
>>>> Is there any other way to look at the filesystem
>>>> and see what's on it?
>>>
>>> Grub's tab completion can be useful, and any one of many live CDs 
>>> (including Red Hat's "rescue" mode) are good options.
>>>
>>>> Do you recommend that I try to boot off of a kernel that's on a CD?
>>>
>>> If you have one handy, and can't fix the problem from grub itself. 
>>> Understanding grub can be a very useful skill.
>>>
>



More information about the Linux mailing list