[Top][All Lists]

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

Re: Is it possible to have grub2's boot.img as my MBR, but have it look

From: Grégoire Sutre
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
User-agent: Mozilla-Thunderbird (X11/20090707)

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.


reply via email to

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