LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 08-05-2004, 04:44 PM   #1
anandj
Member
 
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Rep: Reputation: 15
CF card mounting


I have Fedora core 2 in my laptop. I have noticed that when ever my connect my USB compact flash reader to my laptop, it automatically creates an entry in /etc/fstab and all I have to do to mount it is (as a user)
type

mount /mnt/flash

If I unmount /mnt/flash and remove the usb reader, it automatically removes the entry and deletes the directory /mnt/flash

However, if I re-insert the card a second time, it does not put back that entry in fstab and nor does it create the directory /mnt/flash

Clearly something gets messed up after I unmount my card. Can some help me fix this?

thanks
 
Old 08-05-2004, 06:53 PM   #2
globeTrotter
Member
 
Registered: Feb 2004
Location: Townsville, Queensland, Oz
Distribution: Red Hat 9
Posts: 107

Rep: Reputation: 15
hi

i'm just new to this stuff, but i figure you should
mkdir /mnt/flash
to make a permenant mount directory, and then take note of what configuration is in the fstab file the first time you fire the flash card up, then rewrite the fstab file with this info to make it permenant. then all you have to do is right click on the desktop -> create new -> CD/DVD rom device., then pick the device from the device tab drop down list (/dev/whatever_is_in_fstab_file). then whenever you plug your flash card in, you just double click whatever icon you picked. right click on it again when finished to choose the unmount option. hope this was of help, although i know it's not exactly what you asked for. it is a good workaround for usb devices you use alot. i did this for my memory stick. (placed it on /dev/sda1) works a treat in KDE.
regards
GT
 
Old 08-05-2004, 08:07 PM   #3
anandj
Member
 
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Original Poster
Rep: Reputation: 15
The problem is this: Lets us say I create a new directory /mnt/Flash and I add the entry to /etc/fstab
and I mount it... everything is fine. When i unmount it and then remove the usb device from the computer, Fedora core 2 automatically deletes the directory and also deletes the entry in /etc/fstab.
Somehow its smart enough to do that.
When I plug the USB device back in now, it however doesn't put back the /mnt/flash entry.

Here is the message I get in my dmesg
usb 2-1: new full speed USB device using address 3
scsi1 : SCSI emulation for USB Mass Storage devices
inserting floppy driver for 2.6.6-1.435.2.3
Vendor: Model: Rev:
Type: Direct-Access ANSI SCSI revision: 02
SCSI device sda: 503808 512-byte hdwr sectors (258 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
SCSI error: host 1 id 0 lun 0 return code = 8000002
Sense class 7, sense error 0, extended sense 0
sda: sda1
SCSI error: host 1 id 0 lun 0 return code = 8000002
Sense class 7, sense error 0, extended sense 0
Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0
USB Mass Storage device found at 3
floppy0: no floppy controllers found


I hope some one can help me with this.

thanks
 
Old 08-05-2004, 08:53 PM   #4
globeTrotter
Member
 
Registered: Feb 2004
Location: Townsville, Queensland, Oz
Distribution: Red Hat 9
Posts: 107

Rep: Reputation: 15
hi


i just read your first message to beleive that Fed 2 created the fstab entry and not root, as you mentioned that it automatically created an entry in /etc/fstab !?!?!?!?!

Your second message tells me that root is creating the entry in fstab. as you mentioned "Lets us say I create a new directory /mnt/Flash and I add the entry to /etc/fstab and I mount it...?!?!?!?!"

just a slight diffrence in whats going on. Which one is going on? are you creating the entries via a text editor, or is fed 2 doing it???????????????????? it will make a diffrence to the end result. Just to note, you said "let us say i create a new directory" (root i presume) have you acctually created the directory and edited the fstab file or are we just assuming? keep me posted.

cheers
lee
 
Old 08-05-2004, 08:59 PM   #5
anandj
Member
 
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Original Poster
Rep: Reputation: 15
Both the posts are accurate.

If I don't make a fstab entry before I insert the USB card reader, fedora core automatically creates one for me in /etc/fstab. It creates an entry allowing me to mount /mnt/flash.

However, after seeing you first email, I decided I won't rely on fedora core to automatically create the entry and I created a new entry for the /dev/sda1 device and I set the mount point for this device as /mnt/Flash.
When the reader the connected, I can mount it without any problems. After I unmount it and remove the device, fedora core automaticallly removes the device entry and also the directory /mnt/Flash
When I re-insert the USB reader a second time, it doesn't put back the entries.

Hope my post is clear this time.

thanks
 
Old 08-05-2004, 09:13 PM   #6
globeTrotter
Member
 
Registered: Feb 2004
Location: Townsville, Queensland, Oz
Distribution: Red Hat 9
Posts: 107

Rep: Reputation: 15
just a thought again. obviously the usb functionallity has been improved since red hat 9 ( which is what i'm using now, until i manage to work out how to get the winmodem working with fed 2, but thats another story) so fed 2 has read and write access to the files in question, try making them read only and see how you go. shot in the dark really.

apart from that i'm not sure. fed 2 & kern 2.6 has obviously improved things, although on my system i still had to edit the fstab file myself (root) and create the /mnt/usb folder. Theres a thing maybe its creating the file named flash, which means it will search for flash to delete, try calling the file flash2, or maybe, just goood old boring /mnt/usb so it cant run a regex on it. mount /dev/sda1 to this in the fstab file. this should not be removed automatically. what do ya reckon???
regards
Lee
 
Old 08-05-2004, 09:55 PM   #7
anandj
Member
 
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Original Poster
Rep: Reputation: 15
As mentioned in my previous email.. FC2 automatically creates /mnt/flash directory.
Even when I create /mnt/Flash (note the capitalization ) it is smart enough to realize that this directory
corresponds to /dev/sda1 and it automatically removes it when the device is removed.

So I don't think creating a different directory 'flash2' is going to make much difference.
 
Old 08-05-2004, 09:57 PM   #8
globeTrotter
Member
 
Registered: Feb 2004
Location: Townsville, Queensland, Oz
Distribution: Red Hat 9
Posts: 107

Rep: Reputation: 15
totally agree, thats why i suggest calling it /mnt/usb
 
Old 08-05-2004, 10:04 PM   #9
anandj
Member
 
Registered: May 2004
Distribution: Fedora Core 4
Posts: 92

Original Poster
Rep: Reputation: 15
It didn't help.
Just as I thought.. it was searching through the device name '/dev/sda1'
It deleted the directory /mnt/usb as soon as the device was removed.

Thanks for the help anyways.

If anyone with FC2 has encounted this, I would really love hear how you handle the mouting of CF card.
 
Old 08-05-2004, 10:32 PM   #10
globeTrotter
Member
 
Registered: Feb 2004
Location: Townsville, Queensland, Oz
Distribution: Red Hat 9
Posts: 107

Rep: Reputation: 15
sorry for that mate, it was worth a try eh. good luck
 
  


Reply



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
mounting a SD Card... toyotadesigner Linux - Laptop and Netbook 5 11-12-2005 03:21 AM
Mounting pcmcia/cf card mickeyboa Fedora 1 10-05-2005 07:58 PM
mounting usb card reader hylke Linux - Newbie 20 07-23-2005 09:41 AM
MP3 player sd card mounting? sirdilznik Slackware 10 06-13-2005 07:22 PM
Mounting a Compact Flash Card Kyl3 Slackware 3 05-26-2004 06:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:43 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
Open Source Consulting | Domain Registration