[lug] How to recover after installing Broken Grub?

dio2002 at indra.com dio2002 at indra.com
Thu Jul 19 17:37:12 MDT 2007


> Rebuilding the initrd should fix it, if you can get into the system.
> You can probably boot from a live CD, mount up everything on the USB
> drive correctly (or at least root and boot), chroot into it and then run
> update-initramfs.

would this work on RHEL or just debian based distros?
>> Should I be able to edit the GRUB settings so it can boot windows
>> without
>> the USB drive attached? I hope so. Otherwise, I will want to remove GRUB
>> and
>> I don't know how to do that. How do I do that?
>
> Yes, you can do that in the grub config, or at the command line during
> boot.  The easy way to remove grub is:
>
> dd if=/dev/zero of=/dev/hda bs=512 count=1
>
> (change hda to your hard drive device).  Or put back the Windows MBR.

fdisk /mbr  will put back a windows MBR.. fwiw, the dd command above will
remove grub but it does not put a bootloader in its place.  which means
that i'm not sure the system will boot any drive at that point..




More information about the LUG mailing list