I couldn't save the original read-only, hence saved it desktop and ran it
from there...
(root at belenix)# ./usbdump
++ svcs volfs
++ tail -1
++ cut -f1 '-d '
svcs: Pattern 'volfs' doesn't match any instances
+ volfs=STATE
++ svcs rmvolmgr
++ tail -1
++ cut -f1 '-d '
+ rmvolmgr=online
++ pwd
+ CDIR=/root/Desktop
+ disable_volfs
+ '[' STATE = online ']'
+ '[' online = online ']'
+ echo 'Disabling Removable Media Manager'
Disabling Removable Media Manager
+ svcadm disable -st rmvolmgr
+ USB_PATH=/mnt/belusb
+ rmformat
+ nawk 'BEGIN {
      FS = ":";
      lnode=0;
      node = "";
      devname = "";
      bus = "";
      size = 0;
      bustype = "USB";
} {
      if (lnode == 1 && match($1, "Logical Node")) {
              if (match(bus, bustype))
                      printf("%s\t%s\t%s\t%s\n", node, size, devname, bus);
              node = $2;
      } else {
              if (match($1, "Logical Node")) {
                      lnode = 1;
                      node = $2;

              } else if (match($1, "Connected Device")) {
                      devname = $2;

              } else if (match($1, "Bus")) {
                      bus = $2;

              } else if (match($1, "Size")) {
                      size = $2;
              }
      }
} END {
      if (lnode == 1) {
              if (match(bus, bustype))
                       printf("%s\t%s\t%s\t%s\n", node, size, devname, bus);
      }
}'
        Access permissions: Medium is not write protected.
        Access permissions: Medium is not write protected.
+ echo Select the device you wish to install to from following list:
Select the device you wish to install to from following list:
+ /usr/bin/choice /tmp/ulst /tmp/line
1 :  /dev/rdsk/c2t0d0p0  4.8 GB  ST650211 CF               0811  USB

Enter your choice (1,q)?1
++ cat /tmp/line
++ nawk '{print $1}'
+ dev=/dev/rdsk/c2t0d0p0
+ '[' -n /dev/rdsk/c2t0d0p0 ']'
+ echo INFORMATION: USB found at node /dev/rdsk/c2t0d0p0
INFORMATION: USB found at node /dev/rdsk/c2t0d0p0
++ cat /tmp/line
++ nawk '{print $4}'
+ model=ST650211
+ '[' '' = GB ']'
+ true
+ echo ''

+ echo WARNING: All data on your USB storage will be lost.
WARNING: All data on your USB storage will be lost.
+ echo Are you sure you want to install to ST650211, MB at
/dev/rdsk/c2t0d0p0 '?(y/n)'
Are you sure you want to install to ST650211, MB at /dev/rdsk/c2t0d0p0
?(y/n)
+ read yn
y
+ case $yn in
+ break
++ fdisk -W - /dev/rdsk/c2t0d0p0
++ grep bytes/sector
++ nawk '{ print $2 }'
+ bps=512
++ fdisk -W - /dev/rdsk/c2t0d0p0
++ tail -1
++ nawk '{ print $10 }'
+ nsect=9751392
+ size=4992712704
+ size=4761
+ '[' 4761 -lt 512 ']'
+ fdisk -B /dev/rdsk/c2t0d0p0
+ '[' 0 -ne 0 ']'
++ expr 4761 - 1
+ sz=4760
++ expr 4760 - 2
+ wsz=4758
+ wsz=4758MB
+ sz=4760MB
+ echo /dev/rdsk/c2t0d0p0
++ sed s/p0/s0/g /tmp/devnode
+ devs=/dev/rdsk/c2t0d0s0
+ echo /dev/rdsk/c2t0d0s0
++ sed s/rdsk/dsk/g /tmp/devs
+ devblock=/dev/dsk/c2t0d0s0
+ echo /dev/dsk/c2t0d0s0
++ sed s/s0/p0/g /tmp/devs
+ devblockp=/dev/dsk/c2t0d0p0
+ umount -f /dev/dsk/c2t0d0s0
+ '[' 1 -ne 0 ']'
+ umount /dev/dsk/c2t0d0s0
+ umount -f /dev/dsk/c2t0d0p0
+ '[' 1 -ne 0 ']'
+ umount /dev/dsk/c2t0d0p0
+ devfsadm
+ echo 'slices: 0 = 2MB, 4758MB, "wm", "root" :'
+ echo '        1 = 0, 1MB, "wu", "boot" :'
+ echo '        2 = 0, 4760MB, "wm", "backup" '
+ echo Creating slices on USB
Creating slices on USB
+ rmformat -s /tmp/slices /dev/rdsk/c2t0d0p0
Not a removable media device
+ '[' 1 -ne 0 ']'
+ echo 'WARNING: Could not create slices on USB.'
WARNING: Could not create slices on USB.
+ echo 'Giving up.'
Giving up.
+ echo ''

