LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   USB pen drive not mounting. /dev/sda1 not present! (https://www.linuxquestions.org/questions/linux-hardware-18/usb-pen-drive-not-mounting-dev-sda1-not-present-199797/)

hamish 07-01-2004 03:59 AM

USB pen drive not mounting. /dev/sda1 not present!
 
Hey

I am trying to mount my pen drive however, I have run into a problem - I don't have a /dev/sda1. It was there (I mounted my girlfirend's pen drive about 3 weeks ago using it), but now it isn't. I guess I could have messed something up when I recomplied.

Important things loaded as modules, I have are:
vfat
fat
sg
usb_storage
ohci_hcd
ide_scsi
sr_mod
scsi_mod

In fstab, I have:
/dev/sda1 /mnt/usb auto noauto,user 0 0

Here is /dev stuff:

#ls /dev/s*
/dev/sequencer /dev/sequencer2 /dev/sg0 /dev/sg1 /dev/sr0 /dev/stderr /dev/stdin /dev/stdout

/dev/scsi:
host0 host1

/dev/sg:
c0b0t0u0 c1b0t0u0

/dev/shm:

/dev/snd:
controlC0 pcmC0D0c pcmC0D0p pcmC0D1c pcmC0D2p seq timer

/dev/sound:
adsp audio dsp mixer sequencer sequencer2

/dev/sr:
c0b0t0u0

When I try mounting any of the sr or sg devices, I'm told that it isn't a block device! Same goes for the /dev/scsi stuff. /dev/sr0 is my writable CD drive.

Eg:
root@archimedes hamish # mount -t vfat /dev/sg1 /mnt/usb/
mount: /dev/sg1 is not a block device

Here is my messages when I insert the pen drive:
root@archimedes hamish # tail /var/log/messages
Jul 1 09:58:51 archimedes [<c011ead7>] sys_gettimeofday+0x27/0xb0
Jul 1 09:58:51 archimedes [<c010917b>] syscall_call+0x7/0xb
Jul 1 09:58:51 archimedes
Jul 1 09:58:51 archimedes usb 1-1: new full speed USB device using address 5
Jul 1 09:58:51 archimedes scsi4 : SCSI emulation for USB Mass Storage devices
Jul 1 09:58:51 archimedes Vendor: Kingston Model: DataTraveler 2.0 Rev: 4.10
Jul 1 09:58:51 archimedes Type: Direct-Access ANSI SCSI revision: 02
Jul 1 09:58:51 archimedes Attached scsi generic sg1 at scsi4, channel 0, id 0, lun 0, type 0
Jul 1 09:58:51 archimedes WARNING: USB Mass Storage data integrity not assured
Jul 1 09:58:51 archimedes USB Mass Storage device found at 5

This says that /dev/sg1 is the device! But I'm told that it isn't a block device!

I have tested the drive in another linux and it worked fine.

Any suggestions?? PLease!

Hamish

max85nitro 07-01-2004 07:50 AM

I know this sounds weird, but try mounting it as /dev/sda, if you do not have an sda drive. On my other computer, I DO have an sda drive, and in that case the usb key should be mounted as sdb. More keys would be mounted as sdc, sdd, etc. This is probably because of the way SCSI works.

hamish 07-01-2004 08:18 AM

Hey!

Thanks for the help, however, the problem is that I don't actually have a /dev/sda file at all! This is really bugging me.

I have the same problem when I started using my cd-writer. That is, unless the modules doe scsi emulation wwere loaded, the /dev/cdrom device didn't exist. I feel that this is the same problem I'm having here! However, I can't figure it out. All the modules are loaded!

Hamish

M3Freak 07-05-2004 02:00 PM

USB memory keys are mass storage devices, so they don't come with partitions. This means when a USB key is mounted in Linux, it's mounted as a scsi device under /dev/sda, /dev/sdb etc. The actual device number depends on how your particular system is configured.

I've only been able to mount USB keys as /dev/sdb on my laptop. I've never been able to specify a partition (e.g. /dev/sdb1), but that makes sense since the USB key doesn't have any partitions on it.

Check out this How-To: http://www.systemsaligned.com/learn/howto/hwtusbkey. The How-To should help you to mount your USB memory key using autofs (instead of defining it in the fstab file, where removable devices really shouldn't be anyway). There are also useful links at the end of the How-To.

HTH,

Kanwar

hamish 07-07-2004 02:27 PM

Hey Kanwar,

thanks for that link. It has some good things on it.

The only problem is that I don't every have a /dev/sda file! This is really bugging! I'm sure that I've got all the right modules installed.

Any suggestions why a device would register? I already pointed out about the fact that my scsi emulated CD drive didn't work because of modules. But I think I have installed all of them.

Thanks
Hamish

M3Freak 07-07-2004 03:03 PM

When I plug in a USB memory key, my system has these modules loaded:

floppy
sg
usb_storage
sd_mod
scsi_mod
fat
vfat
uhci_hcd

You said you have these loaded:

vfat
fat
sg
usb_storage
ohci_hcd
ide_scsi
sr_mod
scsi_mod

I appear to have a few different modules loaded. Try loading the additional modules as well, and see if that fixes your problem.

Also, try to mount the drive at /mnt/usb with just "/dev/sg". Finally, make sure that /mnt/usb exists.

Good luck,

Kanwar

hamish 07-07-2004 03:32 PM

Fixed!

Thank you for your list of modules. It was the sd_mod one which was missing. I was sure that it was a module problem. Thank you again.

Hamish

bobshaffer2 03-17-2005 10:14 PM

How to make sd_mod load by itself
 
I had the same problem and solved it with the same solution (loading sd_mod).

What I would like to know is what I have to do to get this to load automatically when I plug in my USB storage devices.

joshisarang 01-11-2010 04:32 AM

hw to m ount pendrive in fedora 10
 
hello friend

anybody help to how can i mount pendrive in fedora 10

bobshaffer2 01-11-2010 08:25 PM

Quote:

Originally Posted by joshisarang (Post 3822213)
hello friend

anybody help to how can i mount pendrive in fedora 10

These days it is fairly trivial usually. Most people use KDE or Gnome Desktops, and the file browsing programs (konqueror and nautilus?) have some mechanism for seeing the available USB storage devices, mounting and unmounting them, etc. You can still mount them from the command line (as root) and they would be /dev/sdXn (where X is some letter like a,b,c,d and n is the partition, or maybe if it has no partition table the device /dev/sdX could be mounted).

Now if your pendrive has NTFS on it (do they ever have that?) then you probably need to make sure you have FUSE configured in the kernel and you have ntfs-3g (I think that's the name) installed in order to be able to mount it and have any useful write access. If it has FAT32 you will need to have the software package for vfat installed. (idk what it's called in FC)

If you're looking to put your root filesystem on such a drive, you usually need to create a partition table and set up an initrd image and all that, and I'm not sure how you do that on FC any more (maybe mkinitrd, but check the documentation for FC to be sure about how). You're probably not trying to do this anyway, but I figured I'd throw the info in anyway since, like I said, the mounting of a pendrive is usually really simple with HAL and everything being so commonly used.

Anyway, you shouldn't have any trouble as long as the pendrive is recognized. Most of them are picked up by the generic usb-storage driver, and most cameras and other devices like that are too. If you can't find the device listed in the file browser with your other removable media stuff, take a look at the output of the dmesg command right after you plug it in, and it should give you some clue as to what's going on.


All times are GMT -5. The time now is 10:35 PM.