Alexander Eremin wrote: >> Alexander Eremin wrote: >>> Hi all, >>> pls review changes for bug 10098 (usbcopy does not >> deal with smedia >>> mounted usb flash properly) >>> >>> webrev: http://cr.opensolaris.org/~alhazred/10098/ >>> >>> Also fixed that after 'format' new Solaris slice >> was mounted again >>> with Nautilus popup window. >>> >>> Tested on snv125: >>> # mount -p >>> ... >>> /dev/dsk/c2t0d0p0:1 - /media/NONAME pcfs - no >>> >> nosuid,hidden,nofoldcase,clamptime,noatime,timezone=-1 >> 0800 >>> /dev/dsk/c2t0d0s0 - /mnt ufs - no >>> rw,intr,largefiles,logging,xattr,onerror=panic >>> >>> # ./usbcopy osol121.usb >>> Found the following USB devices: >>> 0: /dev/rdsk/c2t0d0p0 976.5 MB Multi Flash >> Reader 1.00 >>> Enter the number of your choice: 0 >>> >>> WARNING: All data on your USB storage will be lost. >>> Are you sure you want to install to >>> Multi Flash Reader 1.00, 976 MB at >> /dev/rdsk/c2t0d0p0 ? (y/n) y >>> Copying and verifying image to USB device >>> Finished 889 MB in 280 seconds (3.1MB/s) >>> 0 block(s) re-written due to verification failure >>> Installing grub to USB device /dev/rdsk/c2t0d0s0 >>> Completed copy to USB >>> # >>> >>> >>> Best regrds, >>> ::alhazred >>> _______________________________________________ >>> caiman-discuss mailing list >>> caiman-discuss at opensolaris.org >>> >> http://mail.opensolaris.org/mailman/listinfo/caiman-di >> scuss >> >> Alexander, >> >> The code changes seem OK to me but it's not clear to >> me if your test >> environment actually exhibits the problem reported in >> bug 10098. Does >> it? Maybe I just missing something... ? If I am >> please just let me know >> and describe what your testing covers. >> >> As reported in the bug, it was not always possible to >> reproduce this >> problem I think it would be valuable to do some more >> testing. To ensure >> this actually fixes the problem I would like to ask >> that the test output >> include a reproduction of the problem reported in bug >> 10098 using the >> original usbcopy. Then see it resolved using the >> usbcopy with your >> proposed changes. >> >> >> Thank you! Joe >> >> >> _______________________________________________ >> caiman-discuss mailing list >> caiman-discuss at opensolaris.org >> http://mail.opensolaris.org/mailman/listinfo/caiman-di >> scuss > > Thanks for reviewing Joe, > here's only output from "difficult" case when smedia has a pcfs and solaris > partitions and they all was mounted automatically. Also tested with one and > two pcfs partitions as reported in bug. After test I haven't them mounted. > # mount -p > ... > /dev/dsk/c2t0d0p0 - /media/NO NAME pcfs - no > nosuid,hidden,nofoldcase,clamptime,noatime,timezone=-1 0800 > # ./usbcopy osol121.usb > ... > # mount -p|grep c2t0d0p0 > # > > Second umount after 'format' is required because using usbcopy in fresh > snv125 > I found that newly created partition is mounting again. Number of seconds for > sleep also found using some tests, lees than 5 is not enough. > > Regards, > Alex
Thanks you for the reply Alex. One more question/suggestion. Would it make sense to replace: 175 # umount new slice 176 sleep 5 177 umount -f $s0bdev > /dev/null 2>&1 With something like: typeset -i umount_loop=15 typeset -i loop_cnt=0 while [[ ${loop_cnt} -lt ${umount_loop} ]]; do # umount new slice umount -f $s0bdev > /dev/null 2>&1 if [[ $? -eq 0 ]]; then break; fi # if the umount failed try again in a second sleep 1 (( loop_cnt=${loop_cnt} + 1 )) done I think it might be safer and help avoid having the user wait any longer than needed. What do you think? Joe