+ enable_volfs
+ '[' STATE = online ']'
+ '[' online = online ']'
+ echo 'Enabling Removable Media Manager'
Enabling Removable Media Manager
+ svcadm enable -s rmvolmgr
+ exit 1
(root at belenix)#

On 7/25/07, Anil Gulecha <anil.verve at gmail.com> wrote:
>
> Ok.. that means the fdisk ran quite fine.
>
> So one more test. boot into windows or another OS and format the USB as
> FAT.
>
> Then once you are in BleneiX again, run
> kate /usr/bin/usbdump
>
> this will open up a word processer with the usbdump script. just add
> the line 'set -x' _after_ the first line.
>
> save the file, and exit
>
> Plug in the USB and run usbdump in another terminal. this time there
> will be a lot of text o/p, can you copy and mail it all across.
>
> Regards
> Anil
>
> On 7/25/07, Gurpreet Singh <gsbhamra at gmail.com> wrote:
> >
> > Does this help???
> >
> > root at belenix)# svcadm disable -st rmvolmgr
> > (root at belenix)# rmformat
> > Looking for devices...
> >      1. Logical Node: /dev/rdsk/c3t0d0p0
> >         Physical Node: /pci at 0,0/pci1462,7280 at 1d,7/storage at 4 /disk 
> > at 0,0
> >         Connected Device: ST650211 CF               0811
> >         Device Type: Removable
> >         Bus: USB
> >         Size: 4.8 GB
> >         Label: <None>
> >         Access permissions: Medium is not write protected.
> >      2. Logical Node: /dev/rdsk/c1t1d0p0
> >         Physical Node: /pci at 0,0/pci-ide at 1f,2/ide at 0/sd at 1,0
> >         Connected Device: HL-DT-ST DVDRAM GSA-4082B A201
> >         Device Type: DVD Reader/Writer
> >         Bus: IDE
> >         Size: 694.7 MB
> >         Label: <None>
> >         Access permissions: Medium is not write protected.
> > (root at belenix)# fdisk -B /dev/rdsk/c3t0d0p0
> > (root at belenix)# echo $?
> > 0
> > (root at belenix)#
> >
> >
> > On 7/24/07, Anil Gulecha <anil.verve at gmail.com> wrote:
> > > Hi Gurpreet,
> > >
> > > I has set reply to only to me as I didnt want to fill up the list with
> > > the debugging stuff. Figuring out the problem could take a few mail
> > > excanges so please keep this off-list.
> > >
> > > The error in your case seems to be in formatting the USB as a solaris
> > > partition. Try this..
> > >
> > > once you're booted into belenix, open a terminal and give
> > > svcadm disable -st rmvolmgr
> > >
> > > Now, plug in the USB and find out it's address from 'rmformat' .. like
> > > /dev/rdsk/c2t0d0p0
> > >
> > > Now give the following command:
> > >
> > > fdisk -B /dev/rdsk/c2t0d0p0
> > > echo $?
> > >
> > > If the o/p is not '0' retry with the command:
> > >
> > > fdisk -B -d /dev/rdsk/c2t0d0p0
> > > echo $?
> > >
> > > If this too doesn't o/p '0'.. we have captured the error. fdisk is
> > > unable to format the USB.
> > >
> > > Anil
> > >
> > > On 7/23/07, Gurpreet Singh <gsbhamra at gmail.com> wrote:
> > > > Hello Anil,
> > > > Here is the dump of basically what happens when I run usbdump, along
> > with
> > > > the commands that you asked me to run...
> > > > Hope it helps, hehe on the other hand, I've gotten quite used to
> running
> > > > belenix from cd, :) instead of booting from HD, idea is just don't
> turn
> > the
> > > > machine off :)
> > >
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: 
<http://mail.opensolaris.org/pipermail/belenix-discuss/attachments/20070725/72711c69/attachment.html>

Reply via email to