LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-04-2004, 09:55 AM   #1
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
USBStorage Hell: fstab, mount, kudzu, drakupdate_fstab


Hello,

I was running MDK 9.1, on a 1GHz PIII, 512MB RAM. I have a USB 1.1 flashdrive: It was nice: I plugged it in, the icon appeared, I used it, then right-clicked the icon to unmount & then remove it.

I got myself a LaCie 200MB USB 2.0 HDD for backups but I couldn't get it to work with USB1.1, so I bought a Belkin PCI -> 5 port USB card. I couldn't get MDK 9.1 to "see" the new USB card, so I upgraded to 10.0 (free on a Linux Format DVD). I am still running the 'old' kernel: 2.4.21-0.13mdk. MDK 10.0 is an improvement..... sort of.

usbview sees my USB controllers, and things connected to them.

Here is my fstab:
Code:
/dev/hda5 / ext3 defaults,noatime 1 1
/dev/hda7 /home ext3 defaults,noatime 1 2
/dev/hda6 swap swap defaults 0 0
/dev/hdb6 /mnt/NewHome ext3 defaults,noatime 1 2
/dev/hdb1 /mnt/NewRoot ext3 defaults,noatime 1 2
/dev/hda1 /mnt/win_c vfat iocharset=iso8859-15,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
none /dev/pts devpts mode=0620 0 0
none /mnt/dvd supermount dev=/dev/hdc,fs=auto,ro,--,iocharset=iso8859-15,codepage=850,umask=0 0 0
none /mnt/cdrom supermount dev=/dev/hdd,fs=auto,ro,--,iocharset=iso8859-15,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,user,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0
I plug in my USB flashdrive. (It has a DOS filesystem). The icon appears on the desktop.
The following is appended to /var/log/messages:
Code:
hub.c: new USB device 00:1f.2-2, assigned address 3
usb.c: USB device 3 (vend/prod 0x8ec/0x12) is not claimed by any active driver.
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
scsi0 : SCSI emulation for USB Mass Storage devices
   Vendor: disgo     Model: disgo             Rev: 4.60
   Type:   Direct-Access                      ANSI SCSI revision: 02
Attached scsi removable disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 239872 512-byte hdwr sectors (123 MB)
sda: Write Protect is off
  /dev/scsi/host0/bus0/target0/lun0: p1
 USB Mass Storage support registered.
 scsi.agent[2739]: disk at devices/scsi0/0:0:0:0
 perl: drakupdate_fstab called with --auto --add /dev/scsi/host0/bus0/target0/lun0/part1
The following line has been added to my fstab (presumably by drakupdate_fstab) :
Code:
none /mnt/removable supermount dev=/dev/scsi/host0/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,kudzu,codepage=850 0 0
When I try and open the new hard disk icon on the desktop, konqueror says "Could not enter folder /mnt/removable".
If I try to cd /mnt/removable as root I get this error:
bash: cd: /mnt/removable: Input/output error

So I just did 'umount /mnt/removable' to be tidy and remove the flashdrive. There were no errors in unmounting it, but the flashdrive wasn't accessable.
==============================================

