LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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!

Notices


Reply
  Search this Thread
Old 01-21-2012, 08:44 AM   #1
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,394

Rep: Reputation: 101Reputation: 101
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
 
Old 01-21-2012, 10:05 AM   #2
cnxsoft
Member
 
Registered: Nov 2010
Location: Thailand
Distribution: Fedora 12, Ubuntu 10.10
Posts: 166

Rep: Reputation: 29
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
 
1 members found this post helpful.
Old 01-21-2012, 11:38 AM   #3
taylorkh
Senior Member
 
Registered: Jul 2006
Location: North Carolina
Distribution: CentOS 6, CentOS 7 (with Mate), Ubuntu 16.04 Mate
Posts: 1,394

Original Poster
Rep: Reputation: 101Reputation: 101
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
auto mount home from network and login as user on Debian OS - tried /etc/fstab emma_m Linux - Software 3 07-16-2009 10:38 AM
auto mount from network works but cant login as user emma_m Debian 3 07-15-2009 07:44 PM
Cannot mount ntfs-3g USB dirve with user permission login console PB0711 SUSE / openSUSE 1 03-11-2009 10:45 AM
Mount an SMB Share with a user's login credentials?? johnson8707 Linux - General 1 02-25-2009 01:59 PM
How to mount partitions on user login prabhatsoni Linux - General 8 01-08-2008 10:23 PM


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