From owner-freebsd-stable@FreeBSD.ORG Fri Mar 23 20:46:47 2012 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 20BA51065673 for ; Fri, 23 Mar 2012 20:46:47 +0000 (UTC) (envelope-from illoai@gmail.com) Received: from mail-pz0-f44.google.com (mail-pz0-f44.google.com [209.85.210.44]) by mx1.freebsd.org (Postfix) with ESMTP id E78CC8FC27 for ; Fri, 23 Mar 2012 20:46:46 +0000 (UTC) Received: by dadz14 with SMTP id z14so84862dad.17 for ; Fri, 23 Mar 2012 13:46:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=AnTrnFDvPlmFtboa1IMsDeHSTgsU0O4MrwM6N40bSts=; b=LH76QuSrPX8F0VHO8Eo7UicziqKAb4O2+CC9TOd1gqxFhqLMXSedprkkFA+KXQvY1L kL31bNG7ybX8bG+O8nfLBe5Ip8jQtO4x6RFlHxuRo2kx5DrzRE4cexmGRQtLtYG/UhO+ 3J4VPBNeN+OXX/thYglFKDxrEJSOwir+r5FdG+UnfgcLKBtYWZ1xGvy7miGyu0+ORVmS /l5R5d30YknMH71xWe5KuZ2PdIv+LOm3yDyi42YMfX/DKb+c9MDtIoAH0I2DBZEcG8ni ip/dktPGCn7au3/UnIVFA5u9ZNkrc+JoGtmJqsri4a8nLG/IuOG3vDQ+yivSEq5nIBVi N29w== MIME-Version: 1.0 Received: by 10.68.72.138 with SMTP id d10mr32748937pbv.15.1332535599968; Fri, 23 Mar 2012 13:46:39 -0700 (PDT) Received: by 10.142.116.2 with HTTP; Fri, 23 Mar 2012 13:46:39 -0700 (PDT) In-Reply-To: References: Date: Fri, 23 Mar 2012 16:46:39 -0400 Message-ID: From: "illoai@gmail.com" To: Mark Saad Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-stable@freebsd.org Subject: Re: FreeBSD 9-STABLE can not mount root from a glabled device 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: Fri, 23 Mar 2012 20:46:47 -0000 On 23 March 2012 14:50, Mark Saad wrote: > All > =A0I upgraded two of my 7-STABLE servers to 9-STABLE today and found > two foot shooters. I believe they are bugs only when you upgrade from > pre 8.0-RELEASE to 9.0-RELEASE or 9-STABLE > > 1. On 7.x I had been using glabel to label my root filesystem slice, > swap slice , and var slice . Like this > > glabel label rootfs /dev/da0s1a > glabel label var /dev/da0s1d > glabel label SWAP /dev/da0s1b > > Then in fstab I would have entries like this. > # Device =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Mountpoint =A0 =A0 =A0FStype =A0O= ptions =A0 =A0 =A0 =A0 Dump =A0 =A0Pass# > /dev/label/rootfs =A0 =A0 =A0 / =A0 =A0 =A0 =A0 =A0 =A0 =A0 ufs =A0 =A0 r= w =A0 =A0 =A0 =A0 =A0 =A0 =A01 =A0 =A0 =A0 1 > /dev/label/var =A0 =A0 =A0 =A0 =A0/var =A0 =A0 =A0 =A0 =A0 =A0ufs =A0 =A0= rw =A0 =A0 =A0 =A0 =A0 =A0 =A02 =A0 =A0 =A0 2 > /dev/label/SWAP =A0 =A0 =A0 =A0 none =A0 =A0 =A0 =A0 =A0 =A0swap =A0 =A0s= w =A0 =A0 =A0 =A0 =A0 =A0 =A00 =A0 =A0 =A0 0 > > This has worked for me in 6.x and 7.x however upon upgrading to > 9-STABLE ( from yesterday ) or 9.0-RELEASE the boot loader could not > find the labeled device. > I had to manually set vfs.root.mountfrom=3Dufs:/dev/da0s1a" or key that > in when the boot process bombed out. > > 2. After fixing the fstabs to use the real da names I wanted to see > what the boot loader would do with ufs labels. I rebooted my box into > single user mode and ran this > > tunefs -L rootfs /dev/da0s1a > tunefs -L var /dev/da0s1d > > Then edited the fstab to use the labeled filesystems and rebooted, > much to my surprise it failed in the same way. > > I compared this to a new 9.0-STABLE install i =A0did which used gpt > labels that did would > > # Device =A0 =A0 =A0 =A0Mountpoint =A0 =A0 =A0FStype =A0Options Dump =A0 = =A0Pass# > /dev/label/SWAP none =A0 =A0 =A0 =A0 =A0 =A0swap =A0 =A0sw =A0 =A0 =A00 = =A0 =A0 =A0 0 > /dev/gpt/rootfs / =A0 =A0 =A0 =A0 =A0 =A0 =A0 ufs =A0 =A0 rw =A0 =A0 =A01= =A0 =A0 =A0 1 > /dev/gpt/var =A0 =A0/var =A0 =A0 =A0 =A0 =A0 =A0ufs =A0 =A0 rw =A0 =A0 = =A02 =A0 =A0 =A0 2 > /dev/gpt/data =A0 /data =A0 =A0 =A0 =A0 =A0 ufs =A0 =A0 rw =A0 =A0 =A02 = =A0 =A0 =A0 2 > > > So far as I can tell the only difference is that the fresh install > uses the GPT partitioning scheme where as the upgraded boxes us the > older mbr/fdisk setup. > > Any ideas on what I can try to get past this ? I liked using > /dev/label as it made the devices sort of agnostic to what filesystem > or partitioning scheme was on them. > tunefs should put your labels under /dev/ufs/ Though I've not had any problems under 9.0 with labels on root. Is GEOM_LABEL built into your kernel or is it a module? (though I have my doubts about that causing this problem) The boot loader should merely grab the first 512K of whatever partition is marked as bootable without worrying where / might eventually be mounted from. /dev/label/swap0 none swap sw 0 0 /dev/ufs/rootfs / ufs rw,noatime 1 1 /dev/ufs/homefs /home ufs rw,noatime 2 3 /dev/ufs/usrfs /usr ufs rw,noatime 2 2 /dev/ufs/varfs /var ufs rw,noatime,async 2 2 tmpfs /tmp tmpfs rw 0 0 &cet --=20 --