From owner-svn-src-all@FreeBSD.ORG Sun Apr 24 17:34:22 2011 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 96B67106566B; Sun, 24 Apr 2011 17:34:22 +0000 (UTC) (envelope-from doconnor@gsoft.com.au) Received: from cain.gsoft.com.au (unknown [IPv6:2001:44b8:7c07:5581:266:e1ff:fe0c:8f16]) by mx1.freebsd.org (Postfix) with ESMTP id 4627D8FC0A; Sun, 24 Apr 2011 17:34:20 +0000 (UTC) Received: from [192.168.1.9] (cm-84.215.40.84.getinternet.no [84.215.40.84]) (authenticated bits=0) by cain.gsoft.com.au (8.14.4/8.14.3) with ESMTP id p3OHY6eN019475 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NO); Mon, 25 Apr 2011 03:04:09 +0930 (CST) (envelope-from doconnor@gsoft.com.au) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: "Daniel O'Connor" In-Reply-To: <20110424161933.GA18775@vniz.net> Date: Sun, 24 Apr 2011 19:34:05 +0200 Content-Transfer-Encoding: quoted-printable Message-Id: <18B3AE1E-467E-4B23-81B9-AB1EDEFE1F7A@gsoft.com.au> References: <201104240923.p3O9N8QG025386@svn.freebsd.org> <20110424161933.GA18775@vniz.net> To: Andrey Chernov X-Mailer: Apple Mail (2.1084) X-Spam-Score: 0.163 () BAYES_00,RDNS_DYNAMIC X-Scanned-By: MIMEDefang 2.67 on 203.31.81.10 Cc: svn-src-head@freebsd.org, Alexander Motin , src-committers@freebsd.org, svn-src-all@freebsd.org Subject: Re: svn commit: r220983 - head X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Apr 2011 17:34:22 -0000 On 24/04/2011, at 18:19, Andrey Chernov wrote: > On Sun, Apr 24, 2011 at 09:23:08AM +0000, Alexander Motin wrote: >> ATA device names in /etc/fstab or other places, make sure to = update >> them respectively (adX -> adaY, acdX -> cdY, afdX -> daY, astX = -> saY, >> - where 'Y's are the sequential numbers for each type in order of >> - detection, unless configured otherwise with tunables, see = cam(4)). >> + where 'Y's are the sequential numbers starting from zero for = each type >> + in order of detection, unless configured otherwise with = tunables, >> + see cam(4)). >=20 > Is there any way to guess resulting 'Y' numbers _before_ booting new=20= > kernel? I have remote machine with console access almost impossible = (very=20 > hard for me). >=20 > It seems something like > vfs.root.mountfrom=3D"ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..." > (up to max channels) helps to find root, but what about other mounted=20= > disks? The best way is to change to use GPT IDs (/dev/gptid/xxx) if you are on = a GPT system) or UFS IDs (/dev/ufsid/xxx) if you can't. gpart list will show the GPTID (rawuuid) and dumpfs will show the UFS = ID. The following shell snippet will generate the UFS ID for a given FS. getfsid() { line=3D`dumpfs 2> /dev/null $1 | head | grep superblock\ location` if [ $? -ne 0 ]; then return 1 fi # dumpfs doesn't print leading 0s eval `echo $line | sed -nEe 's/superblock location.*id.*\[ (.*) (.*)\ = ]/printf %0x $((0x\1 << 32 | 0x\2))/p'` } -- Daniel O'Connor software and network engineer for Genesis Software - http://www.gsoft.com.au "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C