Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Dec 2014 07:36:36 -0700 (MST)
From:      Warren Block <wblock@wonkity.com>
To:        =?ISO-8859-15?Q?Jos=E9_Mar=EDa_Alcaide?= <josemaria.alcaide@ehu.es>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Using boot0 to redirect booting to another disk?
Message-ID:  <alpine.BSF.2.11.1412030726180.84718@wonkity.com>
In-Reply-To: <27E65CD9-4C97-4528-B218-A01EDB1B8CB1@ehu.es>
References:  <27E65CD9-4C97-4528-B218-A01EDB1B8CB1@ehu.es>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

> 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.

http://www.plop.at/en/bootmanager/index.html
http://www.syslinux.org/wiki/index.php/The_Syslinux_Project
   or sysutils/syslinux
https://www.gnu.org/software/grub/
   or sysutils/grub2
From owner-freebsd-fs@FreeBSD.ORG  Wed Dec  3 17:44:24 2014
Return-Path: <owner-freebsd-fs@FreeBSD.ORG>
Delivered-To: freebsd-fs@freebsd.org
Received: from mx1.freebsd.org (mx1.freebsd.org
 [IPv6:2001:1900:2254:206a::19:1])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by hub.freebsd.org (Postfix) with ESMTPS id A59B9DD
 for <freebsd-fs@freebsd.org>; Wed,  3 Dec 2014 17:44:24 +0000 (UTC)
Received: from smtp.ehu.es (smtp.lg.ehu.es [158.227.0.66])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (Client did not present a certificate)
 by mx1.freebsd.org (Postfix) with ESMTPS id 5B5351C9
 for <freebsd-fs@freebsd.org>; Wed,  3 Dec 2014 17:44:23 +0000 (UTC)
Received: from smtp.ehu.es (localhost.localdomain [127.0.0.1])
 by postfix.imss71 (Postfix) with ESMTP id 89B4025C6E;
 Wed,  3 Dec 2014 18:44:18 +0100 (CET)
Received: from [10.0.1.17] (229.83-213-67.dynamic.clientes.euskaltel.es
 [83.213.67.229]) by smtp1 (Postfix) with ESMTPSA id B8F7124977;
 Wed,  3 Dec 2014 18:44:17 +0100 (CET)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (1.0)
Subject: Re: Using boot0 to redirect booting to another disk?
From: =?utf-8?Q?Jos=C3=A9_Mar=C3=ADa_Alcaide?= <josemaria.alcaide@ehu.es>
X-Mailer: iPad Mail (12B435)
In-Reply-To: <alpine.BSF.2.11.1412030726180.84718@wonkity.com>
Date: Wed, 3 Dec 2014 18:44:18 +0100
Content-Transfer-Encoding: quoted-printable
Message-Id: <9F8C856D-40DF-44EF-9FA9-6AC7D513C5D7@ehu.es>
References: <27E65CD9-4C97-4528-B218-A01EDB1B8CB1@ehu.es>
 <alpine.BSF.2.11.1412030726180.84718@wonkity.com>
To: Warren Block <wblock@wonkity.com>
X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4
 (smtp1 [0.0.0.0]); Wed, 03 Dec 2014 18:44:18 +0100 (CET)
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.4
 (postfix.imss71 [0.0.0.0]); Wed, 03 Dec 2014 18:44:18 +0100 (CET)
Cc: "freebsd-fs@freebsd.org" <freebsd-fs@freebsd.org>
X-BeenThere: freebsd-fs@freebsd.org
X-Mailman-Version: 2.1.18-1
Precedence: list
List-Id: Filesystems <freebsd-fs.freebsd.org>
List-Unsubscribe: <http://lists.freebsd.org/mailman/options/freebsd-fs>,
 <mailto:freebsd-fs-request@freebsd.org?subject=unsubscribe>
List-Archive: <http://lists.freebsd.org/pipermail/freebsd-fs/>;
List-Post: <mailto:freebsd-fs@freebsd.org>
List-Help: <mailto:freebsd-fs-request@freebsd.org?subject=help>
List-Subscribe: <http://lists.freebsd.org/mailman/listinfo/freebsd-fs>,
 <mailto:freebsd-fs-request@freebsd.org?subject=subscribe>
X-List-Received-Date: Wed, 03 Dec 2014 17:44:24 -0000

> El 3/12/2014, a las 15:36, Warren Block <wblock@wonkity.com> escribi=C3=B3=
:
>=20
>> On Wed, 3 Dec 2014, Jos=C3=A9 Mar=C3=ADa Alcaide wrote:
>>=20
>> 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 t=
o choose the boot disk among those connected to the SATA ports. I have four H=
DD attached to the backplane, and another drive connected to a fifth SATA po=
rt originally intended for an optical drive. The four HDD are arranged in a R=
AIDZ. 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 t=
o choose the fifth disk as a boot device.
>=20
> Because the BIOS assumes that fifth drive is always a CD?  And presumably t=
hat fifth connection is lower bandwidth so switching one of the ZFS drives a=
nd the boot drives could impact array performance.

No, the BIOS does not offer any choice among drives connected to the SATA co=
ntroller in AHCI mode, period. When it tries to boot from the SATA controlle=
r, it reads the boot sector solely from the drive installed in the first bay=
. As I said, it's a picky BIOS.=20

>> I wondered whether I could use boot0 to redirect the boot from a USB flas=
h 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 detect=
s more than one drive. I tried to understand how boot0 works reading its sou=
rce code, and I experimented with the boot0cfg's "-d disk" and "-o setdrv" o=
ptions, to no avail. So I decided to ask for help. :)
>=20
> boot0 is very limited, and it is not required to stick with only FreeBSD u=
tilities on the USB drive since it is just loading the boot manager. Conside=
r 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 man=
agers; thanks for the references.


Cheers,

--
Jose M. Alcaide=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1412030726180.84718>