All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Grégoire Sutre" <gregoire.sutre@gmail.com>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: Is it possible to have grub2's boot.img as my MBR, but have	it look in a separate partition for core.img?
Date: Fri, 29 Jan 2010 10:48:58 +0100	[thread overview]
Message-ID: <4B62AF0A.3000305@gmail.com> (raw)
In-Reply-To: <loom.20100129T063831-47@post.gmane.org>

Wesley Smith wrote:

> Thanks for your help, but no, it appears you cannot do this by simply using
> "grub-install /dev/sdx". I tried this, and yes, it did make the target
> partition bootable (it contained a Grub loader in its PBR). However, to ensure
> the disk MBR had also been updated and was now getting its core.img file from
> the /boot partition and not from the sectors immediately following it, I built
> a dummy track containing just the MBR post-"grub-install" and nothing but zeros
> after, and then I copied it to /dev/sda:
> 
> dd if=/dev/zero of=/track.image bs=512 count=63
> dd if=/dev/sda of=/track.image bs=512 count=1 conv=notrunc
> dd if=/track.image of=/dev/sda bs=512 count=63

I believe that you should replace the GRUB MBR code with an ``MS-DOS 
like'' MBR that looks for the first active partition and boots it.  Here 
you keep the old GRUB MBR code that will try to load core.img from the 
first track.

I guess that you can get such an MBR boot code from many places (I 
personally use the NetBSD boot selector) and then you simply:

dd if=<the mbr boot code> of=/dev/sda bs=446 count=1

Well, I'm no expert, but that always worked for me.

Grégoire



      parent reply	other threads:[~2010-01-29  9:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-28  3:37 Is it possible to have grub2's boot.img as my MBR, but have it look in a separate partition for core.img? Wesley Smith
2010-01-28 11:45 ` Colin Watson
2010-01-28 14:11   ` edgar.soldin
2010-01-28 14:55     ` Colin Watson
2010-01-28 16:39       ` edgar.soldin
     [not found]         ` <ca0f59981001280857p5f581035n4cd8519efda30e8@mail.gmail.com>
2010-01-28 17:15           ` edgar.soldin
     [not found]             ` <ca0f59981001280936o4457ff96wc95dad6f238ff461@mail.gmail.com>
2010-01-28 17:41               ` edgar.soldin
2010-01-29  5:43   ` Wesley Smith
2010-01-29  6:19     ` Bruce Dubbs
2010-01-29  9:54       ` Wesley Smith
2010-01-29  9:48     ` Grégoire Sutre [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B62AF0A.3000305@gmail.com \
    --to=gregoire.sutre@gmail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.