LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (https://www.linuxquestions.org/questions/debian-26/)
-   -   How do I find out what device my Hi-MD player is? (https://www.linuxquestions.org/questions/debian-26/how-do-i-find-out-what-device-my-hi-md-player-is-294367/)

Royle 02-24-2005 11:34 AM

How do I find out what device my Hi-MD player is?
 
I want to use it as a USB drive, and I found that you put this entry into your fstab
Code:

/dev/sdd /mnt/himd vfat umask=0,user,iocharset=iso8859-15,sync,kudzu,codepage=850,noauto,exec,users 0 0
But I don't know what to put in instead of /dev/sdd. How do I find this out? Thanks in advance for your help.

dastrike 02-24-2005 12:27 PM

USB connected storage devices will most likely show up as SCSI devices.

If you don't have any SCSI devices (or other devices that appear as SCSI devices), it is most likely then /dev/sda, and the intresting partition is most likely /dev/sda1

You can use sg_map -i to determine what SCSI (or devices appearing as such) devices are named what.

Royle 02-24-2005 12:32 PM

well I tried this:
Code:

mike:/home/mike# sg_map -i
Stopping because no sg devices found

and putting /dev/sda in my fstab and mounting it, but neither worked.

dastrike 02-24-2005 12:36 PM

The sg kernel module is most likely not loaded.
Code:

modprobe sg
and then try again.

And exactly what version of (assuming) Debian are you using by the way?

gunnix 02-24-2005 01:13 PM

Try sdd1 not sdd. or sda1 and not sda

you can see what the device address is with the command 'dmesg' as well.

and create the folder where it should be mounted first, before mounting

grtz

Royle 02-24-2005 01:13 PM

Ok so
Code:

mike:/home/mike# sg_map -i
/dev/sg0  SONY      Hi-MD WALKMAN    1000

I put this into my fstab :
Code:

/dev/sg0        /mnt/himd vfat umask=0,user,iocharset=iso8859-15,sync,kudzu,codrset=iso8859-15,sync,kudzu,codepage=850,noauto,exec,users 0 0
and now I'm getting this
Code:

mike@mike:~$ mount /dev/sg0
mount: /dev/sg0 is not a block device

What seems to be the problem?

dastrike 02-24-2005 02:02 PM

You can't mount the sg* devices.

The sg_scan will show what SCSI disk device (sd*) the SCSI generic device (sg*) is mapped to. But since you don't get any sd* device listed with sg_map, the MiniDisk device you have might not be an USB Mass Storage device (that is: an USB storage device that adheres to the USB Mass Storage device standard and thus could be mounted like any other USB storage device). Do you know for sure whether that device is an USB Mass Storage Device or not? If it isn't, it could use some proprietary way of transferring data (similarly to how many digital cameras do).

Example: here is what sg_map -i reports for me:
Code:

phobos:~# sg_map -i
/dev/sg0  /dev/sda
/dev/sg1  /dev/sdb
/dev/sg2  /dev/sdc  Generic  STORAGE DEVICE    0128
/dev/sg3  /dev/sdd  Generic  STORAGE DEVICE    0128
/dev/sg4  /dev/sde  Generic  STORAGE DEVICE    0128
/dev/sg5  /dev/sdf  Generic  STORAGE DEVICE    0128
/dev/sg6  /dev/sdg  USB 2.0  Mobile Disk      1.00

As you can see, the sg devices are mapped to sd devicees. sda and sdb are two SATA drives, sdc through sdf are slots on an USB flash card reader, sdg is an USB "thumbdrive".



You haven't still said what version of Debian you are using. And do you have the usb-storage (or usb_storage, depending on version) kernel module loaded? if not, load it with modprobe and try again.

Royle 02-24-2005 05:20 PM

The MD player can definitly be used for portable storage. But I think it has to be mounted as a "super floppy". I am using debian sarge. I found this:
Quote:

You don't have to reformat the disc, just enter the drive correctly as Superfloppy in fstab:

/dev/sdd /mnt/himd vfat umask=0,user,iocharset=iso8859-15,sync,kudzu,codepage=850,noauto,exec,users 0 0

My NH700 reports as /dev/sdd , it could be different depending on the number of other USB-drives connected, KDE checks on startup for this entry and creates an icon on the desktop, which allows for easy mounting.

Replace /mnt/himd with the directory, where you want to mount the drive.

For easy unmounting, add an icon, containing this line:

umount -l /dev/sdd

Of course, replace /dev/sdd with the device name, that your system reports.

Oh, and if you wonder, why I haven't added a partition number to the device name, it is simple: Minidiscs don't have a partition table. They are superfloppies...
I don't know what to make of this.

dastrike 02-24-2005 05:49 PM

Hm. After searching around the 'net a bit, I haven't really come to a definitive conclusion of this. From what I gather it should work by mounting the disk directly and not any partition on it (e.g. /dev/sda and not /dev/sda1).

Does /dev/sda exist for you? Does any /dev/sd* exist for you? Execute
Code:

ls -l /dev/sd*
to find out.

Brian1 02-24-2005 06:01 PM

What ouptut from the following commands do you get with the md plugged in ( note run as root ).
cat /proc/scsi/scsi
fdisk -l
lsmod

Brian1
" Google the Linux way @ http://www.google.com/linux "

Royle 02-24-2005 06:13 PM

ok
Code:

mike:/home/mike# ls -l /dev/sd*
ls: /dev/sd*: No such file or directory

Code:

mike:/home/mike# cat /proc/scsi/scsi
Attached devices:
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: SONY    Model: Hi-MD WALKMAN    Rev: 1000
  Type:  Direct-Access                    ANSI SCSI revision: 02

Code:

mike:/home/mike# fdisk -l

Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hda1  *          1      14945  120045681    7  HPFS/NTFS

Disk /dev/hdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

  Device Boot      Start        End      Blocks  Id  System
/dev/hdb1  *          1        4681    37600101  83  Linux
/dev/hdb2            4682        9729    40548060    f  W95 Ext'd (LBA)
/dev/hdb5            4682        4863    1461883+  82  Linux swap / Solaris
/dev/hdb6            4864        9729    39086113+  c  W95 FAT32 (LBA)

Code:

mike:/home/mike# lsmod
Module                  Size  Used by
ipv6                  229760  8
snd_via82xx            24704  1
snd_ac97_codec        64992  1 snd_via82xx
snd_mpu401_uart        7168  1 snd_via82xx
snd_rawmidi            23200  1 snd_mpu401_uart
via_agp                9216  1
agpgart                31784  1 via_agp
parport_pc            26308  0
parport                34248  1 parport_pc
pcspkr                  3688  0
nls_iso8859_1          4224  1
nls_cp437              5888  1
generic                4096  0 [permanent]
via82cxxx              12444  0 [permanent]


Brian1 02-24-2005 06:29 PM

Looks like you do not have any usb modules loaded. Try the following commands to see which modules load.
for some 1.0-1.1 usb. ' modprobe ohci-hcd '
for other 1.0-1.1 usb. ' modprobe uhci-hcd '
for 2.0 usb. ' modprobe ehci-hcd '

Usually only one of the first two will load. If you have 2.0 usb then the last is needed also. Now lets see what lsmod says.

Look to see if usb-storage is there in the list if not then ' modprobe usb-storage '
Now again with the md plugged in lets see what ' fdisk -l ' says

Brian1
" Google the Linux way @ http://www.google.com/linux "

Royle 02-24-2005 06:43 PM

Hmm, I don't seem to have them enabled as modules in my kernel. (DOH!), what do I have to enable as a module in my kernel for the usb modules? Oh my usb mouse and keyboard are working fine.

dastrike 02-24-2005 06:50 PM

Quote:

Originally posted by Royle
Hmm, I don't seem to have them enabled as modules in my kernel. (DOH!), what do I have to enable as a module in my kernel for the usb modules? Oh my usb mouse and keyboard are working fine.
What kernel you are using. And have you compiled it yourself or not? As the ones with sarge should have those modules. Or do you just mean you didn't have them loaded?

To find out your kernel version, execute uname -r

Royle 02-24-2005 07:21 PM

kernel-2.6.10. compiled myself.


All times are GMT -5. The time now is 12:52 PM.