SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I have made a live CD using Slack 10.1 with a custom compiled 2.6.12 kernel & the Linux Live scripts. I am using windowmaker as the desktop.
I would like to be able to set it up to automount any usb pendrive attached - a great asset on a live disc. I know this is done through autofs.
I have googled & read a lot on this, as well as searched this forum, but, to be honest, a lot of it is above my head. Also some of what I have found is designed to set up for ones own kit where this needs to be more flexible.
Does anyone know of a basic way to set up what I want or where such instructions can be found?
1: 2.6.12 (see above), yes to 2 - the third depends on what other scsi gear the host computer has (this is a 'live' system).
I have since found that by adding the line:
BUS="scsi",SYSFS_type="0",NAME="%k",SYMLINK="pen"
to my /etc/udev/rules.d/udev.rules file under the 'scsi' heading means that there is now a symlink to it called 'pen' & it can be mounted as /dev/pen. My problem now is to get the system to mount it automatically on attachment. Because it is a live CD bear in mind that it will run on many machines with many devices & generates its /etc/fstab at boot. That would not stop us using a script, say using rc.local, to append a line if need be.
The other problem I have had to contend with is that my main system has an adaptec scsi motherboard & 2 scsi hard drives - a good testing ground though as the system needs to be able to distinguish between those sd* partitions (5 in all) & the pen drive (on that system the pen is actually sdc1). So far my rule appears to work, but whatever I do must bear this in mind and not break it. The idea is for a live music production CD that will work on any system, including those with other scsi devices. This is why a pen drive is important: for portability of files & use with m$ systems that only have NTFS partitions.
Last edited by friendly_guy; 07-12-2005 at 12:01 PM.
The only thing I did not understand was that it mounts on demand & then unmounts. I was opening an empty file browser on the /usb folder & wondering why. For it to work from the file browser (rox filer) I had to create a link (I did this in /mnt) pointing to /usb/pen.
When clicked this 'calls' the pendrive & bingo! the pen is mounted. Thanks keefaz, I am thrilled with the result.
I just need to figure out how to put the link into the live filesystem as it creates /mnt at boot. Ah well, a little light hacking with scripts should sort that.
Where I am using rox filer (this is a minimalist sytem, the idea is to keep all processor power for the music) there is not an address bar to type anything in like there is on say, Konqueror.
The symlink works fine though *and* it makes the drive available through /mnt which is consistent with how the menuing system is set up (there is an entry for 'attached filesystems' that brings up a rox window of /mnt).
I have yet to get it fully sorted to make sure it works 'live' but, barring silly unforseeable problems I think I can.
It might interest you that you do not have to create the directory /usb. I have put a command to create the symlink in rc.local & deleted /usb & when I reboot & use the symlink the directory is created.
It all works perfectly on the hard drive. I just need to test it by making the live CD, but not 2nite. I don't know what time zone you are on but here it is past time I was asleep!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.