[prev in list] [next in list] [prev in thread] [next in thread]
List: grub-help
Subject: RE: Help-grub Digest, Vol 18, Issue 12
From: Jorge Canas <jcanas2000 () hotmail ! com>
Date: 2009-08-06 20:28:57
Message-ID: COL108-W26B2AE1AB92B40B57E004D90A0 () phx ! gbl
[Download RAW message or body]
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 <adrian15sgd@gmail.com> 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®.
http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009
[Attachment #3 (text/html)]
<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Verdana
}
</style>
</head>
<body class='hmmessage'>
Thanks for your responses.<br><br>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.<br><br>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.<br><br>Thanks!<br><br>- Jorge<br><br><br><br>> I believe that grub records \
the location of the next stage within the<br>> initial boot loader code there. \
You are correct in that it is safe to copy<br>> the MSDOS era boot loaders in that \
way; they search for a flag (boot/active)<br>> on a primary partition and chain a \
loader within that.<br>> <br>> What you should do to recover from this is, \
using the recovery CD do the<br>> following:<br>> <br>> Mount your root \
partitions somewhere<br>> mount -o bind /dev (/root/partition)/dev<br>> mount \
-o bind /sys (/root/partition)/sys<br>> mount -o bind /proc \
(/root/partition)/proc<br>> chroot (/root/partition) /bin/bash<br>> ( /bin/sh \
will likely also work, but you're probably used to bash in<br>> interactive mode \
)<br>> standard grub setup / reinstall commands for your distribution.<br>> \
<br>> In my case I'd manually invoke the grub shell, usually with a \
specified<br>> device map file, and then<br>> \
http://www.gnu.org/software/grub/manual/html_node/Installing-GRUB-natively.html.<br>> \
<br>> On Wed, Jul 29, 2009 at 7:39 AM, adrian15 <adrian15sgd@gmail.com> \
wrote:<br>> <br>> > Jorge Canas escribió:<br>> ><br>> >> If \
the first 446 bytes of the MBR can be reused, even if the harddrives<br>> >> \
are of different size, then can someone please throw me a bone and explain<br>> \
>> why cloning the MBR as described here does not produce a bootable \
harddrive?<br>> >><br>> ><br>> > I think that you are talking \
about Grub legacy and I do not know if it is<br>> > currently supported in this \
mailing list.<br>> ><br>> > Grub legacy uses something called stage1_5 \
which it is stored between MBR<br>> > end and the first partition \
beginning.<br>> ><br>> > As long as you are not copying it the boot \
fails.<br>> > I do not know how to copy stage1_5 but it can be done.<br>> \
><br>> > Another workaround is to force grub not to link stage1 to stage1_5 \
which<br>> > can be done with install command manually or using the Super Grub \
Disk's<br>> > hacked's grub's setup command. But it is not recommended.<br>> \
><br>> > adrian15<br><br /><hr />Express your personality in color! Preview \
and select themes for Hotmail®. <a \
href='http://www.windowslive-hotmail.com/LearnMore/personalize.aspx?ocid=PID23391::T:WLMTAGL:ON:WL:en-US:WM_HYGN_express:082009' \
target='_new'>Try it now.</a></body> </html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic