Choose style:

Author Topic: Automounting a vFAT 64GB micro-SD card in /etc/fstab [ABANDONED]  (Read 1998 times)

0 Members and 1 Guest are viewing this topic.

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Hi all,, how's it going?  I want to automount a 64GB microSD card in my Dell Latitude D430 laptop.  I've kept it formatted to vFAT because it's not the most expensive card and I don't know if it has wear levelling.  It's a Class 10 card but I still don't want to chance it.  It's only going to be used an extra /DATA partition for .mp3 and .ogg files   I can't get it automount from /etc/fstab.  Nothing I've tried works.  I've even tried being clever and formatted it to ext4 with journaling turned off.  I won't try that again  ::).  Any help is much appreciated  ;).

Here's the outputs from /etc/fstab and blkid:
Code: [Select]
andy@andy-Latitude-D430 ~ $ sudo fdisk -l
[sudo] password for andy:
Disk /dev/sda: 238.5 GiB, 256060514304 bytes, 500118192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8a95336b

Device     Boot     Start       End   Sectors   Size Id Type
/dev/sda1  *         2048  41945087  41943040    20G 83 Linux
/dev/sda2        41945088 493520895 451575808 215.3G 83 Linux
/dev/sda3       493520896 500117503   6596608   3.1G 82 Linux swap / Solaris


Disk /dev/mmcblk0: 62.5 GiB, 67108864000 bytes, 131072000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x91ab3398

Device         Boot Start       End   Sectors  Size Id Type
/dev/mmcblk0p1       2048 131071999 131069952 62.5G  c W95 FAT32 (LBA)


Disk /dev/sdb: 14.7 GiB, 15728640000 bytes, 30720000 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x397489a1

Device     Boot Start     End Sectors  Size Id Type
/dev/sdb1  *        0 2447359 2447360  1.2G  0 Empty
/dev/sdb2         616    5351    4736  2.3M ef EFI (FAT-12/16/32)
andy@andy-Latitude-D430 ~ $
Code: [Select]
andy@andy-Latitude-D430 ~ $ sudo blkid
/dev/sda1: LABEL="PM7 /" UUID="63070537-a8fc-4ff4-b14f-33212acba08e" TYPE="ext4" PARTUUID="8a95336b-01"
/dev/sda2: LABEL="PM7 /home" UUID="66e2618e-606e-4932-af06-acaa6a391252" TYPE="ext4" PARTUUID="8a95336b-02"
/dev/sda3: UUID="eff7967c-b880-4620-ab27-2fc08c253415" TYPE="swap" PARTUUID="8a95336b-03"
/dev/mmcblk0: PTUUID="91ab3398" PTTYPE="dos"
/dev/mmcblk0p1: UUID="35A6-DCB2" TYPE="vfat" PARTUUID="91ab3398-01"
/dev/sdb1: UUID="2017-05-03-02-22-26-00" LABEL="Peppermint Eight" TYPE="iso9660" PTUUID="397489a1" PTTYPE="dos" PARTUUID="397489a1-01"
/dev/sdb2: SEC_TYPE="msdos" UUID="B1F5-0A13" TYPE="vfat" PARTUUID="397489a1-02"
andy@andy-Latitude-D430 ~ $
« Last Edit: May 06, 2017, 10:39:55 am by AndyInMokum »
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26082
  • Karma: 2842
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #1 on: May 03, 2017, 06:45:27 pm »
Create the mountpoint:
Code: [Select]
sudo mkdir -p /mnt/DATA
and add this to fstab:-
Code: [Select]
UUID=35A6-DCB2   /mnt/DATA   vfat   user,fmask=0111,dmask=0000   0   0
then test with
Code: [Select]
sudo mount -a
if that runs without error, see if you can read/write to /mnt/DATA
« Last Edit: May 03, 2017, 06:50:17 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #2 on: May 03, 2017, 07:25:56 pm »
Create the mountpoint:
Code: [Select]
sudo mkdir -p /mnt/DATA
and add this to fstab:-
Code: [Select]
UUID=35A6-DCB2   /mnt/DATA   vfat   user,fmask=0111,dmask=0000   0   0
then test with
Code: [Select]
sudo mount -a
if that runs without error, see if you can read/write to /mnt/DATA