Now I plugged in the USB 2.0 LaCie HDD. It spins up.
The following is added to /var/log/messages:
Code:
Sep  4 12:14:33 localhost kernel:hub.c: new USB device 02:09.2-5, assigned address 2
Sep  4 12:14:33 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Sep  4 12:14:33 localhost kernel:   Vendor: WDC WD20  Model: 00BB-00DWA0       Rev: 15.0
Sep  4 12:14:33 localhost kernel:   Type:   Direct-Access                      ANSI SCSI revision: 02
Sep  4 12:14:33 localhost kernel: Attached scsi disk sdb at scsi1, channel 0, id 0, lun 0
Sep  4 12:14:33 localhost kernel: SCSI device sdb: 390721968 512-byte hdwr sectors (200050 MB)
Sep  4 12:14:33 localhost scsi.agent[2968]: disk at devices/scsi1/1:0:0:0
Sep  4 12:14:33 localhost kernel:  /dev/scsi/host1/bus0/target0/lun0: p1
Sep  4 12:14:34 localhost perl: drakupdate_fstab called with --auto --add /dev/scsi/host1/bus0/target0/lun0/part1
Sep  4 12:14:34 localhost kernel: cdrom: open failed.
Sep  4 12:14:34 localhost kernel: end_request: I/O error, dev 02:00 (floppy), sector 0
Sep  4 12:14:34 localhost kernel: cdrom: open failed.
Sep  4 12:14:34 localhost kernel: Device not ready.  Make sure there is a disc in the drive.
Sep  4 12:14:34 localhost kernel: sda : READ CAPACITY failed.
Sep  4 12:14:34 localhost kernel: sda : status = 1, message = 00, host = 0, driver = 08
Sep  4 12:14:34 localhost kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready
Sep  4 12:14:34 localhost kernel: sda : block size assumed to be 512 bytes, disk size 1GB.
Sep  4 12:14:34 localhost kernel:  /dev/scsi/host0/bus0/target0/lun0: I/O error: dev 08:00, sector 0
Sep  4 12:14:34 localhost kernel:  I/O error: dev 08:00, sector 0
Sep  4 12:14:34 localhost kernel:  I/O error: dev 08:00, sector 2097144
Sep  4 12:14:34 localhost kernel:  I/O error: dev 08:00, sector 2097144
Sep  4 12:14:34 localhost kernel:  I/O error: dev 08:00, sector 0
Sep  4 12:14:34 localhost kernel:  I/O error: dev 08:00, sector 0
Sep  4 12:14:34 localhost kernel: ldm_validate_partition_table(): Disk read failed.
Sep  4 12:14:34 localhost kernel:  I/O error: dev 08:00, sector 0
Sep  4 12:14:36 localhost perl: drakupdate_fstab called with --auto --del /dev/scsi/host0/bus0/target0/lun0/part1
Sep  4 12:14:36 localhost kernel: Device not ready.  Make sure there is a disc in the drive.
Sep  4 12:14:36 localhost kernel: sda : READ CAPACITY failed.
Sep  4 12:14:36 localhost kernel: sda : status = 1, message = 00, host = 0, driver = 08
Sep  4 12:14:36 localhost kernel: Info fld=0xa00 (nonstd), Current sd00:00: sense key Not Ready
Sep  4 12:14:36 localhost kernel: sda : block size assumed to be 512 bytes, disk size 1GB.
Sep  4 12:14:36 localhost kernel:  /dev/scsi/host0/bus0/target0/lun0: I/O error: dev 08:00, sector 0
Sep  4 12:14:36 localhost kernel:  I/O error: dev 08:00, sector 0
Sep  4 12:14:36 localhost kernel:  I/O error: dev 08:00, sector 2097144
Sep  4 12:14:36 localhost kernel:  I/O error: dev 08:00, sector 2097144
Sep  4 12:14:36 localhost kernel:  I/O error: dev 08:00, sector 0
Sep  4 12:14:36 localhost kernel:  I/O error: dev 08:00, sector 0
Sep  4 12:14:36 localhost kernel: ldm_validate_partition_table(): Disk read failed.
Sep  4 12:14:36 localhost kernel:  I/O error: dev 08:00, sector 0
Sep  4 12:14:36 localhost kernel: Device not ready.  Make sure there is a disc in the drive.
Sep  4 12:14:36 localhost kernel: sda : READ CAPACITY failed.
The above does not look good, but usbview sees the LaCie drive (which is formatted as ext3), which it did not under MDK9.1.
There is another new icon on the desktop: Hard Disk (part1) [/mnt/removable2] but I cannot open it. konqueror says "Could not enter folder /mnt/removable2". I cannot 'cd /mnt/removable2' as root either (bash: cd: /mnt/removable2: Input/output error)

My fstab has been changed again:
Code:
/dev/hda5 / ext3 defaults,noatime 1 1
none /dev/pts devpts mode=0620 0 0
/dev/hda7 /home ext3 defaults,noatime 1 2
/dev/hdb6 /mnt/NewHome ext3 defaults,noatime 1 2
/dev/hdb1 /mnt/NewRoot ext3 defaults,noatime 1 2
none /mnt/cdrom supermount dev=/dev/hdd,fs=auto,ro,--,iocharset=iso8859-15,codepage=850,umask=0 0 0
none /mnt/dvd supermount dev=/dev/hdc,fs=auto,ro,--,iocharset=iso8859-15,codepage=850,umask=0 0 0
none /mnt/floppy supermount dev=/dev/fd0,fs=auto,--,user,iocharset=iso8859-15,sync,codepage=850,umask=0 0 0
none /mnt/removable2 supermount dev=/dev/scsi/host1/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,kudzu,codepage=850 0 0
/dev/hda1 /mnt/win_c vfat iocharset=iso8859-15,codepage=850,umask=0 0 0
none /proc proc defaults 0 0
/dev/hda6 swap swap defaults 0 0
I unmounted the LaCie, and disconnected it as it looks as though the filesystem is trashed.

