Re: Really big mistake -- I need some help

Harald Koenig (koenig@tat.physik.uni-tuebingen.de)
Tue, 15 Jul 1997 08:56:59 +0200


On Jul 14, Kirk Bauer wrote:

> On Mon, 14 Jul 1997, Harald Koenig wrote:
> > good!! if you had install LILO in the MBR, you should have
> > /boot/boot.0300
> > which is a copy of your MBR when LILO was installed first.
> > if you haven't changed the partition layout since then, you
> > can just do
> > cp /boot/boot.0300 /dev/hda
> > lilo
>
> Thanks!! This worked like a charm. I was writing a C program
> to look through /dev/hda by 1024 byte blocks looking for the
> magic # in the super block ;) This was a *LOT* easier!

but obviously only can work if you've installed LILO in ther MBR
and not in the Linux partition... (one more good reason to do so;)

> > but I'd check it first using
> >
> > fdisk /boot/boot.0300
> > p
>
> fdisk didn't like this, but the first part worked fine...

then you have to copy the boot block to your hard disk first
(and maybe save the old one using "dd if=/dev/hda of=part.old count=1")

> Does anybody know a good page to go to that will help me understand
> *exactly* what is in the first 512 bytes of a hard drive, how to
> edit the partition table manually, what goes on inside the
> extended partition, etc...

check
linux/include/linux/genhd.h
and
fdisk sources

Harald

--
All SCSI disks will from now on                     ___       _____
be required to send an email notice                0--,|    /OOOOOOO\
24 hours prior to complete hardware failure!      <_/  /  /OOOOOOOOOOO\
                                                    \  \/OOOOOOOOOOOOOOO\
                                                      \ OOOOOOOOOOOOOOOOO|//
Harald Koenig,                                         \/\/\/\/\/\/\/\/\/
Inst.f.Theoret.Astrophysik                              //  /     \\  \
koenig@tat.physik.uni-tuebingen.de                     ^^^^^       ^^^^^