From owner-freebsd-fs@FreeBSD.ORG Mon Aug 27 10:00:04 2012 Return-Path: Delivered-To: freebsd-fs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 38B45106564A; Mon, 27 Aug 2012 10:00:04 +0000 (UTC) (envelope-from bu7cher@yandex.ru) Received: from forward4.mail.yandex.net (forward4.mail.yandex.net [IPv6:2a02:6b8:0:602::4]) by mx1.freebsd.org (Postfix) with ESMTP id 99DA38FC1B; Mon, 27 Aug 2012 10:00:03 +0000 (UTC) Received: from smtp3.mail.yandex.net (smtp3.mail.yandex.net [77.88.46.103]) by forward4.mail.yandex.net (Yandex) with ESMTP id 7EB621BC188B; Mon, 27 Aug 2012 14:00:02 +0400 (MSK) Received: from smtp3.mail.yandex.net (localhost [127.0.0.1]) by smtp3.mail.yandex.net (Yandex) with ESMTP id 5462F1BA034A; Mon, 27 Aug 2012 14:00:02 +0400 (MSK) Received: from ns.kirov.so-ups.ru (ns.kirov.so-ups.ru [178.74.170.1]) by smtp3.mail.yandex.net (nwsmtp/Yandex) with ESMTP id 01tWKcqZ-01tSEMho; Mon, 27 Aug 2012 14:00:01 +0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.ru; s=mail; t=1346061602; bh=BTmTPo7MmQGIWbcbXKT3oxMZrS8YqmsHBJ1nQN8wW0A=; h=Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject: References:In-Reply-To:X-Enigmail-Version:Content-Type: Content-Transfer-Encoding; b=D0ML9FEeO94mZJejUf61KwcELg32XbcxUFng/GIIVK5cFgy69dliprGsb290COFdc MX/QQFfQNTsdygk4Z3RRjwlALYYOxmGdwdA9lJ7sencFHJn/SfkB7sowZHqHXwvZAb bs9Gy2eXzbpWjRlal817+U+MdQvX0jb7xoNP+Oqg= Message-ID: <503B4521.9080603@yandex.ru> Date: Mon, 27 Aug 2012 14:00:01 +0400 From: "Andrey V. Elsukov" User-Agent: Mozilla Thunderbird 1.5 (FreeBSD/20051231) MIME-Version: 1.0 To: Jeremie Le Hen References: <20120827070210.GA798@felucia.tataz.chchile.org> In-Reply-To: <20120827070210.GA798@felucia.tataz.chchile.org> X-Enigmail-Version: 1.4.2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 7bit Cc: freebsd-fs@FreeBSD.org Subject: Re: Cannot get zfsboot prompt X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Aug 2012 10:00:04 -0000 On 27.08.2012 11:02, Jeremie Le Hen wrote: > I've struggled all over the weekend to make a remote machine full ZFS. > I did it once last year. I already struggled a lot at that time by the > way so I took notes, but it doesn't work (see below for a manuel > screenshot): > > The server is using the mbr partitionning scheme, with one slice -- > ada0s1. There is a BSD label on it with two partitions, ada0s1a which > is used in the zpool and ada0s1b which is used for swap/dump. > > I've set up boot0 and it works correctly: > gpart bootcode -b /mnt/boot/boot0 ada0 > I've then set up zfsboot: > dd if=/mnt/boot/zfsboot of=/dev/ada0s1 count=1 > dd if=/mny/boot/zfsboot of=/dev/ada0s1a skip=1 seek=1024 Hi, When i'm configuring ZFS-only system, usually i do the following steps: 1. zpool create -R /mnt bsdroot ada0s1a 2. Create several filesystems and install the system. 3. zpool set bootfs=bsdroot/root bsdroot 4. zpool set cachefile=/mnt/boot/zfs/zpool.cache bsdroot 5. echo 'vfs.root.mountfrom="zfs:bsdroot/root"' >> /boot/loader.conf echo 'zfs_load="YES"' >> /boot/loader.conf 6. echo 'zfs_enable="YES"' >> /etc/rc.conf 7. Add swap entry to the /etc/fstab 8. zpool set mountpoint=none bsdroot/root 9. zpool set mountpoint=none bsdroot 10. Write bootcode: > dd if=/mnt/boot/zfsboot of=/dev/ada0s1 count=1 > dd if=/mnt/boot/zfsboot of=/dev/ada0s1 skip=1 seek=1024 I guess your ada0s1a partition has non zero offset, and second part of zfsboot bootcode has been written into wrong place. AFAIK, the first part of the zfsboot does read the second part from the 1024 sector of the active FreeBSD slice in the MBR. -- WBR, Andrey V. Elsukov