LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 08-14-2008, 01:13 AM   #1
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 301

Rep: Reputation: 32
Removed bad hard drive from computer, now flash drive won't mount.


I think my subject says it all.

I had 3 hd in a RAID1 array. I removed a failing drive and now my flash drive won't mount. I suspect it is related to the fact that now my flash drive gets /dev/sdc (before it was /dev/sdd).

Any ideas on how to make the flash drive mount all they time - even if I remove a drive? Is there a way to specify what /dev/sdX the usb ports can have? Is there a way to set aside a /dev/sdX to not allow my flash drive to get this?
 
Old 08-14-2008, 01:48 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Remove or uncomment incorrect info in /etc/fstab. You have a number of distro's in your profile, so I'm not sure which one this is.

With SuSE, if you have an entry for the device in /etc/fstab, then Hal won't mount it. For removable devices, if you want to have an /etc/fstab entry instead, use either "LABEL=" or "UUID=" instead for removable devices. Then if it is assigned a different device node, it will still mount. Be sure to use the "noauto" option. If you use the "user" or "users" option together with the "uid=" and "gid=" options then you wouldn't need to su to root to mount it and you could have it mounted in ~/.profile. Then it would be mounted when you log in.

I think your main problem is the /dev/sdc exists in /etc/fstab and the info is incorrect.

Monitor /var/log/messages with "sudo -f /var/log/messages" and plug in the device. There may be a reason given why it wasn't auto-mounted.
 
Old 08-14-2008, 08:17 AM   #3
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 301

Original Poster
Rep: Reputation: 32
Thank you for the reply jschiwal!

I checked my /etc/fstab and was surprised to not find /dev/sdc. Here is my fstab:
Code:
proc            /proc           proc    defaults        0       0
/dev/md0        /               ext3    defaults,errors=remount-ro 0       1
/dev/md2        /home           ext3    defaults        0       2
/dev/md1        /var            ext3    defaults        0       2
/dev/md3        none            swap    sw              0       0
/dev/hda        /media/cdrom0   udf,iso9660 user,noauto     0       0
/dev/fd0        /media/floppy0  auto    rw,user,noauto  0       0
/dev/sdd1       /media/usb0     auto    rw,user,noauto  0       0
/dev/sdf1       /media/usb1     auto    rw,user,noauto  0       0
I am going to try out using the "LABEL=" or "UUID=" and I'll post back with my results.

P.S. This is happening with my debian system, however, the solution should be the same I suspect.

Last edited by checkmate3001; 08-14-2008 at 08:19 AM. Reason: added the fact that this under debian
 
Old 08-14-2008, 09:12 AM   #4
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 301

Original Poster
Rep: Reputation: 32
I'm having difficulty finding the uuid of the usb flash drive. I'm used to seeing a directory under /dev/disk called by-uuid. But for some reason (probably just the way it is with debian) there is no "by-uuid" directory.

How would I find out what the flash drive's uuid is?

