help-grub
[Top][All Lists]
Advanced

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

Re: Grub rescue


From: Jordan Uggla
Subject: Re: Grub rescue
Date: Tue, 26 Mar 2013 14:01:35 -0700

On Tue, Mar 26, 2013 at 1:48 PM, Chris Murphy <address@hidden> wrote:
>
> On Mar 26, 2013, at 1:46 PM, David WE Roberts <address@hidden> wrote:
>>
>> However to me what I am doing is very simple.
>>
>> I am booting grub from MBR on disc /dev/sda.
>>
>> It is loading the main part of grub from /dev/sdb1 on MBR disc /dev/sdb.
>
> I can't imagine this is workable at all ever.

It is workable if you consider the "main part" of grub to be the files
in /boot/grub/. As you later mentioned, if the core.img is embedded in
sda, that core.img can read /boot/grub/ from a GPT partition on sdb
without any issue. It should just work. So I think that your technical
understanding is good, but I interpreted David's sentence differently.
A big thing to remember is that grub-install completed without any
errors and without any --force argument, which means that, barring
misconfiguration (installing to the wrong boot sector) or BIOS bugs
(or grub bugs, though I don't expect we're hitting one here), the
resulting install should be reliable.

>
> a.) the jump code on sda's MBR I don't think can jump to another device 
> entirely, just to another LBA on that drive.

Indeed, while it's technically possible, it would be incredibly
unreliable, there's just not enough space in 446 bytes to do this
reliably. Because of this, grub-install only supports cross-disk
installations when embedding in the "first" disk is possible.

>
> b.) Installing grub to ext partitions isn't recommended, hence I don't expect 
> it's supported. The only way to get it there would be if core.img is already 
> in /boot/grub on sdb1, and you use --force with grub-install to place the 
> blocklist into the ext VBR.

I don't think that they were ever trying to install grub's boot sector
to anything but the MBR, and of course /boot/grub/ can be anywhere.

>
> In any case there isn't a way for grub-install to put the MBR jump code on 
> one drive but install core.img somewhere else. The prescribed manner is they 
> both go on the same disk, and core.img goes in the MBR gap.\

Completely correct.

>> I am still booting initially (first bits of grub) off MBR disc /dev/sda
>> with the expectation that grub will be able to see /dev/sdb2 on the GPT
>> disc and find /boot/grub with all the information it requires to complete
>> booting.
>
> Expectations are flawed.

I think this expectation is completely reasonable, as explained above
(grub-install will just embed the core.img in sda's post-mbr gap and
the core.img will read the GPT label from sdb and find /boot/grub/).

>
>>
>> I have assumed that this is what 'part_gpt' is supposed to do. i.e. it
>> should be able to recognise a GPT disc, recognise the partitions within
>> that disc, and then enable grub to access data from one of the partitions.
>
> According to your ls, it's not even seeing the 2nd disk at all let alone its 
> partitions. It's only seeing (hd0) and that indicates a BIOS limitation.

I agree that a BIOS bug is likely, though I'm still waiting on boot
info script output and the output of "mount" when grub-install was run
to confirm my understanding of the current configuration.

-- 
Jordan Uggla (Jordan_U on irc.freenode.net)



reply via email to

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