It looks like I'll have to reformat the thing.  It's throwing up superblock errors  :'(
Code: [Select]
# /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/sda1 during installation
UUID=63070537-a8fc-4ff4-b14f-33212acba08e /               ext4    noatime,errors=remoun$
# /home was on /dev/sda2 during installation
UUID=66e2618e-606e-4932-af06-acaa6a391252 /home           ext4    noatime,defaults     $
# swap was on /dev/sda3 during installation
UUID=eff7967c-b880-4620-ab27-2fc08c253415 none            swap    sw              0    $
# /DATA partition created by AndyInMokum.  Mount point /mnt/DATA.
UUID=35A6-DCB2   /mnt/DATA   vfat   andy,fmask=0111,dmask=0000   0   0
Code: [Select]
andy@andy-Latitude-D430 ~ $ sudo mkdir -p /mnt/DATA
andy@andy-Latitude-D430 ~ $ sudo nano /etc/fstab
andy@andy-Latitude-D430 ~ $ sudo mount -a
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
andy@andy-Latitude-D430 ~ $
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26082
  • Karma: 2842
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #3 on: May 03, 2017, 07:35:36 pm »
Are you sure it's FAT/FAT32 ?
(then again, blkid suggests it is)

BTW, don't put "andy" in the fstab entry .. it should read "user" ;)
« Last Edit: May 03, 2017, 07:48:49 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #4 on: May 03, 2017, 08:18:03 pm »
Create the mountpoint:
Code: [Select]
sudo mkdir -p /mnt/DATA
and add this to fstab:-
Code: [Select]
UUID=35A6-DCB2   /mnt/DATA   vfat   user,fmask=0111,dmask=0000   0   0
then test with
Code: [Select]
sudo mount -a
if that runs without error, see if you can read/write to /mnt/DATA

It looks like I'll have to reformat the thing.  It's throwing up superblock errors  :'(
Code: [Select]
# /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/sda1 during installation
UUID=63070537-a8fc-4ff4-b14f-33212acba08e /               ext4    noatime,errors=remoun$
# /home was on /dev/sda2 during installation
UUID=66e2618e-606e-4932-af06-acaa6a391252 /home           ext4    noatime,defaults     $
# swap was on /dev/sda3 during installation
UUID=eff7967c-b880-4620-ab27-2fc08c253415 none            swap    sw              0    $
# /DATA partition created by AndyInMokum.  Mount point /mnt/DATA.
UUID=35A6-DCB2   /mnt/DATA   vfat   andy,fmask=0111,dmask=0000   0   0
Code: [Select]
andy@andy-Latitude-D430 ~ $ sudo mkdir -p /mnt/DATA
andy@andy-Latitude-D430 ~ $ sudo nano /etc/fstab
andy@andy-Latitude-D430 ~ $ sudo mount -a
mount: wrong fs type, bad option, bad superblock on /dev/mmcblk0p1,
       missing codepage or helper program, or other error

       In some cases useful info is found in syslog - try
       dmesg | tail or so.
andy@andy-Latitude-D430 ~ $

Okay, I rebooted and the errors cleared up.  In /etc/fstab, I've changed andy to user.  The drive now mounts.  I'm able to make directories etc, only as "root" though.  Is this normal?
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26082
  • Karma: 2842
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #5 on: May 03, 2017, 08:29:16 pm »
Try running:
Code: [Select]
sudo chmod -R 777 /mnt/DATA
or
Code: [Select]
sudo chown -R andy:andy /mnt/DATA
now can you create stuff as andy ?
« Last Edit: May 03, 2017, 08:31:27 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #6 on: May 04, 2017, 01:13:56 am »
Try running:
Code: [Select]
sudo chmod -R 777 /mnt/DATA
or
Code: [Select]
sudo chown -R andy:andy /mnt/DATA
now can you create stuff as andy ?

Nope, it now says it's a, "read only file system".  I think it's back to reformatting the sd card  :-\.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26082
  • Karma: 2842
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #7 on: May 04, 2017, 05:27:41 pm »
Hmm, I seem to be having the same problem .. is there any reason you can't use NTFS ?

or a Linux file system .. maybe EXT2 if you're worried about journalling, but I'd still go for EXT4 .. theoretically a Linux file system should be easier on "wear" as it doesn't move stuff around as much as windows file systems.
« Last Edit: May 04, 2017, 05:48:30 pm by PCNetSpec »
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #8 on: May 04, 2017, 06:17:21 pm »
Hmm, I seem to be having the same problem .. is there any reason you can't use NTFS ?

or a Linux file system .. maybe EXT2 if you're worried about journalling, but I'd still go for EXT4 .. theoretically a Linux file system should be easier on "wear" as it doesn't move stuff around as much as windows file systems.

Well you live and learn.  It must be something about vFAT.  I'll give ext4 a shot.  The card is only for storage, It's no being use as a /root partition.  With a bit of luck, this card may have wear levelling.  I wish they'd standardize that.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #9 on: May 04, 2017, 06:55:54 pm »
I think the card is fried.  GParted locks up or crashes trying to find the partition.  Parted gives this output:
Code: [Select]
andy@andy-Latitude-D430 ~ $ sudo fdisk /dev/mmcblk0p1
[sudo] password for andy:
You'll starve!
[sudo] password for andy:

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0p1: 62.5 GiB, 67107815424 bytes, 131069952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000