This is my /var/log/messages:
Code:
/# tail -f /var/log/messages
Aug 14 07:00:49 intranet kernel: usb 3-3: USB disconnect, address 11
Aug 14 07:00:53 intranet kernel: usb 3-3: new high speed USB device using ehci_hcd and address 12
Aug 14 07:00:53 intranet kernel: usb 3-3: configuration #1 chosen from 1 choice
Aug 14 07:00:53 intranet kernel: scsi14 : SCSI emulation for USB Mass Storage devices
Aug 14 07:00:58 intranet kernel: scsi scan: INQUIRY result too short (5), using 36
Aug 14 07:00:58 intranet kernel: scsi 14:0:0:0: Direct-Access                                    PQ: 0 ANSI: 0
Aug 14 07:00:58 intranet kernel: sd 14:0:0:0: [sdc] Sector size 0 reported, assuming 512.
Aug 14 07:00:58 intranet kernel: sd 14:0:0:0: [sdc] 1 512-byte hardware sectors (0 MB)
Aug 14 07:00:58 intranet kernel: sd 14:0:0:0: [sdc] Write Protect is off
Aug 14 07:00:58 intranet kernel: sd 14:0:0:0: [sdc] Sector size 0 reported, assuming 512.
Aug 14 07:00:58 intranet kernel: sd 14:0:0:0: [sdc] 1 512-byte hardware sectors (0 MB)
Aug 14 07:00:58 intranet kernel: sd 14:0:0:0: [sdc] Write Protect is off
Aug 14 07:00:58 intranet kernel:  sdc: sdc1
Aug 14 07:00:58 intranet kernel:  sdc: p1 exceeds device capacity
Aug 14 07:00:58 intranet kernel: sd 14:0:0:0: [sdc] Attached SCSI disk
Aug 14 07:00:58 intranet kernel: attempt to access beyond end of device
Aug 14 07:00:58 intranet kernel: sdc: rw=0, want=3968904, limit=1
Aug 14 07:00:58 intranet kernel: __ratelimit: 70 messages suppressed
Aug 14 07:00:58 intranet kernel: attempt to access beyond end of device
Aug 14 07:00:58 intranet kernel: sdc: rw=0, want=3968904, limit=1
Aug 14 07:00:58 intranet kernel: attempt to access beyond end of device
Aug 14 07:00:58 intranet kernel: sdc: rw=0, want=3969024, limit=1
Aug 14 07:00:58 intranet kernel: attempt to access beyond end of device
Aug 14 07:00:58 intranet kernel: sdc: rw=0, want=3969024, limit=1
Aug 14 07:00:58 intranet kernel: attempt to access beyond end of device
The errors continue on for quite a while. I believe my RAID is to blame. If I had to guess I would assume that it is trying to add /dev/sdc to the array but obviously the flash drive is not big enough.

I would like to get rid of these error messages, but perhaps this is the way mdadm is once it is told that there should be 3 drives there and one is missing.

