[NTLUG:Discuss] Grub .94

Rob Apodaca rapodaca at raacc.com
Fri Mar 4 04:50:32 CST 2005


Assuming you want the mbr installed into /dev/hda1 and your kernel image
is located at /boot/kernel-2.X.X

create a valid grub.conf in /boot/grub/grub.conf

Here is a minimal one:

default 0
timeout 30
title=Linux
root (hd0,0)
kernel /kernel-2.X.X root=/dev/hda1


Then, there are two ways to get grub installed to MBR:

FIRST WAY: Use grub shell
$ grub
grub> root (hd0,0)
grub> setup (hd0)
grub> quit
* Note, type commands above exactly as shown...
"root (hd0,0)"
NOT "root(hd0,0)"


SECOND WAY: Use grub-install
grub-install --root-directory=/boot /dev/hda

I really like grub but it is a little tricky to get the hang of. Hope
this helped.

Cheers,
-Rob

On Thu, 2005-03-03 at 08:15 -0600, Terry wrote:
> (trying to do some tech-support via phone/email and... last night....)
> A friend is having trouble with grub 0.94 and it seems that he's just
> not able to install to MBR.  I told him that
>    grub install
> would install to MBR of hda,  MBR of hda, 
> [Didn't it _used_ to default to just instal  to  MBR of hda just with
> 'grub install' ?]
> but he just kept getting the grub prompt back
>    grub>
> as if he'd just given the command 'grub' with no instructions, and
> maybe I told him wrong, but seems like that's what it used to do,
> [just write to MBR of hda].
> So I told him to try
>    grub  --install-partition=hda
> or
>    grub --install-partition=hda1
> Neither of those did anymore than return him to the grub prompt, but
> then I got to thinking maybe it's supposed to be hd0, i.e.
>    grub --install-partition=hd0
> or
>    grub --install-partition=hd0,0
> I had him read me his grub.conf file and it had 
> #boot=/dev/hda
> and 
>         root (hd0,0)
> and I had him look at
>    cat /etc/fstab
> and
>    fdisk -l 
> and it appears that he has his
>    /boot
> mount point on hda1 so....
> 
> I need to email him back with something else to try, but hate to give
> so many options, I'm just guessing.
> Anyone know for sure?  (manfile just says "--install-partition=PAR")
> 
> And if you _do_ just give command
>    grub
> and get back the grub prompt
>    grub>
> what then?  
>    grub> install
> or
>    grub> install hda
> or
>    grub> install hda1
> or
>    grub> install hd0
> or
>    grub> install hd0,0
> or
>     grub> --install-partition=hda
> or
>     grub> --install-partition=hda1
> or
>     grub> --install-partition=hd0
> or
>     grub> --install-partition=hd0,0
> or
>     grub> hda
> or
>     grub> hda1
> or
>     grub> hd0
> or
>     grub> hd0,0
> OR, maybe there's something wrong with grub?
> OR, maybe there's something wrong with MBR?
> or...................  ?
> 
> _______________________________________________
> https://ntlug.org/mailman/listinfo/discuss
> 





More information about the Discuss mailing list