Rusty Carruth wrote:
>
> (Courtesy copy bcc'd to Avdi directly)
>
> <[EMAIL PROTECTED]> wrote:
> > Hi,
> >
> > My name is Avdi, and I'm an idiot.
>
> Ah, be easy on yourself! We all have stories we could tell (I'm pretty sure)
> of the 'ohno-second's we've had (like the time I did rm -rf * from a subdir
> that just HAPPENED to have my windows partition mounted below it!)
>
> > Specifically, I installed Win98 on a partition I'd cleared for it on my
> > Mandrake 7.2 system, *without* checking to make sure my emergency linux boot
> > disk actually worked. Naturally, Win98 overwrote my MBR, and now I'm unable to
> > boot linux. I can boot the Mandrake install CD, but I can't find a way to
> > easily reinstall LILO or GRUB from it. Originally, I had a trouble with the
> > lilo on the CD giving my "Unsupported device" errors; after I rebooted and
> > tried again for some reason the RAM disk was read-only, where it had been
> > writeable the first time I booted from the CD. Too wierd... anyway, I'm able to
> > mount my linux partition from the CD boot, but what do I do from there? I can't
> > install LILO from the old partiion because LILO expects various files
> > (like /boot/boot.b) to be in specific places in the filesystem; and the ramdisk
> > is read-only. I can't reinstall GRUB, mainly because I can't figure out it's
> > internal documentation and I can't find any external docs.
>
> Well, I've been guru status for a while (according to some, anyway ;-)
> (but I don't do windows any more!), but recently someone here on the expert
> list put forth a really nifty trick on how to do this.
>
> I'll probably miss a detail, but here's the basic idea:
>
> 1a - boot from your install media with the lilo command:
>
> linux root=/dev/hda1 (or wherever your linux root partition is).
>
> (note that 'linux' may not be right either, but I think it is).
> if this won't work, try:
>
> 1b - boot from the install boot media, using rescue mode.
>
> 2a - if 1a worked, just login as root and type 'lilo'
>
> 2b - if only 1b worked, then you're going to have to get to the point
> where you have / mounted. The really cute thing now is to
> cd to /mnt/<wherever_your_root_partition_is> and type
> 'chroot .' - at that point, you are in a new subshell
> with / where your normal root partition was/is. Now just
> type 'lilo' and you've set your mbr again. (WARNING -
> if you've got more than one partition then you may have
> to fiddle a bit to get everything in the right place and
> in the right order. Beware that dumping out of a chroot-ed
> shell with partitions mounted FROM that chroot-ed shell
> may cause weird things to happen! (don't ask ;-) )
> Of course if you're using grub, give the grub install
> command instead of the lilo one!
>
Rusty...I'm confused...can you say that again? ;-)
...good direction though.
Mark