Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 16 Aug 2012 15:15:42 +0400
From:      Andrey Zonov <andrey@zonov.org>
To:        Daniel Braniss <danny@cs.huji.ac.il>
Cc:        Garrett Cooper <yanegomi@gmail.com>, freebsd-hackers@freebsd.org
Subject:   Re: GPT boot from 2nd. disk fails
Message-ID:  <502CD65E.4010900@zonov.org>
In-Reply-To: <E1T1uAI-0008mU-OK@kabab.cs.huji.ac.il>
References:  <E1T1YwR-000Gfo-O4@kabab.cs.huji.ac.il> <CAGH67wRf9gpJen%2BVC6OzePLDwWE3dC_T9Ve6DPKs=12N6VuMMA@mail.gmail.com> <201208151116.21461.jhb@freebsd.org> <E1T1uAI-0008mU-OK@kabab.cs.huji.ac.il>

next in thread | previous in thread | raw e-mail | index | archive | help
On 8/16/12 11:06 AM, Daniel Braniss wrote:
>> On Wednesday, August 15, 2012 4:46:28 am Garrett Cooper wrote:
>>> On Wed, Aug 15, 2012 at 1:27 AM, Daniel Braniss <danny@cs.huji.ac.il> wrote:
>>>> hi,
>>>> this host has to disks:
>>>> sa0> gpart show
>>>> =>       34  976773101  ada0  GPT  (465G)
>>>>           34        128     1  freebsd-boot  (64k)
>>>>          162    4194304     2  freebsd-ufs  (2.0G)
>>>>      4194466   33554432     3  freebsd-swap  (16G)
>>>>     37748898  939024237     4  freebsd-zfs  (447G)
>>>>
>>>> =>       34  976773101  ada1  GPT  (465G)
>>>>           34        128     1  freebsd-boot  (64k)
>>>>          162    4194304     2  freebsd-ufs  [bootme]  (2.0G)
>>>>      4194466    8388608     3  freebsd-swap  (4.0G)
>>>>     12583074  964190061     4  freebsd-zfs  (459G)
>>>>
>>>> but no amount of magic will cause boot from the second disk, it will
>> always
>>>> boot from the first disk.
>>>>
>>>> any insights?
>>>
>>>      Use boot0cfg -s 5 (untested with GPT disks)?
>>
>> Will not work with GPT disks.  They use /boot/pmbr to boot, not /boot/boot0.
>>
>> If you can get your BIOS to explicitly boot ada1 from the start via a BIOS
>> setting, that should work.  Another option would be to break into gptboot's
>> prompt (similar to breaking into boot2) aud typing in 'ad1p2:/boot/loader' or
>> some such.  If that works you should even be able to write that to
>> /boot.config on ada0p2's filesystem.
>
> sorry, as usual my questions are a bit terse :-),
> I want to switch between roots either at boot time (this is very tricky now,
> since breaking into boot2 needs very fast fingers) or before reboot.
> btw, it's 1:ad(0p2)/boot/loader
> also, since the disks are hot swap, i can switch between them, but I realy
> want to do it via software!
>
> the bootme trick did work, on a different host/setup and sometime ago.
>
> before GPT, when we had MBR, I could switch between slices/partitions either
> via the menu or via boot0cfg, so maybe I should go back to mbr.
>

You can erase boot record of the first disk, then your BIOS will try to 
use second one.  Be careful, some BIOS'es try only first disk.


-- 
Andrey Zonov



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?502CD65E.4010900>