LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Problems auto-mounting usb drives in kernel 2.6.13.3 (https://www.linuxquestions.org/questions/slackware-14/problems-auto-mounting-usb-drives-in-kernel-2-6-13-3-a-375206/)

dizzi 10-20-2005 05:16 PM

Problems auto-mounting usb drives in kernel 2.6.13.3
 
Hey All

There is this annoyance that I am experiencing with kernel 2.6.13.3 in Slack 10.2. Here is the scenario.

In the 2.4.31 kernel which comes with this Slack version, while using KDE, I can simply create links to hard disk devices on the desktop (including external USB drives) and providing that the necessary entries have been made in /etc/fstab, double-clicking the device's icon, would mount it automatically.

As an example I have an external USB drive which contains 6 partitions and for the first partition which is NTFS, I have this entry in /etc/fstab

/dev/sda1 /mnt/sda1usb ntfs ro,noauto,users,umask=0222 0 0

In kernel 2.4.31 booting the system with or without the external drive attached, double-clicking on the the icon representing the link to the device (ie partition 1) would automatically mount in in /mnt/sda1usb. It does not matter whether this is done by root or ordinary users.

However, for kernel 2.6.13.3, the only way I can get this to work is to boot the system with the external drive attached. However after the drive is mounted, if it is subsequently unmounted and detached and then re-atached and re-mounted, the following message appears.

Could not mount device.
The reported error was:
mount: special device dev/sda1 does not exist


This happens even for root and while navigating to /dev/ clearly shows the existence of a sda1 device.

Worst still, if the system is booted without the external drive attached, I simply cannot get any of the partitions to mount - not even as root. The same annoying message box just keeps popping up whenever an attempt is made to mount any of the external drive partitions.

Does anyone have a clue why this is happenning? Is there any particular module I need to load or any re-compile in the kernel?

Regards

shilo 10-20-2005 05:43 PM

WIld gues:

Code:

chmod +x /etc/rc.d/rc.udev
/etc/rc.d/rc.udev start

Alternatively, use this to figure out where that USB HDD is:

Code:

tail -f /var/log/messages /var/log/syslog /var/log/dmesg
Then fire up the drive and see what your system thinks about the drive.

dizzi 10-20-2005 07:06 PM

Hey shilo

Thanks for responding. When the first command was issued, ie

chmod +x /etc/rc.d/rc.udev, Nothing happenned (as expected I reckon)

However after:

/etc/rc.d/rc.udev start

The result was

Initializing udev dynamic device directory.
grep: /proc/ide/control/model: No such file or directory




And after:

tail -f /var/log/messages /var/log/syslog /var/log/dmesg


==> /var/log/messages <==
Oct 21 00:44:42 darkstar named[3625]: zone 0.0.127.in-addr.arpa/IN: loaded serial 1997022700
Oct 21 00:44:42 darkstar named[3625]: zone localhost/IN: loaded serial 42
Oct 21 00:44:42 darkstar named[3625]: running
Oct 21 00:45:00 darkstar kernel: [drm] Initialized drm 1.0.0 20040925
Oct 21 00:45:01 darkstar kernel: ACPI: PCI Interrupt 0000:01:00.0[A] -> Link [LNKB] -> GSI 11 (level, low) -> IRQ 11
Oct 21 00:45:01 darkstar kernel: [drm] Initialized radeon 1.16.0 20050311 on minor 0: ATI Technologies Inc Radeon Mobility M7 LW [Radeon Mobility 7500]
Oct 21 00:45:01 darkstar kernel: agpgart: Found an AGP 2.0 compliant device at 0000:00:00.0.
Oct 21 00:45:01 darkstar kernel: agpgart: Putting AGP V2 device at 0000:00:00.0 into 1x mode
Oct 21 00:45:01 darkstar kernel: agpgart: Putting AGP V2 device at 0000:01:00.0 into 1x mode
Oct 21 00:45:59 darkstar kernel: usb 1-1: new full speed USB device using uhci_hcd and address 2

==> /var/log/syslog <==
Oct 21 00:44:30 darkstar kernel: ACPI wakeup devices:
Oct 21 00:44:30 darkstar kernel: PWRB LID SLPB PCI0 LANC WLAN CRD0 MODM
Oct 21 00:44:30 darkstar kernel: VFS: Mounted root (ext3 filesystem) readonly.
Oct 21 00:44:36 darkstar kernel: tpm_inf: probe of 0000:00:1f.0 failed with error -5
Oct 21 00:44:37 darkstar kernel: shpchp: shpc_init : shpc_cap_offset == 0
Oct 21 00:44:37 darkstar kernel: shpchp: shpc_init : shpc_cap_offset == 0
Oct 21 00:44:42 darkstar kernel: process `named' is using obsolete setsockopt SO_BSDCOMPAT
Oct 21 00:44:52 darkstar kernel: serial8250: too much work for irq3
Oct 21 00:45:07 darkstar kdm_greet[3951]: Can't open default user face
Oct 21 00:45:59 darkstar kernel: midi: probe of 1-1:1.0 failed with error -5

==> /var/log/dmesg <==
VFS: Mounted root (ext3 filesystem) readonly.
Freeing unused kernel memory: 244k freed
kjournald starting. Commit interval 5 seconds
ieee1394: Host added: ID:BUS[0-00:1023] GUID[0090f500000e563a]
Adding 514008k swap on /dev/hda5. Priority:-1 extents:1
EXT3 FS on hda6, internal journal
Linux agpgart interface v0.101 (c) Dave Jones
kjournald starting. Commit interval 5 seconds
EXT3 FS on hda3, internal journal
EXT3-fs: mounted filesystem with ordered data mode.




I was still unable to mount any of the external drive partitions afterwards.

Thanks again for trying to assist.

Regards

rkelsen 10-20-2005 07:14 PM

1. If you're using Pat's kernel config, it has CONFIG_SCSI_MULTI_LUNS disabled. This should be enabled.

2. Older versions of Pat's config included the "Low performance USB driver". This must be diabled (i.e. not even included as a module) or hot-plugging of usb-storage devices will not work.

3. Also, as mentioned above, standard behaviour for Slack 10.0 was to install the /etc/rc.d/rc.udev script without execute permissions. You need to
Code:

chmod 0755 /etc/rc.d/rc.udev
.

Once all this is done, you should be able to add /dev/sdxx to your /etc/fstab file. I have it all working with 2.6.11 running on Slackware 10.2.

shilo 10-20-2005 07:17 PM

Quote:

However after:

/etc/rc.d/rc.udev start

The result was

Initializing udev dynamic device directory.
grep: /proc/ide/control/model: No such file or directory
The error doesn't matter. It's a result of the make-extra-nodes script used for detecting optical devices.

As for the rest, it really doesn't matter what spits up on your screen when you hit enter. The interesting stuff is what you see added to that when you turn on the USB HDD. The command just starts viewinf logs in real time.

I'm betting that the reason for your issue is that the USB HDD is not at /dev/sda.

Namaseit 10-20-2005 11:05 PM

you can easily see ALL partitions, hdd's, etc if you just do a simple "cat /proc/partitions". If all you see is your normal hda or sda(if you have scsi or sata main hdd) then your device is not recognized, of course. If you want to mount an external HDD enclosure of any type you need to have the 'Freecom USB/ATAPI Bridge support' in your kernel or ' ISD-200 USB/ATA Bridge support' although I haven't ever found a device that used the ISD one. You will also need "SanDisk SDDR-09 support" option if you want to mount most usb flash devices.

fireedo 10-21-2005 05:01 AM

do you have usb_storage module? is it load at boot? if it not you can load it but you must edit your rc.modules.....
unrem /sbin/modprobe usb_storage
maybe that can solve your problem......

dizzi 10-24-2005 05:28 PM

Hey

I finally got some success :).

I initially tried these three recommendations

1. "uncommented /sbin/modprobe usb_storage" in rc.modules
2. Enalbed 'Freecom USB/ATAPI Bridge support' into the kernel
3. Enabled CONFIG_SCSI_MULTI_LUNS

After re-compilation, the drive was still not recognised when it was attached after the system had booted.

I decided to then re-compile USB support as modules instead of directly into the kernel and that solved the problem :).

Cheers lads for all the assistance :)

gargamel 10-29-2005 01:41 PM

Fine that you solved your problem. Now, I am always eager to learn, so if anyone can explain *why* it works with USB support as modules, but not compiled in, please share your wisdom!

Thanks.

gargamel


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