LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Slack 11.0 & Laptop & USB stick (https://www.linuxquestions.org/questions/slackware-14/slack-11-0-and-laptop-and-usb-stick-544646/)

Van Der Berg 04-09-2007 05:46 PM

Slack 11.0 & Laptop & USB stick
 
hi everyone!

i am kinda linux novice that just enjoys playing with distributions. i have tried a dozens of linux distributions, but it seems that
i always return to good old slackware. a few days ago i have downloaded the slackware 11.0, installed it, compiled a 2.6.18 kernel with usb support, and everything is working just fine except that linux won't recognise my USB stick!

i have a usb mouse and kernel don't have any problems using it (well, it did have problems before i enabled support for usb hotplug (or something like that :) ) in kernel), but i just don't know how to mount USB stick! on previous versions, on desktops, i would just enter

mount -t vfat /dev/sda1 /mnt/usb

and everything worked just fine. but now, when i enter that, it says something like '/dev/sda1 is not known'.

so, how can i find out which is the device for my USB stick and how can i fix that linux automatically mount USB stick when i insert one.

just to mention, i have a HP ZV6000 laptop, 4 usb ports, on one is usb mouse that is working just fine!

and big salutation to all slack fans!

erklaerbaer 04-09-2007 05:55 PM

you'll need support for scsi devices, usb storage and a host controller(uhci/ohci + ehci for usb2.0) in your kernel.

why don't you just use the 2.6.17.13 kernel, that shipped with slackware?

Nem 04-09-2007 06:22 PM

You can try run command tail -f /var/log/messages
and dmesg when you plug in your usb stick.

Make sure you have a usb line in your /etc/fstab
file.
Code:

/dev/sda1      /mnt/memory        auto            users,rw        0      0
You can then just mount the usb with kdiskfree
if you're using KDE.
I cna mount it too through command line
like this
Code:

mount -t vfat /dev/sda1 /mnt/memory]

GamerX 04-09-2007 06:53 PM

I compiled 2.6.18.8 kernel and it works fine with my USB stick, here's a few things to make live easier:
Device Drivers -> USB Support and include:
- USB device filesystem
- USB Mass Storage support

Device Drivers -> SCSI device support -> SCSI disk support
When you format your USB drive probably want to make it FAT16, this way you can read it on pretty much any OS and add a label to it! This helps you ion the following way, when you add SCSI disks they will become sda, sdb, sdc, etc... it only depends on the order they were plugged in/discovered by the system. When you label a disk you get the following handle to the corresponding device:
/dev/disks/by-label/FAT16-LABEL
so then you can something like this in fstab:
Code:

/dev/disk/by-label/USB-ARC01    /media/archive01        ntfs            defaults,umask=222,ro  1      3
/dev/disk/by-label/SERGE-USB01  /media/serge-usb01      vfat            defaults,user,dev,exec  1      3

the 1st one is an external USB HDD and the second one is my USB stick and no matter which way they are plugged in they get mounted to the expected place =)

To label FAT partitions you will need to install the package dosfstools, available in slackware's repository.

EDIT: O and don't forget to include the appropriate file system in the kernel =)

Van Der Berg 04-10-2007 02:40 AM

ouch, i have probably forgot to add a SCSI disk support in kernel, i'll try that...
btw, kernel 2.6.18 also comes with slack 11.0, on testing directiry...that is where i have installed it from

Van Der Berg 04-10-2007 07:28 AM

no, it's not that...scsi support is enabled, also a support for usb mass storage, but still
when i try to mount it, it says
'sda1 block device doesn't exist'

Van Der Berg 04-10-2007 07:30 AM

when i enter 'tail -f /var/log/messages', if i insert usb disk, it says
'usb 1-4 : new high speed USB device using ehci_hcd and adress 4'
'usb 1-4 : configuration #1 chosen from 1 choice'

but where is it?

GamerX 04-10-2007 11:37 AM

My /var/log/messages says so
Code:

Apr 10 09:31:05 sm-linux kernel: usb 1-3: new high speed USB device using ehci_hcd and address 3
Apr 10 09:31:06 sm-linux kernel: usb 1-3: configuration #1 chosen from 1 choice
Apr 10 09:31:06 sm-linux kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Apr 10 09:31:11 sm-linux kernel:  Vendor: OCZ      Model: ET1208AD          Rev: 1.0
Apr 10 09:31:11 sm-linux kernel:  Type:  Direct-Access                      ANSI SCSI revision: 02
Apr 10 09:31:11 sm-linux kernel: SCSI device sda: 4095999 512-byte hdwr sectors (2097 MB)
Apr 10 09:31:11 sm-linux kernel: sda: Write Protect is off
Apr 10 09:31:11 sm-linux kernel: SCSI device sda: 4095999 512-byte hdwr sectors (2097 MB)
Apr 10 09:31:11 sm-linux kernel: sda: Write Protect is off
Apr 10 09:31:11 sm-linux kernel:  sda: sda1
Apr 10 09:31:11 sm-linux kernel: sd 0:0:0:0: Attached scsi removable disk sda
Apr 10 09:31:11 sm-linux kernel: sd 0:0:0:0: Attached scsi generic sg0 type 0

Probably you need SCSI emulation enabled as well (under Device Drivers -> ATA/ATAPI/MFM/RLL support)

pitachok 04-10-2007 03:00 PM

Since you are using laptop and 2.6 kernel that supports scsi, your system(s) on the hard drive must be mounted as sda* (at least it is so on my laptop). In this case the usb devices are mounted on /dev/uba1 and /dev/ubb1 (I have 2 usb ports).
In addition when you insert flash disk, for example, the dmesg can show you the name of the device. So, I'd suggest you to try
mount /dev/uba1 /mnt/...


All times are GMT -5. The time now is 01:23 AM.