help-grub
[Top][All Lists]
Advanced

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

Re: Is it ok to copy first 446 bytes of MBR between Harddrives of diffe


From: Michael Evans
Subject: Re: Is it ok to copy first 446 bytes of MBR between Harddrives of different sizes?
Date: Wed, 29 Jul 2009 14:50:07 -0700

I believe that grub records the location of the next stage within the initial boot loader code there.  You are correct in that it is safe to copy the MSDOS era boot loaders in that way; they search for a flag (boot/active) on a primary partition and chain a loader within that.

What you should do to recover from this is, using the recovery CD do the following:

Mount your root partitions somewhere
mount -o bind /dev (/root/partition)/dev
mount -o bind /sys (/root/partition)/sys
mount -o bind /proc (/root/partition)/proc
chroot (/root/partition) /bin/bash
( /bin/sh will likely also work, but you're probably used to bash in interactive mode )
standard grub setup / reinstall commands for your distribution.

In my case I'd manually invoke the grub shell, usually with a specified device map file, and then http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-natively.html .

On Wed, Jul 29, 2009 at 7:39 AM, adrian15 <address@hidden> wrote:
Jorge Canas escribió:

If the first 446 bytes of the MBR can be reused, even if the harddrives are of different size, then can someone please throw me a bone and explain why cloning the MBR as described here does not produce a bootable harddrive?

I think that you are talking about Grub legacy and I do not know if it is currently supported in this mailing list.

Grub legacy uses something called stage1_5 which it is stored between MBR end and the first partition beginning.

As long as you are not copying it the boot fails.
I do not know how to copy stage1_5 but it can be done.

Another workaround is to force grub not to link stage1 to stage1_5 which can be done with install command manually or using the Super Grub Disk's hacked's grub's setup command. But it is not recommended.

adrian15
--
Support free software. Donate to Super Grub Disk. Apoya el software libre. Dona a Super Grub Disk. http://www.supergrubdisk.org/index.php?pid=10



_______________________________________________
Help-grub mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-grub



reply via email to

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