Using boot0 to redirect booting to another disk?
José María Alcaide
josemaria.alcaide at ehu.es
Wed Dec 3 17:44:24 UTC 2014
> El 3/12/2014, a las 15:36, Warren Block <wblock at wonkity.com> escribió:
>
>> On Wed, 3 Dec 2014, José María Alcaide wrote:
>>
>> I have an HP Proliant Microserver Gen8. Nice machine but picky BIOS. When its hard disk controller is configured in SATA AHCI mode, there is no way to choose the boot disk among those connected to the SATA ports. I have four HDD attached to the backplane, and another drive connected to a fifth SATA port originally intended for an optical drive. The four HDD are arranged in a RAIDZ. Currently the machine is booting from an USB flash device, but I would like to boot the FreeBSD installed on fifth drive. The disk controller sees and reports the five disks just fine, but as I said above, there is no way to choose the fifth disk as a boot device.
>
> Because the BIOS assumes that fifth drive is always a CD? And presumably that fifth connection is lower bandwidth so switching one of the ZFS drives and the boot drives could impact array performance.
No, the BIOS does not offer any choice among drives connected to the SATA controller in AHCI mode, period. When it tries to boot from the SATA controller, it reads the boot sector solely from the drive installed in the first bay. As I said, it's a picky BIOS.
>> I wondered whether I could use boot0 to redirect the boot from a USB flash device (pendrive or, still better, a microSD) to the fifth drive. The idea comes from the fact that boot0 shows a "F5 - Drive 2" option when it detects more than one drive. I tried to understand how boot0 works reading its source code, and I experimented with the boot0cfg's "-d disk" and "-o setdrv" options, to no avail. So I decided to ask for help. :)
>
> boot0 is very limited, and it is not required to stick with only FreeBSD utilities on the USB drive since it is just loading the boot manager. Consider one of the more capable boot managers like Plop, SYSLINUX, or Grub2.
I considered GRUB2, but shortly after I began to read the docs I suffered a "brain fried" exception (and dumped core). I didn't know those other boot managers; thanks for the references.
Cheers,
--
Jose M. Alcaide
More information about the freebsd-fs
mailing list