Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 01 Oct 2018 20:41:55 +0200
From:      "Ronald Klop" <ronald-lists@klop.ws>
To:        freebsd-arm@freebsd.org, Victor <vdemart@gmail.com>
Subject:   Re: Booting the raspberry pi 2 from a usb hd
Message-ID:  <op.zp7x75e9kndu52@sjakie>
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 Mon, 01 Oct 2018 12:56:58 +0200, Victor <vdemart@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.
> 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?
> Ciao
> Vittorio

Booting a raspberry pi starts with u-boot. It is loaded from a msdos  
partition on the SD-card.
U-boot loads the FreeBSD boot loader, which knows how to load the kernel.  
A modern u-boot can load the FreeBSD boot loader from USB.

An alternative is to have the FreeBSD /boot dir on the SD and load all the  
rest from the SSD.

This is the relevant part of my fstab:
/dev/gpt/ssdrootfs	/       ufs     rw,noatime      1       1
/dev/ufs/rootfs		/bootdir       ufs     rw,noatime      1       1
/dev/msdosfs/MSDOSBOOT	/boot/msdos msdosfs rw,noatime 0 0

And a symlink to keep it together:
$ ls -l /boot
lrwxr-xr-x  1 root  wheel  12 Jul 15 17:38 /boot@ -> bootdir/boot

A little bit more information:
https://wiki.freebsd.org/FreeBSD/arm/Raspberry%20Pi
https://wiki.freebsd.org/FreeBSD/arm/U-Boot-ports
https://wiki.freebsd.org/RootOnZFS/UFSBoot

Regards,
Ronald.



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