On 2011/12/27 07:12, jeff(a)bubble.org wrote:
> On Sun, Dec 25, 2011 at 2:37 PM, Jeffrey
Ross<jeff(a)bubble.org> wrote:
>> Is there a way to identify which disk the BIOS is using to boot from (eg
>> disk 0 or 1) when I don't have physical access to the system to view the
>> BIOS settings?
>>
>> The situation is this, I have a machine at a remote location where the
>> system runs RAID-1 and both disks (0 and 1) can boot the system, I need
>> to
>> rewrite the boot sectors on the disks and I don't have easy access to
>> the
>> machine so I have to be careful as to which order I do them.
>
> If both disks have identical bootloaders, I'm not sure there's any way
> from a running system to check which one you booted from. If you
> don't mind rebooting it, you could add a different arbitrary kernel
> argument to the GRUB configuration of each disk's bootloader, reboot
> the machine, then check /proc/cmdline to see which one shows up.
>
> That being said, why does the order matter? So long as you do both
> correctly before rebooting the machine all should be well.
>
In this case it turns out it was booting off of sda (which is what I
suspected), I ended up taking a ride down to the datacenter and verifying
the BIOS.
The original question although no longer important remains, can you tell
which disk the initial load occurred from? I did run dmidecode and found
nothing of value.
Thanks, Jeff
Jeff, you might get somewhere reading the grub configuration files or out
of fstab. Beyond that it's hard to say. For the fstab route you'd probably
have to check against UUIDs. But that's not too hard. Worst case your dmesg
information right after you boot or in /var/log/dmesg could probably be
decoded to tell you what's up.
{^_^}