From owner-freebsd-embedded@FreeBSD.ORG Thu Jul 9 12:37:35 2009 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C7131065670 for ; Thu, 9 Jul 2009 12:37:35 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-vw0-f172.google.com (mail-vw0-f172.google.com [209.85.212.172]) by mx1.freebsd.org (Postfix) with ESMTP id 0D3188FC1A for ; Thu, 9 Jul 2009 12:37:34 +0000 (UTC) (envelope-from cochard@gmail.com) Received: by vwj2 with SMTP id 2so72189vwj.3 for ; Thu, 09 Jul 2009 05:37:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:from:date:x-google-sender-auth:message-id:subject:to :content-type:content-transfer-encoding; bh=vaci0Z3EjbbT+KFKmSn3X97F2SD0nguHiCTalLcai1o=; b=H07xxbBXn+FID8Kz+7Ti8YpSADBzJThStEjbcrwMpa8tlrbx37NcM9k0nye8Ba99cE kItSXseAYqYpGgj6gx9zyLNrB9N6MJ+Jo84gzu6ZNhDcIKnv8RJgWKDn/+3VpIA0MFy3 IZqNPVCyB8fPQzfrNKIsRalQS8WFri4R1wAMY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:content-type :content-transfer-encoding; b=htKlzJi0vWGQH8npzKUwhkXr59CXrBZf87T+IenOfhcoj6qEE6HNP+JLhN65Qpce6i 00+D5fRLM4HU6wSawkxlhoJ87vtMJxsDfUTfClVn7wS2JY/VB4z1dmGF5LiCFNo/coDZ GG1wXIfkuzYDl8xF70QeU27ofju68QTPQKSxI= MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.220.45.198 with SMTP id g6mr934948vcf.34.1247143054151; Thu, 09 Jul 2009 05:37:34 -0700 (PDT) In-Reply-To: <20090707125458.GA2233@psconsult.nl> References: <3131aa530907051440l7ea1fa87y13edb3595fcf93e1@mail.gmail.com> <20090707125458.GA2233@psconsult.nl> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Thu, 9 Jul 2009 14:37:13 +0200 X-Google-Sender-Auth: 5ee8724559e8d074 Message-ID: <3131aa530907090537y5beac77ya8521b9834fd9ef2@mail.gmail.com> To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Subject: Re: Patch for adding label support to NanoBSD X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Jul 2009 12:37:35 -0000 Hi, > I like the idea but what does this mean for upgrading existing NanoBSD > installations? =A0From reading the patch it looks like the new _.disk.ima= ge > file is not compatible with an existing installation and would be a POLA > violation. > > Perhaps a configuration option to choose between the old and new naming > can be added? The 3 differences between the new and old nanobsd file are: 1. The new don't have the /etc/nanobsd.conf file (not needed anymore) 2. The new have slice labelled 3. The new use label in its fstab Then, if you are using an "old" nanobsd system, it should be possible to upgrade it to a "new" by: 1.use "old" updatep1 or updatep2 for installing the new system 2.use tunefs -L for label the slice, for example tunefs -L nanobsd1 /dev/ad0s1a tunefs -L nanobsd2 /dev/ad0s2a tunefs -L cfg /dev/ad0s3 tunefs -L data /dev/ad0s4 3. modify the /etc/fstab on the mounted upgraded slice for configuring the correct label name for the / (nanobsd1 or nanobsd2) I don't know if it's usefull to include a kind of old2new() function in the upgrade script ? (But the "old" system can't have this "new" script). > Notes on the script itself: > =A0- use glabel status instead of glabel list to find the provider name, = this > =A0 makes the script easier to follow and less vulnerable to future chang= es > =A0 in the (verbose) output of glabel list. Done, thanks for the tips. > =A0- # Check and set final >>varible<< should be spelled variable. Done too... Regards, Olivier