From owner-freebsd-stable@freebsd.org Thu Jan 12 21:55:10 2017 Return-Path: Delivered-To: freebsd-stable@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E7990CAD8F7 for ; Thu, 12 Jan 2017 21:55:10 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: from mail-wm0-x229.google.com (mail-wm0-x229.google.com [IPv6:2a00:1450:400c:c09::229]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 79301106A for ; Thu, 12 Jan 2017 21:55:10 +0000 (UTC) (envelope-from killing@multiplay.co.uk) Received: by mail-wm0-x229.google.com with SMTP id c206so42187358wme.0 for ; Thu, 12 Jan 2017 13:55:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=multiplay-co-uk.20150623.gappssmtp.com; s=20150623; h=subject:to:references:cc:from:message-id:date:user-agent :mime-version:in-reply-to; bh=cFQIcc9ratLelzlIeLlGql+2h8F3FkWGQvQX/xV69NM=; b=LKsYTqivi+Slh39ycIOvBetg0YMxGv9LapupKxPRUvU+bvbnPzqerfWKFvUUNLTMIq VN3P9Ma65GLC6FSj6z5tIhu026E2Crx2bWVOLTjUz0W5qaIwVSwLWOMORRTKx9LsTFEx d9oP1KMDnQSmkSSt6KSz8XjjSzkA2+UAaO0S78YN3cqsy9zud7wuyvmZyJikLFvi6zJP PEmh0L85hQHJMQeaG9rfhUZrziUjQJRfpcIlVyETkSFl6BtUGYaZe2yL74OLPotcJymj Jgypgv5mLZJIuEjR6ONLlpFif/HSaQMZZCyrwO0ZrmgQWVG6CA5owPQBjILkV3QZssu2 Iy3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:references:cc:from:message-id:date :user-agent:mime-version:in-reply-to; bh=cFQIcc9ratLelzlIeLlGql+2h8F3FkWGQvQX/xV69NM=; b=mzSWGKVQvaqsJjyABEi/Gn4nl/dTDxr7q1FRZPNyCWdTZbLLGAQq0GQpM0dGeqbukl qthxbwYNFFKxN/BfflSt85jHSe4S4PVGcnQe/G2WpTCzPFNfRuWa3NDGn1uE8YFmDh3M PUsJGjzl3TwnEVyINXVxtnDnhLhAqifc5OY+kkcnxlI1TIhIYBQmZSy6W1KBIELX6grV cDGbPyZZBS6GMn73wXFVOL3D8DnuCUvgvsZr/6jlsgdk+Xm/PP+xDhQqFuFm0PGEWT/d zKuHtBBmfT5pvd3gwSkHqk6+60fegm2fHuFGFo+sSaN99FmLuNh9MkUJ1LuZlQFgGaEw QDIA== X-Gm-Message-State: AIkVDXIJqsyZq4aI523Vjmr1OZTx89jnn2exnaCNh22zKNNZzq+gRZrfAAfTQZSubPyENyql X-Received: by 10.28.158.196 with SMTP id h187mr165642wme.59.1484258108913; Thu, 12 Jan 2017 13:55:08 -0800 (PST) Received: from [10.10.1.58] ([185.97.61.26]) by smtp.gmail.com with ESMTPSA id a13sm5823704wma.0.2017.01.12.13.55.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 12 Jan 2017 13:55:08 -0800 (PST) Subject: Re: Can't boot on ZFS -- /boot/zfsloader not found To: Jeremie Le Hen References: Cc: freebsd-stable@freebsd.org From: Steven Hartland Message-ID: Date: Thu, 12 Jan 2017 21:55:15 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.23 X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 12 Jan 2017 21:55:11 -0000 On 12/01/2017 21:12, Jeremie Le Hen wrote: > Hey Steven, > > (Please cc: me on reply) > > On Thu, Jan 12, 2017 at 1:32 AM, Steven Hartlan >> The reason I'd recommend 512k for boot is to provide room for expansion >> moving forward, as repartitioning to upgrade is a scary / hard thing to do. >> Remember it wasn't long ago when it was well under 64k and that's what was >> recommend, its not like with disk sizes these days you'll miss the extra >> 384k ;-) > Yeah, that's wise you're right. > >> Boot to a live cd, I'd recommend mfsbsd, and make sure the boot loader was >> written to ALL boot disks correctly e.g. >> if you have a mirrored pool with ada0 and ada1: >> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 >> gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 >> >> If this doesn't help the output from gpart show, uname -a and zpool status >> would also be helpful. >> >> This is all assuming standard BIOS mode and not UEFI which is done >> differently. > I just use the installation media on an USB key and then drop to the > shell. This is a full FreeBSD running, so that's fine. > > % # gpart show ada0 > % => 40 312581728 ada0 GPT (149G) > % 40 1024 1 freebsd-boot (512K) > % 1064 8387840 2 freebsd-swap (4.0G) > % 8388904 304192864 3 freebsd-zfs (145G) > % > % # uname -a > % FreeBSD 11.0-RELEASE-p1 FreeBSD 11.0-RELEASE-p1 #0 r306420: Thu Sep > 29 01:43:23 UTC 2016 % % > root@releng2.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 > % > % # zpool status > % pool: zroot > % state: ONLINE > % scan: none requested > % config: > % > % NAME STATE READ > WRITE CKSUM > % zroot ONLINE 0 > 0 0 > % gptid/1c387d3b-d892-11e6-944b-f44d30620eeb ONLINE 0 > 0 0 > % > % errors: No known data errors > > Here are the steps to write the bootloader: > > % # gpart bootcode -b /boot/pmbr -p /boot/gptzfsboot -i 1 ada0 > % partcode written to ada0p1 > % bootcode written to ada0 > % # zpool get bootfs zroot > % NAME PROPERTY VALUE SOURCE > % zroot bootfs zroot local Two things spring to mind Idea 1: Is your root fs actually your direct pool or is it actually /root off your pool. If so you want to run: zpool set bootfs=zroot/root zroot Idea 2: You mentioned in your original post and you used zfs send / recv to restore the pool, so I wonder if your cache file is out of date. Try the following: |zpool export zroot zpool import -R /mnt -o cachefile=/boot/zfs/zpool.cache zroot cp /boot/zfs/zpool.cache /mnt/boot/zfs/zpool.cache zpool set bootfs=zroot/root zroot Regards Steve |