[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: reinstall lilo after windows



On Thu, Sep 08, 2005 at 04:39:22PM +0200, Rakotomandimby Mihamina wrote:
> I will have to reinstall my windows XP because I messed it up.
> I know it will fire my bootloader (lilo on the MBR)
> 
(...)
> The partition for the windows OS is ready and empty. It's hda4

I wonder if Windows knows that it should not touch hda1-3...  It's
been a while since I last installed it.  Since the other partitions
obviously do not have a Windows file system it may work.

> I guess I will have to boot with some Debian CD to restore the MBR, but,
> then,... 

You can try booting from a Debian CD right now before you install
Windows.  At the welcome screen there should be some information
accessible through one of the function keys on how you can start an
existing system.


Alternatively, try one of the Live CD distributions.  Then see if you
can 'chroot' into your existing system and run lilo from there to put
it back in the MBR.


Alternatively, I think you can try to store your current MBR with dd.
Something like:

dd if=/dev/hda of=my-mbr count=512

Then save that my-mbr file on a floppy or something.  If you can get
into Linux in some way then you can put this MBR back with:

dd if=my-mbr of=/dev/hda

But don't take my word for it.  I could easily forget something here,
like adding a 'bs' option.  And it's not for the faint of heart.  One
misspelling may very well destroy all data on your harddisk.


Alternatively, you could put lilo on a floppy disk.  In /etc/lilo.conf
put something like this:

boot=/dev/fd0

Save it and run lilo to store the MBR on the floppy.  Then reboot and
test if you can indeed startup from that floppy.


Whatever your plan will be, try it at least once to be sure that it
actually works.

A recent backup wouldn't hurt either. :)

-- 
Maurits van Rees | http://maurits.vanrees.org/ [Dutch/Nederlands] 
Public GnuPG key:  http://maurits.vanrees.org/var/gpgkey.asc
"It can seem like you're doing just fine,
but the creep's creeping into your mind." - Neal Morse

Attachment: signature.asc
Description: Digital signature


Reply to: