From owner-freebsd-arm@freebsd.org Mon Oct 1 18:42:05 2018 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3C6F410A706D for ; Mon, 1 Oct 2018 18:42:05 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D30A686BC7 for ; Mon, 1 Oct 2018 18:42:04 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.110.112]) by smarthost1.greenhost.nl with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1g738l-00072w-Eq; Mon, 01 Oct 2018 20:41:55 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-arm@freebsd.org, Victor Subject: Re: Booting the raspberry pi 2 from a usb hd References: Date: Mon, 01 Oct 2018 20:41:55 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50 autolearn=disabled version=3.4.0 X-Scan-Signature: 9090f8a1960d7f777b94d17b6f36e747 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Oct 2018 18:42:05 -0000 On Mon, 01 Oct 2018 12:56:58 +0200, Victor 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.