LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 09-09-2005, 04:21 PM   #1
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Rep: Reputation: 15
USB Thumb Drive Will Not Mount Unless Present During Boot.


Actually, the title sort of says it all. I've set my thumb drive up in my fstab, but it will only mount if it was plugged in during boot. Otherwise, I get the following error:

mount: wrong fs type, bad option, bad superblock on /dev/sda,
or too many mounted file systems


I'm guessing this has something to do with hotplug, though it was my understanding that hotplug operates all the time, not just at boot.

Anyway, I can't figure out what I'm not doing, and would appreciate assistance.
 
Old 09-09-2005, 04:43 PM   #2
Poetics
Senior Member
 
Registered: Jun 2003
Location: California
Distribution: Slackware
Posts: 1,181

Rep: Reputation: 49
have you tried mounting /dev/sda1 instead of just /dev/sda ? That was my problem at first as well.
 
Old 09-09-2005, 04:49 PM   #3
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
Yup, I just tried it again, and sda1 is still not a valid block device.
 
Old 09-10-2005, 12:35 AM   #4
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 38
After plugging the drive in, use the following command to check how the drive is identified:
Code:
tail -s 3 -f /var/log/messages
then mount it as the identified device.


The output on my system after plugging in my camera is
Code:
tail -s 3 -f /var/log/messages
Sep 10 08:28:54  kernel: SCSI device sda: 494753 512-byte hdwr sectors (253 MB)
Sep 10 08:28:54  kernel: sda: assuming Write Enabled
Sep 10 08:28:54  kernel: SCSI device sda: 494753 512-byte hdwr sectors (253 MB)
Sep 10 08:28:54  kernel: sda: assuming Write Enabled
Sep 10 08:28:54  udev[18731]: creating device node '/dev/sda'
Sep 10 08:28:54  kernel:  sda: sda1
Sep 10 08:28:54  kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Sep 10 08:28:54  kernel: Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
Sep 10 08:28:55  udev[18739]: creating device node '/dev/sda1'
Sep 10 08:28:55  udev[18755]: creating device node '/dev/sg0'
so I would mount it with "mount /dev/sda1 /mnt/camera" (if I had a directory "camera" under /mnt)
 
Old 09-10-2005, 06:22 AM   #5
rkrishna
Member
 
Registered: Mar 2005
Location: chennai(madras), India
Distribution: slackware ofcourse
Posts: 654

Rep: Reputation: 32
r u enabled hotplug start, do u enabled it in kernel

do a dmesg after plugging the usb, if u have enabled hotplug
c what the device is labeled as most probably it will b in /dev/sda1

if so u could mout it as u desire if u want u count mount it in /mnt/cdrom hi
 
Old 09-10-2005, 08:42 PM   #6
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by mdg
After plugging the drive in, use the following command to check how the drive is identified:
Code:
tail -s 3 -f /var/log/messages
then mount it as the identified device.


The output on my system after plugging in my camera is
Code:
tail -s 3 -f /var/log/messages
Sep 10 08:28:54  kernel: SCSI device sda: 494753 512-byte hdwr sectors (253 MB)
Sep 10 08:28:54  kernel: sda: assuming Write Enabled
Sep 10 08:28:54  kernel: SCSI device sda: 494753 512-byte hdwr sectors (253 MB)
Sep 10 08:28:54  kernel: sda: assuming Write Enabled
Sep 10 08:28:54  udev[18731]: creating device node '/dev/sda'
Sep 10 08:28:54  kernel:  sda: sda1
Sep 10 08:28:54  kernel: Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
Sep 10 08:28:54  kernel: Attached scsi generic sg0 at scsi0, channel 0, id 0, lun 0,  type 0
Sep 10 08:28:55  udev[18739]: creating device node '/dev/sda1'
Sep 10 08:28:55  udev[18755]: creating device node '/dev/sg0'
so I would mount it with "mount /dev/sda1 /mnt/camera" (if I had a directory "camera" under /mnt)

Okay, judging from the output of tailing /var/log/messages, my system is acknowledging the presence of the drive, but not really creating any device for it. This is what I get when I plug the thing in and out hot:

Code:
Sep 10 21:17:39 darkstar kernel: usb.c: USB disconnect on device 00:10.2-1 address 6
Sep 10 21:17:39 darkstar kernel: usb.c: USB disconnect on device 00:10.2-1.1 address 7
Sep 10 21:19:05 darkstar kernel: hub.c: new USB device 00:10.2-1, assigned address 8
Sep 10 21:19:05 darkstar kernel: hub.c: USB hub found
Sep 10 21:19:05 darkstar kernel: hub.c: 1 port detected
Sep 10 21:19:06 darkstar kernel: hub.c: new USB device 00:10.2-1.1, assigned address 9
Sep 10 21:19:35 darkstar kernel: usb.c: USB disconnect on device 00:10.2-1 address 8
Sep 10 21:19:35 darkstar kernel: usb.c: USB disconnect on device 00:10.2-1.1 address 9
Sep 10 21:19:47 darkstar kernel: hub.c: new USB device 00:10.2-1, assigned address 10
Sep 10 21:19:47 darkstar kernel: hub.c: USB hub found
Sep 10 21:19:47 darkstar kernel: hub.c: 1 port detected
Sep 10 21:38:31 darkstar -- MARK --
And that's all she wrote. I have no idea what to do about it, though. What is not happening now that evidently happens during boot?

