QUOTE(bam @ Jul 21 2005, 05:38 PM)
QUOTE(Meanie @ Jul 20 2005, 11:14 PM)
QUOTE(bam @ Jul 21 2005, 04:29 PM)
cant seem to get it to automount....I followed word for word, I can manually mount it but automount...forget it?
why dont you try my automounter package?
it can mount up to four disks if you have a usb hub
i tried you script too, I pm'ed you:)
edit: ok way wierd now it works....when will I quit being a pain in the arse? Although a nice explaination of your script would be nice, how it works, how the system knows to run it etc...(for those who want to learn this)
well, actually, I am pretty new to linux myself. I've always been a Windoze user for the desktop and Solaris for servers. Most my linux knowledge comes from reading TLD project (the linux documentation) and googling webforums. I really recommend reading the online version of TLDP (www.tldp.org) or buying the paperback hardcopy. It's really worth a read.
Anyway, what you need to read up on is the hotplug mechanism in Linux. It's basically the way Linux handles plug'n'play. My script is just a hook into the hotplug mechanism which checks each the available scripts when it detects a device being plugged in and runs the associated script when it is unplugged. The script just needs to define a matching rule for what devices it needs to be run for and then does whatever is required to configure the device, in the case for a HDD, just mount it appropriately.
My script basically assumes there is the possibility to mount four harddrives so it checks for that and attempts to mount more drives when they are plugged in. It also checks that the drive is not already mounted before it attempts to mount a drive. Also, I have taken the two most common options that are used to partition and format harddisk so if the disk falls into that category, the script is able to mount it, but if its one of the rarer cases, then it will fail to automount it and you will need to manually mount the disk.
The two most common type of partitions that I use quite often are:
1. the disk has one partition which is the primary partition
2. the disk has one or more partitions which are secondary partitions on a primary partition.
For case 2, only the first partition is mounted. The remaining partitions need to be mounted manually if there are any.
Most USB memory sticks, etc. will most likely be 1 and some MP3 players are 2. but some are 1. as well. For USB harddisk, it depends how people partition them, but again, 1. and 2. are the most common options I have seen. I personally use 2. for my USB disks. This way the disk will not interfere with Windows drive mapping when they are plugged into a Windows system. Windows reshuffles the drive letters, all primary partitions get drive letters assigned first before secondary partitions. So if you have C: D: E: and E: being a secondary partitions, if you plug in a USB disk which has a primary partition, the USB disk becomes E: and your former E: is reassigned as F:. If the USB disk has a drive on a secondary partition, then the USB disk is assigned the drive letter F: and E: is undisturbed.
Also, the Z by default only recognises linux native (ext2/ext3) and FAT/FAT32 (vfat, fat32, dos). If your disk is formatted using a different filesystem type, then the Z won't be able to mount it unless you install drivers for those types. I have installed the ntfs drivers as well so I can read Windows 2000/XP NTFS partitions as well.
Use google. There is a lot of info about linux out there. That's how I learned it
I never had a Linux desktop before. My Z is my first linux desktop. well kinda. I think of it as a mini Laptop.