LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to mount SD card before user login? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-mount-sd-card-before-user-login-924960/)

taylorkh 01-21-2012 07:44 AM

How to mount SD card before user login?
 
I have a Dell Latitude 2100 netbook running Ubuntu 10.04 which I use primarily as a download machine as it only consumes 7 - 8 watts as compared to 160+ watts for my quad core desktop ;) The netbook has only a FAST SSD drive but it is only 16 GB. I added a 16 GB SD card which permanently resides in the slot provided. This provides additional storage capacity.

I can access the netbook by ssh and VNC over my LAN to retrieve files or to start downloads. However, the SD card does not appear to mount until I login to the machine.

My question is... can the machine be configured to mount the SD card before login?

With the SD card mounted I find the following in /etc/mtab
Quote:

/dev/sdb1 /media/SD16 vfat rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush 0 0
I added an entry to /etc/fstab
Quote:

/dev/sdb1 /media/SD16 vfat rw,nosuid,nodev 0 0
and rebooted. I see /dev/sdb in /etc/mtab and can see the contents of the SD card over ssh. However, I cannot write to the card. If I comment out the reference in /ect/fstab, reboot and login I can again write to the card. I am probably missing something simple.

TIA,

Ken

cnxsoft 01-21-2012 09:05 AM

It's either because the the SD card is mounted as read-only at boot-time or some permission issues. You could type "dmesg" in the terminal to see any errors/warnings and/or type "mount" to see if it is mounted as read-only or read/write.

You could also try to use the following entry in /etc/fstab:

Quote:

/dev/sdb1 /media/SD16 vfat rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,flush 0 0

taylorkh 01-21-2012 10:38 AM

Thank you cnxsoft for the prompt reply. I have added the additional parameters to the entry in /etc/fstab (but like an idiot I forgot to uncomment the line - rebooting again). I was going to add the entire line from mtab to fstab but I was not familiar with all of the parameters so I though I would be safer to only include those which I understood.

It works! Perhaps it was the uhelper=udisks parameter. I will have to look into what that does. It sounds intriguing and I do not recall seeing it before. Perhaps something to do with USB drives.

Thanks again!

Ken


All times are GMT -5. The time now is 10:15 PM.