Hi Jason,

Jason Zhao wrote:
> Hi, Jan and Willima,
>
> I tested libtd on 2 T2000 machine. Through the test_td driver,
> it seems like libtd could not find current boot disk.
> I tested it on x86, and test_td will print a "*" ahead of the
> boot disk, but on SPARC platform, there is no "*" output.
>
> Is it a bug for SPARC?
>   

libtd uses devfs_bootdev_get_list() API for obtaining list of boot devices:

http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libdevinfo/devfsinfo.c#838

Looking at the Sparc implementation, following eeprom(1M) variables are
queried:

boot-device
bootdev
boot-from

Also, looking at devfs_bootdev_get_list(), it returns
with failure if diagnostic-mode? or diag-switch?
variables are set. I am not sure, why this implementation
was chosen, maybe other people might clarify this point.

That said, I have verified that boot disk is reported
correctly on my T1000 test machine:

# /tmp/test_td -dv
Disk discovery
Total number of disks: 2
-------------------------------------------------------------------------------
 num |    name|    vendor|  ctype| mtype| rem| lbl| bsize|#of blocks|size [MB]|
-------------------------------------------------------------------------------
   1 |* c2t0d0|   FUJITSU|   scsi| FIXED|  No|   V|   512| 143374738|    70007|
   2 |  c2t1d0|   FUJITSU|   scsi| FIXED|  No|   V|   512| 143374738|    70007|
-------------------------------------------------------------------------------

I have tried to turn on diag-switch? and in that case, boot disk was not
identified - this behavior is compliant with the current implementation
of devfs_bootdev_get_list():

# eeprom diag-switch?=true
# /tmp/test_td -dv
Disk discovery
Total number of disks: 2
-------------------------------------------------------------------------------
 num |    name|    vendor|  ctype| mtype| rem| lbl| bsize|#of blocks|size [MB]|
-------------------------------------------------------------------------------
   1 |  c2t0d0|   FUJITSU|   scsi| FIXED|  No|   V|   512| 143374738|    70007|
   2 |  c2t1d0|   FUJITSU|   scsi| FIXED|  No|   V|   512| 143374738|    70007|
-------------------------------------------------------------------------------


In your case, what is state of diag-switch? and diagnostic-mode? variables ?
Also, is your boot device (boot-device or bootdev or boot-from variable)
set to the one of the disks reported by libtd ?

Thank you,
Jan

> x86 output
> ===================================
> # test_td -d
> Disk discovery
> Total number of disks: 2
> ---------------------------------
> num | name| ctype|size [MB]|
> ---------------------------------
> 1 |* c4d0| ata| 152625| <--- there is an asterisk(*) before c4d0
> 2 | swap|unknown| 512|
> ---------------------------------
>
> ===================================
>
> sparc output
> ===================================
> # test_td -d -v
> Disk discovery
> Total number of disks: 3
> -------------------------------------------------------------------------------
> num | name| vendor| ctype| mtype| rem| lbl| bsize|#of blocks|size [MB]|
> -------------------------------------------------------------------------------
> 1 | c0t0d0| FUJITSU| scsi| FIXED| No| V| 512| 143374738| 70007|
> 2 | c0t1d0| FUJITSU| scsi| FIXED| No| G| 512| 143374738| 70007|
> 3 | dump| unknown|unknown| UNKN| No| G| 512| 3145728| 1536|
> -------------------------------------------------------------------------------
> ===================================
>
>
> Thanks
> Jason
>   


Reply via email to