Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Oct 2018 09:36:17 -0700
From:      Mark Millard <marklmi@yahoo.com>
To:        Victor <vdemart@gmail.com>
Cc:        freebsd-arm@freebsd.org
Subject:   Re: Booting the raspberry pi 2 from a usb hd
Message-ID:  <EE879646-197E-4E18-90D5-F8FA8C19355A@yahoo.com>
In-Reply-To: <A147F11E-3B87-4CB9-98AB-BC5CFB46C712@gmail.com>
References:  <A147F11E-3B87-4CB9-98AB-BC5CFB46C712@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 2018-Oct-1, at 3:56 AM, Victor <vdemart at gmail.com> wrote:

> I'm using a pi 2 card with FreeBSD 11.2-STABLE on the required sd =
card. It works like a charm but using it as a postgresql server with =
many write operation on it, to be on the safe side, I would like to move =
the operating system to an external hard-disk or ssd.=20
> I've been surfing the net to find if it is possible to boot my pi 2 =
from an external hard-disk (or SSD) to no avail.
> Could you please give me some hint, directions on this subject?

The notes below are not rpi2 specific. I've done such on
many systems, including an rpi2.

One technique is that /etc/fstab on the microsd card media that has
the kernel can redirect to another device for where to mount / . (I
use one partition for all of world.)

I also tend to have /boot/loader.conf copies that contain something
like:

kern.cam.boot_delay=3D10000
vfs.mountroot.timeout=3D10

to help make sure things are ready for the external storage device
to be used.

Additional notes:

I tend to install a full world on the microsd card slot media with
the kernel so that I can boot that if needed, absent the external
drive. (This involves the boot prompting for where to boot from.)
I tend to keep the extra world's configuration tracking nearly
all of the external device's world configuration. That includes
/boot/loader.conf . But my configurations are rather simple,
with little changed from defaults.

But this also means that I might not notice if more than the
files /etc/fstab and /boot/loader.conf from the microsd card
media are put to use.

For /etc/fstab I tend to have comments that point to the
microsd card media for quick editing for switching the
world device: just switch which lines are commented vs. not.

I also tend to install the kernel on the external media, even
though it is not booted from. So I end up having 2 installs
overall.

I tend to use various forms of labels and paths that reference
labels instead of directly using device names, path prefixes:
/dev/ufs/ /dev/msdosfs/ /dev/gpt/ /dev/label/

=3D=3D=3D
Mark Millard
marklmi at yahoo.com
( dsl-only.net went
away in early 2018-Mar)




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?EE879646-197E-4E18-90D5-F8FA8C19355A>