In desperation, I removed all references to the USB flashdrive from fstab, and then added the line from MDK 9.1 that worked there:

Code:
/dev/sda1 /mnt/removable auto user,iocharset=iso8859-15,kudzu,codepage=850,noauto,umask=0,exec 0 0
After a reboot with the flash drive plugged in, I can now access the flashdrive at /mnt/removable from MDK 10.0, but yet ANOTHER icon (Hard Disk (part1) [/mnt/removable3]) has appeared, along with another addition to fstab:
Code:
none /mnt/removable3 supermount dev=/dev/scsi/host0/bus0/target0/lun0/part1,fs=ext2:vfat,--,umask=0,iocharset=iso8859-15,kudzu,codepage=850 0 0
I plugged inthe LaCie again, and as root using the command line, I found the LaCie HDD at /dev/sdb. I repartitioned it, and did mke2fs -j /dev/sdb1. I mounted it manually with mount -t ext3 /dev/sdb1 /mnt/removable. I can move files to and from it, so the USB subsystem is working correctly, and the drive(s) are not damaged, but this semi-automatic mounting business is a BIG muddle and is driving me insane.

Any ideas where the problem lies? I am highly suspicious of supermount and kudzu and drakupdate_fstab (which is a perl script, and I don't know perl), and the man pages are ominously silent. What is making changes to my fstab, and apparently getting them wrong? This is the sort of insane behaviour I expect from windows, not linux.

In an ideal world I would like EITHER:

1] To be able to mount my USB filesystems completely manually (Flashdrive on /mnt/disgo, LaCie HDD on /mnt/LaCie)

-OR-

2] Let linux take care of it so that plugging in the disgo flashdrive mounts it at the proper place, and / or plugging in the USB HDD mounts that at the proper place.

Suggestions welcome.
Thanks.
 
Old 09-05-2004, 06:03 PM   #2
zatriz
Member
 
Registered: Aug 2003
Location: Seattle, Wa
Distribution: Fedora,Trustix,Debian
Posts: 290

Rep: Reputation: 30
make another directory in /mnt called usbhdd
mkdir /mnt/usbhdd
delete the line
none /mnt/removable3 supermount ev=/dev/scsi/host0/bus0/target0/lun0/part1, fs=ext2: vfat,--, umask=0, iocharset=iso8859-15,kudzu,codepage=850 0 0
from the fstab.
and add your own custom one
like something like this
/dev/sdb1 /mnt/usbhdd auto user,iocharset=iso8859-15,kudzu,codepage=850, noauto,umask=0,exec 0 0
 
Old 09-06-2004, 05:54 AM   #3
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,085

Original Poster
Rep: Reputation: 398Reputation: 398Reputation: 398Reputation: 398
Thanks for the reply zatriz. I tried similar, but drakupdate_fstab still insisted on adding other entries to my fstab, and creating additional "removable" icons on my desktop.

I decided that maybe I had messed things up in doing an upgrade of MDK9.1->10.0, so I did a new install of 10.0, with the new 2.6 kernel (keeping /home on a different partition). I still have 9.1 on a different disk, which is just as well:

MDK 10.0, with KDE 3.2 is very pretty, but I have no sound (just a nasty squeal from the speakers), no speedtouch ADSL internet, and no NVIDIA drivers: So I now have a lot of things to sort out! On the positive side, USB hotplugging seems to be working much better.

Thanks for your suggestion though.
Best wishes.
 
  


Reply


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
fstab problem: mount: can't find dvd in /etc/fstab or /etc/mtab Nikon01 Slackware 5 11-17-2006 07:15 AM
problems with smbfs mount-point in /etc/fstab - "mount -a" works, but not at boottime MarkSide Linux - Software 4 11-20-2005 04:30 PM
Mount Fstab ????????? chennairaja Linux - Newbie 2 03-07-2005 10:22 AM
Suse 9.1 and *SLOW* weird usbstorage behavior Nukfror Linux - Hardware 0 08-23-2004 02:26 PM
Why a FSTAB entry will mount using -a switch but will not mount automatically at boot mjen Linux - Newbie 3 05-19-2004 08:45 AM


All times are GMT -5. The time now is 01:55 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration