LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problem with USB Key and creating the /dev/sda1 block device (https://www.linuxquestions.org/questions/slackware-14/problem-with-usb-key-and-creating-the-dev-sda1-block-device-213037/)

Ben2210 08-03-2004 04:27 PM

Problem with USB Key and creating the /dev/sda1 block device
 
Hi

I'm trying to get my USB key to work with slack 10, linux 2.6.

when I type (as root)

Code:

mount -tvfat -oumask=0000 /dev/sda1 /mnt/cle
it answers :

Code:

/dev/sda1 is not a valid block device
Yet I have created /dev/sda1 with mknod and here's the output of "ls -l /dev/sda1" :

Code:

brw-rw----  1 root disk 8, 1 2004-08-03 23:11 /dev/sda1
By the way : I have usb-storage and SCSI support in my kernel ; I have done "modprobe usb-storage", and dmesg then says

Code:

Initializing USB Mass Storage driver...
scsi0 : SCSI emulation for USB Mass Storage devices
  Vendor: Generic  Model: Flash R/W        Rev: 2002
  Type:  Direct-Access                      ANSI SCSI revision: 02
USB Mass Storage device found at 3
scsi1 : SCSI emulation for USB Mass Storage devices
  Vendor: IBEAD    Model: Multi Player      Rev: 0100
  Type:  Direct-Access                      ANSI SCSI revision: 02
USB Mass Storage device found at 4
usbcore: registered new driver usb-storage
USB Mass Storage support registered.

Can you help me ? Why can't I mount my USB key ?

tobyl 08-03-2004 06:13 PM

well I am toying with a usb stick myself at the moment.
I just got some success using
'modprobe sd-mod'
a glance at /dev shows sda and sda1 block devices were created at the same time.
then the mount command worked.

now to add something to fstab....

edit: sorry, that should read

modprobe sd_mod

blk96gt 08-03-2004 06:17 PM

Try replacing /dev/sda1 with /dev/scsi0 or /dev/scsi1 when using the mount command.

carboncopy 08-03-2004 07:36 PM

Some new pendrive are not partition as /dev/sda1
you can try mounting it as /dev/sda


I have come across this before (Apacer especially).

To be very sure:
fdisk -l /dev/sda

If there is no partition and the drive is still empty, I advice you to use fdisk to create a partition and format it again. It helps in compatibality across platforms (especially) Mac Os X.

Ben2210 08-04-2004 02:26 AM

thank you all for your replies !!

now it works !
the thing that got it to work was "modprobe sd-mod"
it's funny, but the SCSI device it creates is "/dev/sdb1" on my computer .... and I don't have a /dev/sda.... don't know how to explain this

so, for future newbies, here's a "HOWTO USB-KEY" :

0) create a mounting directory :
for instance, you might want to call it /mnt/usbkey
cd /mnt
mkdir usbkey

1) check that you've got the required modules in your kernel.
you need :
the USB&SCSI stuff
usb-storage
sd-mod
the FAT/VFAT filesystem

2) load the modules :
modprobe usb-storage
modprobe sd-mod

3) plug your USB key
as root, type "tail /var/log/messages" to check that the SCSI device has been created.
Code:

Aug  4 09:05:18 darkstar udev[4572]: creating device node '/dev/sdb1'
Aug  4 09:05:19 darkstar udev[4564]: creating device node '/dev/sdb'

note down the name of the device representing your partition on your USB key : here, it's /dev/sdb1.

4) mount your USB key. Of course, this can later be automatized by adding an entry to your /etc/fstab
assuming the previous step has given you /dev/sdb1, and your mounting point is /mnt/usbkey, type, as root :
Code:

mount -tauto -oumask=0000 /dev/sdb1 /mnt/usbkey
5) finished !

Ben2210 08-04-2004 02:42 AM

If it says "mount: you must specify the filesystem type
", try replacing -tauto by -tvfat in the mounting command.

It looks like the flash memory of a USB DSL modem can count as a mass storage device.


All times are GMT -5. The time now is 05:36 AM.