You are Here:
Linux Lite 5.0 Final is now available for download and installation



SD Card Remount

Author (Read 4886 times)

0 Members and 1 Guest are viewing this topic.

SD Card Remount
« on: January 09, 2015, 06:58:36 AM »
 

jlost

  • Guest
Hello all, I hope this is in the right section.

I'm currently running LL 2.2 on a 8gb usb pen, and in an effort to save some space; I have installed a large app (TTS Voice) to an SD Card. When I come out of standby, I am asked for admin password to allow the SD Card to remount. Removing and re-inserting the SD Card automatically remounts it without a password.

I've unsure if this behavior is normal or due to having the app installed on the SD Card and causing the remount request.

Can someone suggest a way for the SD Card to be automatically remounted when coming out of standby mode?
Last Edit: January 14, 2015, 09:45:13 AM by Scott(0)
 


Re: SD Card Remount
« Reply #1 on: January 09, 2015, 02:14:50 PM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Country: us
  • Reputation: 325
  • Linux Lite Member

  • Linux Lite: 3.2 64bit

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
I'm not really sure on this, but can you clarify how your running from the USB stick?  Did you do an actual full installation to the USB, or is it running live with/without persistence?  Knowing that may give us a better idea how to solve problem.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: SD Card Remount
« Reply #2 on: January 09, 2015, 02:42:25 PM »
 

jlost

  • Guest
It's a full installation.
 

Re: SD Card Remount
« Reply #3 on: January 09, 2015, 03:22:15 PM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Country: us
  • Reputation: 325
  • Linux Lite Member

  • Linux Lite: 3.2 64bit

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
What filesystem format is being used on the SD card?  Connect it to system then run sudo blkid command in terminal to find out if you don't know.  For example here is my output with a USB stick connected (don't have an SD card) and it's shown using TYPE="vfat" at /dev/sdc1.
Code: [Select]
bill@Gold:~$ sudo blkid
[sudo] password for bill:
/dev/sda1: LABEL="Mint16Xfce" UUID="16268cf7-b146-4ae5-b8a8-c02125bd87d9" TYPE="ext4"
/dev/sda3: LABEL="DATA" UUID="ceee2524-7df2-4d21-a1f7-9e7e55c722cc" TYPE="ext4"
/dev/sda5: LABEL="LinuxLite2" UUID="a9222190-0805-47ef-a2e2-e98b19d84b54" TYPE="ext4"
/dev/sdb1: UUID="c4933327-f314-42ee-8b4a-ec3e48a0ded5" TYPE="swap"
/dev/sdb2: LABEL="DataBackup" UUID="50e44bdd-edba-4b99-89a4-8fea89c18c1d" TYPE="ext4"
/dev/sdb5: LABEL="ISOs" UUID="15443ba5-bdd0-4f0d-ae19-420022a7aab7" TYPE="ext4"
/dev/sdb6: LABEL="HomeBackups" UUID="aac3b231-c9e8-4960-9f9d-bff3a1856e0e" TYPE="ext4"
/dev/sdb7: LABEL="VBoxHDs" UUID="3e68db3c-2acd-4718-812e-93e10bf63cf5" TYPE="ext4"
/dev/sdc1: LABEL="KINGSTON" UUID="8A44-F1CF" TYPE="vfat"

If it's using either Ext4, 3, or 2 format, then maybe the mount point for the card is owned by root and all you need to do is change it to your username.  Mount the card in whatever way you normally do, then run lsblk command in terminal to see what the mount point is.  Continuing with my example, here you can see my USB got mounted to /media/bill.
Code: [Select]
bill@Gold:~$ lsblk
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda      8:0    0 298.1G  0 disk
├─sda1   8:1    0    25G  0 part
├─sda2   8:2    0     1K  0 part
├─sda3   8:3    0 223.1G  0 part /mnt/DATA
└─sda5   8:5    0    25G  0 part /
sdb      8:16   0 596.2G  0 disk
├─sdb1   8:17   0     9G  0 part [SWAP]
├─sdb2   8:18   0   230G  0 part
├─sdb3   8:19   0     1K  0 part
├─sdb5   8:21   0    40G  0 part /mnt/ISOs
├─sdb6   8:22   0    40G  0 part
└─sdb7   8:23   0   200G  0 part /mnt/VBoxHDs
sdc      8:32   1  29.1G  0 disk
└─sdc1   8:33   1  29.1G  0 part /media/bill/KINGSTON
sr0     11:0    1  1024M  0 rom 

Now run command to list (in long form) files mounted under that mount point ("/media/bill" in my case). Use ls -l followed by a space, then the mount point.
Code: [Select]
bill@Gold:~$ ls -l /media/bill
total 16
drwx------ 9 bill bill 16384 Dec 31  1969 KINGSTON