Device           Boot Start       End   Sectors  Size Id Type
/dev/mmcblk0p1p1       2048 131069951 131067904 62.5G 83 Linux

Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Invalid argument

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

andy@andy-Latitude-D430 ~ $
A reboot does diddly squat  :(.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline PCNetSpec

  • Administrator
  • Hero
  • *****
  • Posts: 26082
  • Karma: 2842
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
  • Peppermint version(s): Peppermint 10
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #10 on: May 05, 2017, 08:33:28 am »
Have you tried rewriting the partition table ?
WARNING: You are logged into reality as 'root' .. logging in as 'insane' is the only safe option.

Team Peppermint
PCNetSpec

Offline cavy

  • Trusted User
  • Member
  • *****
  • Posts: 420
  • Karma: 55
  • Caveman
    • View Profile
    • PeppermentOS Pixies
  • Peppermint version(s): Peppermint Eight
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #11 on: May 05, 2017, 03:17:13 pm »
Hi Andy,

I often found with my old Lenovo notebook N200, the hard drive, later the SSD wouldn't communicate with any device, when prepping for a new install.    ;)

I managed to overcome this annoying habit   >:(   by removing the HD or SSD   ;), i.e unplug from its sata mount, count to 10 (optional). Then reinsert it.   :)

From your description of gParted format issues, it could be worth your while to erase and reformat the SSD card using the following CLI.   ;)  64Gb it probably take @2 hours to wipe, a minute or so to format   ;).

Code: [Select]
1. sudo dd if=/dev/zero of=/dev/sdx bs=4M iflag=nocache oflag=direct   (replace x with sda/b/c)

2. UNPLUG/EJECT SSD then re-insert for step two

3. sudo parted /dev/sdx   (check the true size of SSD, i.e my USB stick says 4000Mb but is 4027Mb)

4. sudo parted /dev/sdx mklabel msdos

5. sudo parted -a none /dev/sdx mkpart  primary fat32 0 xxxxx *true-size*

6. sudo mkfs.vfat -n "Disk" /dev/sdx1  It seems to want partition number i.e sdc1

I have refurbished and salvaged many USB sticks, especially if it has been used to make a bootable ISO installer.   :D

« Last Edit: May 05, 2017, 04:33:16 pm by cavy »
“We know what we are, but not what we may be.”

Desktop Dell 7040 i7-6700 500Gb-SSD 32Gb ram
Laptop    Dell 7470 i5-6300 500Gb-SSD  16Gb ram
Various antiques to sample other OS's etc

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #12 on: May 06, 2017, 01:02:27 am »
Hi cavy, are you a mind reader?  I've been thinking about doing just this as a last ditch attempt.  I tried rewriting the partition table as PCNetSpec suggested.  Parted was having none of it.  I've just been a little reluctant to force 64GB worth of zeros down the microSD card's throat.  I don't know if this model has, wear levelling enabled.  Using the "dd" on it might prove a bit vicious.  To cut a long story short, I'm trying it anyway.  It's been 3 hours and the cursor is still blinking.  Whether that means it's still zeroing or not doing anything, is anyone's guess.  I'll give it another hour as it's a low voltage CPU.   If there's still nothing, it's Ctrl +c and bye bye microSD card  :'(.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.

Offline cavy

  • Trusted User
  • Member
  • *****
  • Posts: 420
  • Karma: 55
  • Caveman
    • View Profile
    • PeppermentOS Pixies
  • Peppermint version(s): Peppermint Eight
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #13 on: May 06, 2017, 09:53:22 am »
Any joy Andy..?

I gave you bum steer with the erase time, I've just finished erasing a 16Gb USB stick which took @45 minute plus, (err watching paint dry) on my i7 rig.
“We know what we are, but not what we may be.”

Desktop Dell 7040 i7-6700 500Gb-SSD 32Gb ram
Laptop    Dell 7470 i5-6300 500Gb-SSD  16Gb ram
Various antiques to sample other OS's etc

Offline AndyInMokum

  • Global Moderator
  • Hero
  • *****
  • Posts: 4808
  • Karma: 1013
  • "Keep on Rockin' in the Free World"
    • View Profile
  • Peppermint version(s): PM 9 & PM 8 Respin-2 (64-bit)
Re: Automounting a vFAT 64GB micro-SD card in /etc/fstab
« Reply #14 on: May 06, 2017, 10:38:25 am »
Any joy Andy..?

I gave you bum steer with the erase time, I've just finished erasing a 16Gb USB stick which took @45 minute plus, (err watching paint dry) on my i7 rig.

No, it finished and I formatted it to ext4.  It wouldn't mount.  There was some error about missing software for ext4 files system.  I managed to format it to ext2 and it looked like it was going work.  I then tried to mount it and it came back with superblock errors.  It's now sitting in the bin  :'(.
Backup! Backup! Backup! If you're missing any of these -  you ain't Backed Up!
For my system info please L/click HERE.