06-26-2009
/sbin/sdiconfig -l
- grep usb_msto line
- output example
2:0,7,0: HBA usb_msto,1
- interesting value is first value = 2
id=2
- in this example device to mount is
mount /dev/dsk/c${id}b0t0d0pa /mnt
and example
fdisk /dev/rdsk/c${id}b0t0d0p0
ksh/bash function:
usb="/usb"
mountusb()
{
oifs="$IFS"
IFS=":"
read devid xx <<EOF
$(/sbin/sdiconfig -l | grep usb_msto )
EOF
IFS="$oifs"
[ "$devid" = "" ] && echo "no usb disk" >&2 && return 1
print "devid:$devid"
mkdir $usb 2>/dev/null
mount /dev/dsk/c${devid}b0t0d0pa $usb
stat=$?
[ "$stat" != 0 ] && echo "can't mnt" >&2 && return 1
df -v
return $stat
}
10 More Discussions You Might Find Interesting
1. UNIX for Advanced & Expert Users
Hi,
I tried to install Magneto-Optical (MO) drive Fujutsu to COMPAQ Proliant ML350 with SCO Openserver 5.0.5. Harddisk and MO are connected to Adaptec UW-SCSI-3 (driver ad160).
During boot process system shows me that MO is connected to host adapter 1, bus 0, SCSI ID 1 and LUN 0. But when I... (2 Replies)
Discussion started by: yurist
2 Replies
2. UNIX for Dummies Questions & Answers
Hello,
I need information or tooling for using my USB pen drive (DANE-ELEC) in a unix environment.
Until now I only get the "format window" in the unix machine but after giving OK for running the format, it never stops and I have to stop it manually.
Seems that what I need is format my... (0 Replies)
Discussion started by: Argento73
0 Replies
3. Debian
hello,
I want to install minimal linux on 128MB pen drive.
distro is debian.
what all should i need? (2 Replies)
Discussion started by: yogesh_powar
2 Replies
4. SCO
Situation - i have an IDE hard drive from server apparently running SCO last used in 2003. No access to computer it was formerly in. I need to access the drive to pull off data files from a billing/scheduling program. I have no SCO machine or access to one atm. Have some limited Linux... (3 Replies)
Discussion started by: lordlars1
3 Replies
5. SCO
Hi,
Does anyone know if a HP VS160 Tape drive will work with SCO Openserver Release 5?
If so what driver would it use? alad, cha?
Thanks
John (3 Replies)
Discussion started by: jfd7000
3 Replies
6. BSD
Hi there,
I am using freebsd 7.0 and I am facing a lot of issues with it. The cd installed fine. I opted for the gnome desktop and tht too installed (though the refresh rates were wrong and the resloution got messed up). After some configurations the desktop was working fine.
Then came the... (5 Replies)
Discussion started by: jedidiah
5 Replies
7. Linux
Hello Friends,
My pendrive (FAT32 filesystem) consist of following files+viruses.
-rwxr-xr-x 1 chinmay root 0 2010-03-10 01:29 autorun.inf
dr-xr-xr-x 2 chinmay root 4096 2010-03-09 23:51 Docs
-rwxr-xr-x 1 chinmay root 4726162 2010-03-08 15:02 java_ee_sdk-5_03-javadocs.zip... (4 Replies)
Discussion started by: catchchinu1
4 Replies
8. SCO
One hard disk fail to mount (/dev/data). I had run "fsck /dev/data" then some error occured "unrecoverable error reading SCSI Disk 1 dev 1/104".
I need to recover data from disk. please help. (1 Reply)
Discussion started by: rakeshkumar9919
1 Replies
9. Red Hat
Anyone can plz tell me how to make pendrive bootable.unetbootin dont have option for red hat (0 Replies)
Discussion started by: shamapraveen
0 Replies
10. SCO
I have a server unix Sco 5.0 and copy some backup files to flopy drive using command "Tar", but i like copy this files to pen drive, is possible ? my know about Sco is less.
Tks (1 Reply)
Discussion started by: ger2112
1 Replies
LEARN ABOUT OSX
installgrub
installgrub(1M) installgrub(1M)
NAME
installgrub - install GRUB in a disk partition or a floppy
SYNOPSIS
/sbin/installgrub [-fm] stage1 stage2 raw-device
The installgrub command is an -only program. GRUB stands for GRand Unified Bootloader.
installgrub installs GRUB stage 1 and stage 2 files on the boot area of a disk partition. If you specify the -m option, installgrub
installs the stage 1 file on the master boot sector of the disk.
The installgrub command accepts the following options:
-f
Suppresses interaction when overwriting the master boot sector.
-m
Installs GRUB stage1 on the master boot sector interactively.
The installgrub command accepts the following operands:
stage1
The name of the GRUB stage 1 file.
stage2
The name of the GRUB stage 2 file.
raw-device
The name of the device onto which GRUB code is to be installed. It must be a character device that is readable and writable. For disk
devices, specify the slice where the GRUB menu file is located. (For Solaris it is the root slice.) For a floppy disk, it is
/dev/rdiskette.
Example 1: Installing GRUB on a Hard Disk Slice
The following command installs GRUB on a system where the root slice is c0d0s0:
example# /sbin/installgrub /boot/grub/stage1
/boot/grub/stage2 /dev/rdsk/c0d0s0
Example 2: Installing GRUB on a Floppy
The following command installs GRUB on a formatted floppy:
example# mount -F pcfs /dev/diskette /mnt
# mkdir -p /mnt/boot/grub
# cp /boot/grub/* /mnt/boot/grub
# umount /mnt
# cd /boot/grub
# /sbin/installgrub stage1 stage2 /dev/rdiskette
/boot/grub
Directory where GRUB files reside.
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Evolving |
+-----------------------------+-----------------------------+
boot(1M), fdisk(1M), fmthard(1M), kernel(1M), attributes(5)
Installing GRUB on the master boot sector (-m option) overrides any boot manager currently installed on the machine. The system will always
boot the GRUB in the Solaris partition regardless of which fdisk partition is active.
24 May 2005 installgrub(1M)