Back to the uuid issue:
Here is what I find in /dev/disk:
Code:
/# tree /dev/disk
|-- by-id
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98033008 -> ../../sda
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98033008-part1 -> ../../sda1
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98033008-part2 -> ../../sda2
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98033008-part5 -> ../../sda5
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98033008-part6 -> ../../sda6
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98033008-part7 -> ../../sda7
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98511522 -> ../../sdb
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98511522-part1 -> ../../sdb1
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98511522-part2 -> ../../sdb2
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98511522-part5 -> ../../sdb5
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98511522-part6 -> ../../sdb6
|   |-- ata-WDC_WD1600AAJS-0-WD-WCAP98511522-part7 -> ../../sdb7
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98033008 -> ../../sda
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98033008-part1 -> ../../sda1
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98033008-part2 -> ../../sda2
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98033008-part5 -> ../../sda5
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98033008-part6 -> ../../sda6
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98033008-part7 -> ../../sda7
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98511522 -> ../../sdb
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98511522-part1 -> ../../sdb1
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98511522-part2 -> ../../sdb2
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98511522-part5 -> ../../sdb5
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98511522-part6 -> ../../sdb6
|   |-- scsi-SATA_WDC_WD1600AAJS-_WD-WCAP98511522-part7 -> ../../sdb7
|   |-- usb-JetFlash_Mass_Storage_Device_9T7DRWJG5UXH -> ../../sdc
|   `-- usb-JetFlash_Mass_Storage_Device_9T7DRWJG5UXH-part1 -> ../../sdc1
`-- by-path
    |-- pci-0000:00:02.1-ide-0:0 -> ../../hda
    |-- pci-0000:00:03.2-usb-0:3:1.0-scsi-0:0:0:0 -> ../../sdc
    |-- pci-0000:00:03.2-usb-0:3:1.0-scsi-0:0:0:0-part1 -> ../../sdc1
    |-- pci-0000:01:0e.0-scsi-0:0:0:0 -> ../../sda
    |-- pci-0000:01:0e.0-scsi-0:0:0:0-part1 -> ../../sda1
    |-- pci-0000:01:0e.0-scsi-0:0:0:0-part2 -> ../../sda2
    |-- pci-0000:01:0e.0-scsi-0:0:0:0-part5 -> ../../sda5
    |-- pci-0000:01:0e.0-scsi-0:0:0:0-part6 -> ../../sda6
    |-- pci-0000:01:0e.0-scsi-0:0:0:0-part7 -> ../../sda7
    |-- pci-0000:01:0e.0-scsi-2:0:0:0 -> ../../sdb
    |-- pci-0000:01:0e.0-scsi-2:0:0:0-part1 -> ../../sdb1
    |-- pci-0000:01:0e.0-scsi-2:0:0:0-part2 -> ../../sdb2
    |-- pci-0000:01:0e.0-scsi-2:0:0:0-part5 -> ../../sdb5
    |-- pci-0000:01:0e.0-scsi-2:0:0:0-part6 -> ../../sdb6
    `-- pci-0000:01:0e.0-scsi-2:0:0:0-part7 -> ../../sdb7
None of those look like a uuid to me. I'm stuck... any advice?
 
Old 08-14-2008, 10:30 AM   #5
yancek
Senior Member
 
Registered: Apr 2008
Distribution: PCLinux, Ubuntu, Slackware
Posts: 4,825

Rep: Reputation: 748Reputation: 748Reputation: 748Reputation: 748Reputation: 748Reputation: 748Reputation: 748
In terminal type "blkid", should show uuid for all partitions.
 
Old 08-14-2008, 11:29 PM   #6
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 301

Original Poster
Rep: Reputation: 32
Now that is a handy command! I have got to remember that one.

Unfortunately... with the flash drive plugged in (it should be /dev/sdc)...
Code:
~# blkid
/dev/sda1: UUID="3c9a917a-ffbb-48ec-ba0b-f89291076914" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda5: UUID="61f2cff8-87f2-4738-9d2f-f246f302f95d" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda6: UUID="df6ce63b-4c87-4bba-8f00-5b9ab2d91d15" SEC_TYPE="ext2" TYPE="ext3"
/dev/sda7: TYPE="swap"
/dev/sdb1: UUID="3c9a917a-ffbb-48ec-ba0b-f89291076914" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb5: UUID="61f2cff8-87f2-4738-9d2f-f246f302f95d" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb6: UUID="df6ce63b-4c87-4bba-8f00-5b9ab2d91d15" SEC_TYPE="ext2" TYPE="ext3"
/dev/sdb7: TYPE="swap"
/dev/md3: TYPE="swap"
/dev/md0: UUID="3c9a917a-ffbb-48ec-ba0b-f89291076914" SEC_TYPE="ext2" TYPE="ext3"
/dev/md1: UUID="61f2cff8-87f2-4738-9d2f-f246f302f95d" SEC_TYPE="ext2" TYPE="ext3"
/dev/md2: UUID="df6ce63b-4c87-4bba-8f00-5b9ab2d91d15" SEC_TYPE="ext2" TYPE="ext3"
That's all I get.

I'm gonna mess with mdadm. I blame it. I think I'm going to have to convince it that there isn't a spare drive. I'll just add it back later... we'll see what happens.
 
Old 08-15-2008, 12:03 AM   #7
checkmate3001
Member
 
Registered: Sep 2007
Location: Folsom, California
Distribution: Debian 4.0 (Etch), Debian 5.0 (Lenny), Ubuntu 8.04
Posts: 301

Original Poster
Rep: Reputation: 32
poor kernel compile was the culprit. I'm an idiot.

I wanted to thank you guys for all your advice. I must admit I learned some things. So that's always good.

It turned out the whole problem was ibtk (idiot behind the keyboard). I compiled my own kernel about a week or so ago and had no problem using a card reader so far. But then I bought a flash drive and that was a no go.

I (on a whim) booted up the original kernel just a few minutes ago and the flash drive worked like a charm. I'm going to take another look at what I did wrong with the kernel compile and will hopefully post what change makes it work (or not work).

Thank you everyone for your time.
 
  


Reply

Tags
drive, flash, hard, mount, remove


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Mount existing linux hard drive in new linux computer linux_linux Linux - Software 3 03-15-2008 09:43 PM
cannot delete drive from root desktop - cannot mount usb flash drive - openSuSE 10.2 bluecog6 Linux - General 6 01-29-2007 03:18 PM
usb drive won't mount - error: wrong fs type, bad option, bad superblock on /dev/sda1 bluecog6 Linux - Hardware 4 01-27-2007 09:07 AM
bad superblock when trying to mount a USB hard drive shubb Linux - Hardware 4 04-29-2005 12:00 AM
New Linux Install removed secondary hard drive partition suderfield Linux - Newbie 7 06-26-2003 04:15 PM


All times are GMT -5. The time now is 09:43 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration