help-grub
[Top][All Lists]
Advanced

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

RE: Help-grub Digest, Vol 18, Issue 12


From: Jorge Canas
Subject: RE: Help-grub Digest, Vol 18, Issue 12
Date: Thu, 6 Aug 2009 16:28:57 -0400

Thanks for your responses.

For documentation purposes, I would like to add that I have indeed verified that dd'ing only the first 512 bytes of the hard drive (i.e. the MBR or LBA Sector 0) will NOT make the new hard drive a bootable drive, at least not in my setup.

The reason for that is that GRUB Legacy is writing some instructions to the next few sectors that follow the MBR.  I do not know if Grub Legacy does this on all setups or if just does this on those which have a "DOS compatible" partition table (see "--DOS" flag for sfdisk) like mine.

Thanks!

- Jorge



> 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


Express your personality in color! Preview and select themes for Hotmail®. Try it now.

reply via email to

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