Mine says it's owned by me:  "bill     bill".  If yours says "root     root", then change ownership of the mount point to yourself.  (The "-R" in the command recursively changes ownership of all the files under the mount point to you as well.  If you don't want that to be the case, then don't include the "-R".)  Substitute your username in place of "bill" and your mount point in place of "/media/bill" in terminal command below:
Code: [Select]
sudo chown -R bill: /media/bill
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: SD Card Remount
« Reply #4 on: January 09, 2015, 03:33:40 PM »
 

jlost

  • Guest
SD Card is formatted as 'vfat' and owned by me - established following your instruction. It would appear the only time password is required, is when coming out of standby; doing cold boot (or after restart) SD Card is automatically mounted without my input.
Last Edit: January 09, 2015, 04:43:36 PM by jlost
 

Re: SD Card Remount
« Reply #5 on: January 10, 2015, 07:56:03 AM »
 

jlost

  • Guest
A quick google search reveals this is an existing Ubuntu issue. I tried the following fix, but it was not successful: https://help.ubuntu.com/community/AspireOneSDCardsAndSuspend
 

Re: SD Card Remount
« Reply #6 on: January 10, 2015, 12:24:53 PM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Country: us
  • Reputation: 325
  • Linux Lite Member

  • Linux Lite: 3.2 64bit

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
Plug the SD card into computer, then post back with terminal output of these two commands:
Code: [Select]
sudo blkid -c /dev/null
cat /etc/fstab

Maybe we can figure out a way to make that fstab change work.
Try Linux Beginner Search Engine for answers to Linux questions.
 

Re: SD Card Remount
« Reply #7 on: January 10, 2015, 03:52:50 PM »
 

jlost

  • Guest
Quote
lost@lost-laptop:~$ sudo blkid -c /dev/null
/dev/sda1: LABEL="System" UUID="38F25226F251E920" TYPE="ntfs"
/dev/mmcblk0: LABEL="Linux Lite 2.2 64-bit" TYPE="iso9660"
/dev/mmcblk0p1: LABEL="SDCARD" UUID="5340-8D15" TYPE="vfat"
/dev/sdb1: UUID="4cb87201-6052-4d13-8ad1-914e28583bdd" TYPE="ext4"
/dev/sdb2: LABEL="SWAP" UUID="13da5cd2-cfe6-4f6d-ba7b-6273db026a01" TYPE="swap"
lost@lost-laptop:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
# / was on /dev/sdb1 during installation
UUID=4cb87201-6052-4d13-8ad1-914e28583bdd /               ext4    errors=remount-ro 0       1
# swap was on /dev/sdb5 during installation
UUID=e468b697-b366-4992-9655-0c82d852324a none            swap    sw              0       0
 

Re: SD Card Remount
« Reply #8 on: January 11, 2015, 04:03:47 AM »
 

jlost

  • Guest
To say a little more on this subject; when I attempted the above solution, I only guessed as to how the line in fstab should read.

Here is a screenshot of the request window I get when coming out of standby:

 

Re: SD Card Remount
« Reply #9 on: January 11, 2015, 11:27:51 AM »
 

gold_finger

  • Documentation Writer
  • Platinum Level Poster
  • *****
  • 1094
    Posts
  • Country: us
  • Reputation: 325
  • Linux Lite Member

  • Linux Lite: 3.2 64bit

  • CPU: Intel Core2 Duo E7500 3.0GHz

  • MEMORY: 4Gb

  • VIDEO CARD: Intel 4 Series Integrated Graphics
jlost,

Sorry haven't had time to get back to you on this yet -- been busy with friends visiting from out of town and don't really have time to finish researching this right now to get a good answer for you.  May be another day or two before I can, but will give you an idea as to what I was thinking and some links to look at and maybe you'll be able to do it from those on your own.

My thinking was that you could create a udev rule to make sure SD card is named consistently, then make an fstab entry for it so it gets mounted with correct permissions each time and my assumption was that doing so would also solve coming out of suspend problem.  Here are some links I was going to read through to figure that out:

https://wiki.archlinux.org/index.php/udev
I noticed a sub-link of above that might help specifically with this:  https://wiki.archlinux.org/index.php/udev#Waking_from_suspend_with_USB_device

http://www.reactivated.net/writing_udev_rules.html

http://askubuntu.com/questions/199312/what-does-udevd-process-do-during-the-boot-time


If you're able to figure out a solution, please post back with the answer so others might be helped too.  If not, let us know you're still stuck and one of us will attempt to figure it out.  (Will probably be another day or two before I'll have time to look into it myself.)
Try Linux Beginner Search Engine for answers to Linux questions.
 


Tags:
 


Linux Lite 5.0 Final is now available for download and installation