svn commit: r220983 - head

Daniel O'Connor doconnor at gsoft.com.au
Sun Apr 24 17:34:22 UTC 2011


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)).
> 
> Is there any way to guess resulting 'Y' numbers _before_ booting new 
> kernel? I have remote machine with console access almost impossible (very 
> hard for me).
> 
> It seems something like
> vfs.root.mountfrom="ufs:/dev/ada0s1a ufs:/dev/ada1s1a ..."
> (up to max channels) helps to find root, but what about other mounted 
> 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=`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








More information about the svn-src-head mailing list