bug-grub
[Top][All Lists]
Advanced

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

Re: Need Help on Removing Grub (Again)


From: RD Lawrence
Subject: Re: Need Help on Removing Grub (Again)
Date: Fri, 05 Apr 2002 01:01:57 -0600

"Yoshinori K. Okuji" wrote:

>
> I understand GRUB should make a backup before installing itself, and
> if a backup is made, writing grub-uninstall would be very easy. I'll
> investigate how backup/uninstall should work, since there are some
> situations where it is not very clear what that looks like (e.g. When
> one installed GRUB into the boot block of a partition and then
> installed GRUB into a MBR, which block should grub-uninstall recover?
> Both?).

All three cases should be selectable by the user: 1) MBR alone; 2) PBR
alone; and 3) Both.   Otherwise, problems will inevitably arise from
unforseeable circumstances. :-)   However, I don't think the ability to
restore a boot record is nearly as important as the ability to just
"clean" away the existing boot loader code.  A user could always go back
and re-install an older boot loader if necessary.   As others have
observed, the save, restore, and clean operations could easily be
accomplished with dd, and wrapped up in a very small shell script.   I
would call it "grubmagic". :-) but I suppose PowerQuest would sue us for
ripping off their claim on software magic this and that. :-).  If
possible, the ability to (at the very least) clean the BRs  without
disturbing the partition table should be built into grub to reduce
confusion and extra baggage for naive end-users.

>
>
> As for your problem, I don't have much to say, because I don't know
> how your BIOS checks if a drive is bootable. If it just checks the
> signature 0xAA55 at the end of the MBR, you could invalidate the MBR,
> by running "dd if=/dev/zero of=/dev/hdb bs=1 count=2 seek=510", which
> fills the signature with zero.

I apologize for my earlier (sleep-deprived) prose... which left out
details that caused some confusion.  I don't really think the bios is at
fault, and I don't have any reason to think that grub is at fault (apart
from extremely ambiguous documentation  and the inability to remove its
own code :-) ).  I'm inclined to suspect that the problem lies with a
previous version of 2.2.x fdisk that may have corrupted the boot records
because of the "huge disk" bug.  However, I'm assuming here that grub
(unlike lilo) normally honors the status of the "(in)active" flag.   If
that's *not* the case, then we *definitely* need a way to uninstall
grub.  Otherwise, problems could ensue each and every time a user
installs a new hard drive.  Even if grub does honor the "(in)active"
flag, it still makes sense to give it the capability to "clean" a BR for
a variety of reasons apart from the specific one that I've outlined in
the case at hand.

--
RD Lawrence
504-443-5000 (USA)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]