Last edited by IamI; 09-10-2005 at 08:54 PM.
 
Old 09-11-2005, 11:08 AM   #7
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
Now the damn thing doesn't work at all. It worked once, but I haven't changed anything. What the hell?
 
Old 09-11-2005, 11:26 AM   #8
mdg
Member
 
Registered: Sep 2003
Distribution: Slackware
Posts: 626

Rep: Reputation: 38
Well, I don't know what the problem is, maybe the fstab entry, maybe modules not loading?

Anyway, here's the page I used to set up my usb stick, have a look through and compare.
 
Old 09-11-2005, 01:15 PM   #9
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
Quote:
Originally posted by mdg
Well, I don't know what the problem is, maybe the fstab entry, maybe modules not loading?

Anyway, here's the page I used to set up my usb stick, have a look through and compare.

Line for line, that's preciesly what I did, except that it showed up as /dev/sda. And it worked twice: the first time immediately after I set everything up, and then once after a reboot cycle. Now, it does not work at all no matter what I try, and I haven't changed anything permanent. I've modprobed usb-storage out the wazoo, and that does not appear to be the problem.

I dunno. Something must be different, but I can't for the life of me pin down what it is. It's not the stick itself; it still performs happily in XP.
 
Old 09-11-2005, 02:33 PM   #10
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
Oh, so *now* it's /dev/sdb. I wonder how long that will last.


~Edit~

Okay, that was my problem. Slack decided to pull a fast one on me.

Last edited by IamI; 09-11-2005 at 02:45 PM.
 
Old 02-19-2006, 09:17 PM   #11
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Rep: Reputation: 31
Quote:
Originally Posted by IamI
Oh, so *now* it's /dev/sdb. I wonder how long that will last.

~Edit~

Okay, that was my problem. Slack decided to pull a fast one on me.
I know this is an old thread, but I've been fighting this issue for about a week, and this is the FIRST post that gave me any idea of what to look for - specifically, I noticed that my system was pointing to the thumb drive as "/dev/sdd1" instead of "/dev/sda1" like my other usb devices (I didn't know that was even a possibility???.) I WAS able to mount the thumb drive when I pointed to /dev/sdd1. Possible stupid question - would it be worthwhile to add an additional line to my /etc/fstab file to account for this situation? I just tried my Olympus camera as well while typing this - THAT device went to /dev/sdb1??? Can somebody possibly explain what's happening here? I haven't read anything anywhere about Linux/Slackware rotating/changing which scsi device path different devices get assigned - if there IS a page somewhere describing this I'd appreciate it if somebody posted a link to it.

Thanks.
 
Old 02-20-2006, 04:47 AM   #12
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
Thanks for the thread necromancy. I'd forgotten about it, and I still have this irritating problem with Slack.
 
Old 02-20-2006, 04:58 AM   #13
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
GNU/Linux assigns devices by the order they are originally detected.

For example: first USB device it finds maybe /dev/sda, but if you unplug it hot, then plug back into another port, it may decide that it's /dev/sdb.

If you do it enough with enough devices/ports, you can easily get to /dev/sdz. After that, I have no idea....... /dev/sd@ or sd+.....

Any ideas? Hmm.....Sounds like an interesting research project....

Last edited by cwwilson721; 02-20-2006 at 05:00 AM.
 
Old 02-20-2006, 07:57 AM   #14
pnellesen
Member
 
Registered: Oct 2004
Location: Missouri, USA
Distribution: Slackware 12.2, Xubuntu 9.10
Posts: 371

Rep: Reputation: 31
Quote:
Originally Posted by cwwilson721
GNU/Linux assigns devices by the order they are originally detected.

For example: first USB device it finds maybe /dev/sda, but if you unplug it hot, then plug back into another port, it may decide that it's /dev/sdb.
So, any ideas on how one sets up /etc/fstab for this? I played with it a few more times last night, and it "appeared" that the devices maintained their assignments, meaning no matter how many times I disconnected the thumb drive it was assigned the same device path, and the same behavior for my camera. As long as this behavior's consistent, it's not a problem, though I'd hate to have to create an entirely new mount point for each and every new device I'd attach.

Note that this is all on the same USB port - I haven't connected 1 device to 1 port, the next to another (I've only got 2 ports on the machine anyway...)

Thanks,
 
Old 02-20-2006, 05:02 PM   #15
IamI
Member
 
Registered: Mar 2004
Location: Dreary, Pennsylvania USA
Distribution: Slackware 10.2
Posts: 77

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by pnellesen
So, any ideas on how one sets up /etc/fstab for this?

Or perhaps more to the point: is there any way to reserve /dev devices that will remain stable and be assigned only to a specific device that may or may not be present at any given time?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to mount thumb drive? seattledaze Linux - Hardware 4 03-22-2006 12:50 PM
How do you mount a usb thumb drive? stakhous Linux - Hardware 16 03-04-2006 03:41 AM
making usb thumb/pen drive to boot linux rohdimp_24 Linux - Software 2 07-11-2005 01:21 PM
I need a cd that will boot my usb thumb drive Javahulk Linux - General 4 03-23-2005 12:20 PM
Cannot mount thumb drive moxieman99 Linux - Newbie 4 10-09-2004 02:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:31 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration