[Wylug-help] Re-installing GRUB - was Re: Restoring /boot and MBR

Gavin Harris gavin at phiji.com
Thu, 16 Jan 2003 15:08:10 +0000 (GMT)


Hi Gary,

Once you are at the GRUB prompt, you should just need to do: -

grub> root(hd0,0)
grub> setup(hd0)

Then make sure your /boot/grub/grub.conf looks right: -

default 0
timeout 30

splashimage=3D(hd0,0)/boot/grub/splash.xpm.gz
title=3DRed Hat Linux
root (hd0,0)
kernel /boot/bzImage root=3D/dev/hd??

..Or something similar

And that should, maybe, be it.

I don't know why people don't like grub, it's always saving me from having
to remember not to forget to run lilo when I recomplile the kernel.


--
Gavin



On Thu, 16 Jan 2003, Gary Stainburn wrote:

> Hi folks,
>
> I'm just about ready to attempt repairing my HD.
>
> I recon that from the /proc/partitions info I can rebuild the partition t=
able
> using fdisk.
> Then I can
>
> mkfs /boot
>
> and
>
> rpm -i --force kerne*rpm grub*rpm
>
> to rebuild my /boot partition.
>
> My question is, which chickens do I need to sacrifice to get grub working
> again.  Whe I did this on a testbed system, I just got the to GRUB prompt=
 and
> nothing else happened.
>
> I assume I've got to call grub-install with some secret pagan chants whil=
e the
> sun is just showing over the horizon.  Does anyone know exactly how it go=
es?
>
> On Thursday 16 Jan 2003 1:27 am, Robert P. J. Day wrote:
> > On 15 Jan 2003, Bret Hughes wrote:
> > > from the hexdump showing the beginning of the first partition
> > >
> > > 00001c0 001  \0 203   =FE   ? 003   ?  \0  \0  \0   =C5   =FA  \0  \0=
 200  \0
> > > 00001d0 001 004  \f   =FE 177 002 004   =FB  \0  \0   ? 202   >  \0  =
\0  \0
> > > 00001e0   A 003 005   =FE   =FF   =FF   C   }   ?  \0   =FB   =DE   #=
 002  \0  \0
> > > 00001f0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0   U  =
 =AA
> > > 0000200  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  =
\0
> > > *
> > > 0008000   M   S   -   D   O   S       6   .   2       P   C   M   N  =
\0
> > > 0008010  \0  \0  \0  \0   D   C   C   C 003   C   :   \   D   O   S  =
\0
> > > 0008020  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  \0  =
\0
> > > *
> > >
> > >
> > > well now that I look at it the first partition according to fdisk is
> > > linux but if the stuff at byte x8000 is some sort of partition
> > > identifier it is showing MS-DOS 6.2  hmmm.
> > >
> > > This machine had windows on it at one time otherwise I don't know.  I
> > > thought I was beginning to understand this.
> >
> > not surprising.  in addition to boot code being in the MBR, every
> > partition (IIRC) has a boot sector as well for additional boot code
> > that might be necessary to boot just that partition.
> >
> > what you're seeing is undoubtedly MS-DOS boot code left over
> > from when, as you say, this used to be a DOS machine.  when you
> > installed linux and made this a linux partition, because
> > you installed your loader in the MBR (i'm guessing), the
> > boot sector in this partition was left untouched.  it's
> > still DOS boot code, it's just being ignored.
> >
> > this is all speculation, but i'm feeling pretty confident.
> >
> > rday
>
> --
> Gary Stainburn
>
> This email does not contain private or confidential material as it
> may be snooped on by interested government parties for unknown
> and undisclosed purposes - Regulation of Investigatory Powers Act, 2000
>
>
> _______________________________________________
> Wylug-help mailing list
> Wylug-help@wylug.org.uk
> http://list.wylug.org.uk/mailman/listinfo/wylug-help
>