Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 8 Jun 2016 15:37:38 -0700
From:      Russell Haley <russ.haley@gmail.com>
To:        Tom Vijlbrief <tvijlbrief@gmail.com>
Cc:        freebsd-arm <freebsd-arm@freebsd.org>
Subject:   Re: Root on USB stick
Message-ID:  <CABx9NuS85z7V67F5PqRfn3D-BxMmfuV0MVF2yKG86A0fjWxHCA@mail.gmail.com>
In-Reply-To: <CABx9NuTJRNp5R=8cJCCxRW-D5GHJ6-TT4kV59rzKuydRP%2Bce4Q@mail.gmail.com>
References:  <20160606063242.GA9594@metron.com> <CAOQrpVdzUjV2mT=vTfw=JjTnVdeBrU2jFFpu9dC7h_7PA-xG6w@mail.gmail.com> <CABx9NuTJRNp5R=8cJCCxRW-D5GHJ6-TT4kV59rzKuydRP%2Bce4Q@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Jun 8, 2016 at 9:46 AM, Russell Haley <russ.haley@gmail.com> wrote:
> On Mon, Jun 6, 2016 at 10:41 PM, Tom Vijlbrief <tvijlbrief@gmail.com> wrote:
>> Op ma 6 jun. 2016 08:33 schreef Lou Katz <pi@metron.com>:
>>
>>> Where does the FreeBSD boot loader for Pi2 know about or find out
>>> where the root partition is? I need to boot from an image in the
>>> micro slot that I cannot remove (because I broke the push-pull mechanism)
>>> but use a root parition on another card accessed through a USB port.
>>>
>>> There seems to have been a way to do this with FreeBSD 10, but I cannot
>>> find it in FreeBSD 11.
>>>
>>
>> My
>>
>> /boot/loader.conf
>>
>> (on the sd-card root) has
>>
>> vfs.root.mountfrom="ufs:/dev/ufs/bsd11"
>>
>> to boot from an attached usb stick.
>>
>> You could use eg /dev/da1s1a instead of a UFS label.
>
> Hi,
>
> I was looking for something like that in man pages but it's not
> documented anywhere that is easily found. Even searching the loader(8)
> and loader.conf page doesn't seem to show anything?

Okay, I went  back through my old emails. Here is a clue from Ian
Lapore discussing netboot/nfs root:

"When ubldr loads the kernel via nfs, it also sets up all the info
needed to mount root via nfs and passes the info to the kernel in env
vars.  It will also set vfs.root.mountfrom to the server:path you set
in the rootpath var in uboot, which gets the initial root fs mount
done.  You still need an /etc/fstab that also has the nfs mount info
for the nfsroot, so that the rc scripts can remount root writable.

All you need in the kernel config is options NFSCL, NFSLOCKD, NFS_ROOT
and all of those are already standard in all armv6 kernels.  You don't
need to change the ROOTDEVNAME option because the vfs.root.mountfrom
overrides it (ROOTDEVNAME is used as a fallback if the nfs mount
fails)."

So it looks like my advice is wrong and Mr. Vijlbrief is correct.

Cheers,

Russ



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