Linux - NewbieThis 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!
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Yes, you will have to mount it, and in order to make that easy, you'll need to put it in /etc/fstab. If you can't find it, try "lsusb -v" from the command line, that should list your usb devices. If that doesn't help, try looking for it under /proc/scsi; my card reader gets mounted as a scsi device.
You might want to add it to your fstab if you're using it quite often and don't always want to type the whole mount command.
(though if you're mounting through GUI programs in KDE you wouldn't have to type the whole command in an shell anyway)
Also the fstab mounts certain devices for you at boot time, e.g. I have an external HDD on my usb port, and the 2 partitions on it, recognised as sda5 and sda6 are automatically mounted when I boot linux, if I have my HDD switched on.
If it's off and I just use it occasionally, I just type "mount extern1" (or 2) after I switched it on, for example, or a simple "mount -a" will try to mount everything in your fstab.
But I think it's often not a very good idea to have removable divices attached to your usb port in you fstab, because linux recognises a usb storage device when you plug it in, via hotplug. But it recognises the first you plug in as sda(1-x), the second as sdb and so on. So in my case, if I plug in a USB-stick BEFORE I switch on my usb-hdd, the hdd is recognised as sdb5/6 and the stick as sda1.
So having written devices like those in you fstab isn't always a good idea.
You should only put devices in there, which are always installed in your computer, like HDDs and CD/DVD-Roms/RWs.
Oh and by the way:
there' also a /etc/mtab which shows the devices currently mounted.
You should never take a card out of your reader, if it's still mounted, so umount it first. (with CDs it's impossible, as you may know already, because linux blocks the eject function of your CD-Rom while a medium is mounted)
But as I said before, If you're often using your card-reader and it's always plugged in to a usb-port AND if it's always recognised as /dev/sda, then it's a good idea to add it to your fstab, e.g. through a line like that:
/dev/sda1 /mnt/flash vfat noauto,user 0 0
(you can also put in "auto" instead of vfat, or remove "user" if you dn't want users to be able to mount it)
I think you'd need scripts to automount/-unmount your card.
And there's some automount demons out there, you'd have to look for them, they'll run everytime and do the same as the mentioned scripts.
So if you don't use those, yes, I think you'll have to do a umount manually.
But if you put a line like the above in your fstab you shorten the mount command and only need to type "mount /dev/sda1" or "mount /mnt/flash".
Your distro knows how to mount the device, because you inserted it in fstab.
So if you're not using it VERY often, this should be enough. You can even write a bash-script to shorten the command, but I don't think it's neccessary. You can also type "mount -a" as I said earlier.
And if you insert the card into the reader before starting linux, it will be automounted in the boot process if you replace "noauto" with "auto" in your fstab.
But if it's a Multi-Card-Reader you could run into problems. Depending on your distro and cardreader, the devices assigned to a certain type of card could be different, e.g. sdb for another type of card. You should find out what devices are assigned to what memory slot. You can then add additional lines like the one I posted in your fstab.
Oh yeah: It's probably a good idea to add "sync" to your mount options (users, noauto). This prevents data-loss due to perhaps unfinished copy-jobs if you accidentally pull the card out without unmonting first.
When I used SuSE (one of the earlier versions) I made a small text file, 'mntflash' which had one line of code: mount /dev/sda1 /mnt/usb. I made a shortcut button with the command : gksu ~/mntflash. I made a similar button for 'unmntflash' (guess what that did).
Gksu is a command for running a program as root from the user interface, and a small 'enter password' box pops up.