USB fat32 / ufs setup
So I want to describe the lessons I found in order to format USB disks in solaris
Ill show how I (not usually the best way), accomplished the following:
1. Format usb disk for windows/solaris use
2. Format usb for UFS (Unix File System) for just my solaris box's
Lets see the steps I accomplished for step 1:
a. Find your usb storage device....
[root@unknown:] # rmformat
Looking for devices...
1. Logical Node: /dev/rdsk/c4t0d0p0
Physical Node: /pci@0,0/pci1022,7460@6/pci108e,534d@3,2/storage@4/disk@0,0
Connected Device: USB DISK 28X PMAP
Device Type: Removable
Bus: USB
Size: 123.0 MB
Label: <None>
Access permissions: <Unknown>
Ok...looks like its at /dev/rdsk/c4t0d0p0
b. run fdisk /dev/rdsk/c4t0d0p0
[root@unknown:] # fdisk /dev/rdsk/c4t0d0p0
Create the following partition
Partition Status Type Start End Length %
========= ====== ============ ===== === ====== ===
1 Win95 FAT32 1 122 122 99
SELECT ONE OF THE FOLLOWING:
1. Create a partition
2. Specify the active partition
3. Delete a partition
4. Change between Solaris and Solaris2 Partition IDs
5. Exit (update disk configuration and exit)
6. Cancel (exit without updating disk configuration)
...I have my Status as unactive..dont know if this matters
One thing I have noticed..is if you allready have an active partition and delete it, then create a new one
and then run mkfs, it will say it is busy...so if that happens, just take the usb drive out, then stick it back in.
c. [root@unknown:] # mkfs -F pcfs -o b=elbyUSB,fat=32 /dev/rdsk/c4t0d0p0:c
Construct a new FAT file system on /dev/rdsk/c4t0d0p0:c: (y/n)? y
(the b is a labelname...usefully if you want to label usb sticks)
d. [root@unknown:] # mount -F pcfs /dev/dsk/c4t0d0p0:c /Desktop/temp/
Mount the FAT file system...
After this is done, you can go to a Windows box and everything should work fine....
so on to step 2.
The following is pretty straight-foward for creating a ufs filesystem on your usb drive...
a. Find your usb path
[root@unknown:] # rmformat
Looking for devices...
1. Logical Node: /dev/rdsk/c8t0d0p0
Physical Node: /pci@0,0/pci1022,7460@6/pci108e,534d@3,2/storage@5/disk@0,0
Connected Device: Fujifilm USB Drive 4.70
Device Type: Removable
Bus: USB
Size: 243.8 MB
Label: <None>
Access permissions: <Unknown>
Looks like mine is /dev/rdsk/c8t0d0p0
b.Then create a Solaris2 partition.
[root@unknown:] #fdisk /dev/rdsk/c8t0d0p0
c. Then create a ufs filesystem... NOTE: I choose slice2, (the whole disk for the filesystem)
[root@unknown:] # newfs /dev/dsk/c8t0d0s2
newfs: /dev/rdsk/c8t0d0s2 last mounted as /media/USB Drive
newfs: construct a new file system /dev/rdsk/c8t0d0s2: (y/n)? y
d. Then mount
[root@unknown:] # mount /dev/dsk/c8t0d0s2 /Desktop/temp/
###############
For both of the above...you can access the format command with the format -e
[root@unknown:] # format -e
and for the latter, you can label it, and look at your paritions with the format command...
if things aren't working you can troubleshoot with some usefully commands....
If your usb has a disk activity, you can try to write to it with the following command
[root@unknown:] # dd if=/dev/zero of=/dev/rdsk/c8t0d0p0 count=44444
Have count be whatever you want, then look at the activity light and see if it is blinking..
you can also tail the /var/adm/messages
for example..I have a usb keyboard with a hub built it...I plug in my usb thumbdrive into my keyboard, but I can see the following
[root@unknown:] # tail -f /var/adm/messages
############<===PLUG IN THE USB DRIVE TO THE KEYBOARD HUB AND LETS SEE WHAT HAPPENS
<snip>
Jun 2 12:25:55 unknown usba: [ID 912658 kern.info] USB 2.0 device (usb430,100e) operating at full speed (USB 1.x) on USB 1.10 root hub: hub@1, hubd0 at bus address 2
Jun 2 12:25:55 unknown genunix: [ID 936769 kern.info] hubd0 is /pci@0,0/pci1022,7460@6/pci108e,534d@3/hub@1
Jun 2 12:25:55 unknown genunix: [ID 408114 kern.info] /pci@0,0/pci1022,7460@6/pci108e,534d@3/hub@1 (hubd0) online
Jun 2 12:25:56 unknown usba: [ID 691482 kern.warning] WARNING: /pci@0,0/pci1022,7460@6/pci108e,534d@3/hub@1 (hubd0): configuration 0 for device USB DISK 28X at port 1 exceeds power available for this port, please re-insert your device into another hub port which has enough power
</snip>
Well, it looks like I know why, my curiosty is resolved...
"USB DISK 28X at port 1 exceeds power available for this port, please re-insert your device into another hub port which has enough power"
Posted at 07:14PM Jun 02, 2007 by Eric Shobe in Solaris | Comments[4]
Today's Page Hits: 5
Posted by Peter on June 24, 2007 at 12:55 PM PDT #
For Sun Rays, the procedure seems to be something like: http://jhnc.livejournal.com/14685.html
Both procedures are ridiculous. It's not the '80s anymore. Regardless of how "LEET" the sysadmin is, an end-user should be able simply to click a couple of times on a pretty icon to get a sensibly reformatted memory stick.
Posted by Jonathan H N Chin on August 08, 2007 at 09:27 AM PDT #
Exactly Jonathan, This really shouldn't happen, I go to a windows box, plug my usb stick in, i get this simple gui that says format. I plug my usb stick in to solaris, maybe something will pop up, maybe not....hopefully with the adoption of opensolaris some college kid will want to contribute something of this kind. Really, sounds to me like one heck of a final project for some class.
Posted by Eric on August 08, 2007 at 09:28 PM PDT #
All,
I had the same problem. My USB stick worked for awhile, then got corrupted.
Check out the Solaris Sys Admin document number 3:
SystemAdministration Guide:Devices and File Systems
It is downloadable from the Sun site (not sure of the URL). Follow the steps in section:
Howto Create a File System on a USB Mass Storage Without vold Running
This worked for me....
Scott
Posted by Scott Wilson on June 26, 2008 at 07:47 AM PDT #