Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Najeb-0002pq-HP for mharc-grub-devel@gnu.org; Fri, 29 Jan 2010 00:44:25 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1NajeZ-0002pd-CS for grub-devel@gnu.org; Fri, 29 Jan 2010 00:44:23 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1NajeU-0002ng-BZ for grub-devel@gnu.org; Fri, 29 Jan 2010 00:44:22 -0500 Received: from [199.232.76.173] (port=51973 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1NajeU-0002nX-8l for grub-devel@gnu.org; Fri, 29 Jan 2010 00:44:18 -0500 Received: from lo.gmane.org ([80.91.229.12]:38973) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1NajeT-0002Gb-Jj for grub-devel@gnu.org; Fri, 29 Jan 2010 00:44:17 -0500 Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1NajeP-0008An-VQ for grub-devel@gnu.org; Fri, 29 Jan 2010 06:44:14 +0100 Received: from cpe-98-14-168-185.nyc.res.rr.com ([98.14.168.185]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Jan 2010 06:44:13 +0100 Received: from wsmithgnu by cpe-98-14-168-185.nyc.res.rr.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 29 Jan 2010 06:44:13 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: grub-devel@gnu.org From: Wesley Smith Date: Fri, 29 Jan 2010 05:43:53 +0000 (UTC) Message-ID: References: <20100128114547.GI4409@riva.ucam.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: sea.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 98.14.168.185 (Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.3) Gecko/20091020 Ubuntu/9.10 (karmic) Firefox/3.5.3) Sender: news X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) 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? X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jan 2010 05:44:23 -0000 Colin Watson ubuntu.com> writes: > ... > Yes, you can do this by using 'grub-install /dev/sda1' (or whatever the > device name for your /boot partition is). 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 If the MBR no longer needs the embedded core.img, then it being replaced with empty sectors shouldn't bother Grub the slightest. Unfortunately, upon reboot I was greeted only with the word "GRUB" and a blinking cursor, which I took to mean it couldn't find core.img and was unable to proceed. It would be nice if Grub2 could both make a partition bootable and also install an MBR that relied on that partition (rather than the embedded core.img). I know this is "dangerous," but it is necessary sometimes, and it was not at all difficult to accomplish with legacy Grub. > Note that this setup typically requires the use of blocklists, which are > inherently unreliable. For example, you may find that you need to > re-run grub-install after certain filesystem operations; see the "And > blocklists?" section of http://grub.enbug.org/BIOS_Boot_Partition for a > description of the problem. This problem was present in GRUB Legacy as > well, although it did not warn about it. >