From owner-freebsd-stable@FreeBSD.ORG Thu Jun 9 07:57:02 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3D5E5106566B for ; Thu, 9 Jun 2011 07:57:02 +0000 (UTC) (envelope-from nickolasbug@gmail.com) Received: from mail-qw0-f54.google.com (mail-qw0-f54.google.com [209.85.216.54]) by mx1.freebsd.org (Postfix) with ESMTP id D039D8FC14 for ; Thu, 9 Jun 2011 07:57:01 +0000 (UTC) Received: by qwc9 with SMTP id 9so839046qwc.13 for ; Thu, 09 Jun 2011 00:57:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=iJ4E0Lo6IvpOn3QVl1h8k7j0PtNukl9h3ydH/x+jqSY=; b=Lts+OnPPB2iT7bXnDLyMGM7L/0kPWlImVIdpK5ioUDffiLT+1ALuMadkxczfF7OWu9 N9duPNHAVu/KPXc/xTNp/Nx+/9OIMbJLxKl6VrZ6h00cPY+0u/xSsUtzMoUgScmuAmQo D/OKP5rpyd1boVHfzEOPT/1dBU0i25F8GRUJI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=OHdTmL3sowwX4HOqYdT/MCgYKd/ZUpvpBLLVYnuzwS2+aKQMlNEjvREEozoFC4+hjN kCC/CTYBp/uY8Lh7yhyeJ7aCKM1BsxbUvaeu4tdPYGNELUs4ZL6sB9UwM/JJ6xfAe2Hc QUlfa1YWImb0sCKf4MAN8XKL8KIi59yhm9fpY= MIME-Version: 1.0 Received: by 10.229.25.211 with SMTP id a19mr273202qcc.81.1307606220991; Thu, 09 Jun 2011 00:57:00 -0700 (PDT) Received: by 10.229.82.65 with HTTP; Thu, 9 Jun 2011 00:57:00 -0700 (PDT) In-Reply-To: References: <4DEF7322.8030907@gmx.de> <4DEF8103.9030401@gmx.de> <20110608162626.GA94883@icarus.home.lan> <4DEFA5E3.8080806@FreeBSD.org> <20110608165515.GA95345@icarus.home.lan> <4DEFCBA2.10908@FreeBSD.org> Date: Thu, 9 Jun 2011 10:57:00 +0300 Message-ID: From: nickolasbug@gmail.com To: josh.carroll@gmail.com Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-stable@freebsd.org, Jeremy Chadwick , Andriy Gapon Subject: Re: [SOLVED] Re: labelling root file system (RELENG_8) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 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, 09 Jun 2011 07:57:02 -0000 2011/6/8 Josh Carroll : >>> That would mean the only time a >>> person can use tunefs on a root filesystem is when they either do it >>> manually during the FreeBSD installation (adding "-t" to the list of >>> newfs flags in the filesystem creation UI), or if they boot off of some >>> other medium (USB flash drive, CD, PXE, etc.). >> >> Or when your root fs is mounted r/o, which is not as bad as what you lis= ted above. Or when you've booted form device (not label), e.g. /dev/ada0s1a and have set sysctl kern.geom.debugflags=3D16 > > Perhaps I'm doing something wrong, but in my experience, at least with > glabel, the label will not stick even if you have the root fs mounted > ro. I have had to boot from an alternative media (boot cd, alternate > root fs, etc) in order to create a label for the root fs with glabel. > To be specific, I'm talking about the "automatic" labels created with > glabel label . > > I just tested this again in a VM, and sure enough if I boot single > user mode but use ad0s1a as the ro root file system during single user > mode, it still doesn't stick and upon reboot I don't have a /dev/label > entry. Here is the exact sequence I used: > > 1. boot single user with the default root fs (ad0s1a). > 2. leave / mounted read only > 3. glabel label -v root ad0s1a =A0 # reports successful addition of metad= ata > 4. /dev/label/root exists as expected > 5. reboot > 6. /dev/label/root does not exist You should mount fs from label device - /dev/label/root in your case, which must be in /etc/fstab, e.g.: /dev/label/root / ufs rw 1 1 Otherwise if you mount fs from device directly (not from label) label entry (/dev/label/root) would be removed from /dev file system as unused device. This action will be reported in dmesg (you may check it) So, afrer labeling device you should add fstab record. After that you can reboot.