> On 03/12/10 04:00 AM, Alexander Eremin wrote:
> > Please review the one line webrev at
> > http://cr.opensolaris.org/~alhazred/15101/
> > which fix 15101 bug "idm_create_disk_label fails to
> overwrite GPT with
> > SMI label on some disks"
> > Added additional 'no' to format call, which does
> not affect cases where
> > the question about geometry is not set.
> >
> > Thanks,
> >    
> Hi Alex,
> 
> May I ask how you tested the fix?
> 
> Since you are working on the bug, can you add
> yourself as the RE?
> 
> Thanks,
> 
> --Karen
> _______________________________________________
> caiman-discuss mailing list
> caiman-discuss at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/caiman-di
> scuss
> 

Hi Karen,
it's a difficult to find the disk that satisfies the conditions so I decided to 
change the format command.
I commented out the block in auto_sense.c:
... 
        /*                                                                      
                              
         * Try for an existing format.dat first                                 
                              
         */                                                                     
                              
      if ((disk_type = find_scsi_disk_by_name(disk_name)) != NULL) {            
                            
                if (use_existing_disk_type(fd, can_prompt, label,               
                              
                    &inquiry, disk_type, &capacity)) {                          
                              
                        return (disk_type);                                     
                              
                }                                                               
                              
                if (force_format_dat) {                                         
                              
                        return (NULL);                                          
                              
                }                                                               
                              
        } 
...
And ?hanged next in static struct disk_type * generic_disk_sense:
...                                                                             
                        
        if ((pcyl > MAXIMUM_NO_CYLINDERS) ||                                    
                              
            (nsect > MAXIMUM_NO_SECTORS) ||                                     
                              
            (nhead > MAXIMUM_NO_HEADS)) {  
...
to
...                                                                             
                        
        if ((pcyl > MAXIMUM_NO_CYLINDERS) ||                                    
                              
            (nsect > MAXIMUM_NO_SECTORS) ||                                     
                              
            (nhead > MAXIMUM_NO_HEADS) || 1>0) {  
...
This allowed to go to the third question in any case.  Next test this with new 
format:
...
format> la
[0] SMI Label
[1] EFI Label
Specify Label type[1]: 0
Auto configuration via format.dat[no]? 
Auto configuration via generic SCSI-2[no]? 

Geometry: 27 heads, 133 sectors 4926 cylinders result in 17689266 out of 
17689267 blocks.
Do you want to modify the device geometry[no]? 
format> 
...
Next testing fixed test_ti_static:
# ./test_ti_static -c -t x -d c4t0d0
Test TI started in real mode...
Target type specified: disk label
disk label target prepared successfully
disk label target created successfully
# cat /tmp/install_log
<TIMM_I Mar 15 10:29:01> Target type to be created: DISK_LABEL
<TIDM_I Mar 15 10:29:01> Disk c4t0d0 has an EFI label
<TIDM_I Mar 15 10:29:01> format: Creating SMI label for c4t0d0
<TIDM_I Mar 15 10:29:01> dm cmd: printf 'label
0
n
n
n
q
'| /usr/sbin/format -e -d  c4t0d0 >/dev/null 2>&1 2>&1 1>/dev/null
# 
Disk c4t0d0 now labeled as SMI. Also tested with usual format without 
additional question.

Thanks,
Alexander
-- 
This message posted from opensolaris.org

Reply via email to