LinuxQuestions.org
Help answer threads with 0 replies.
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 02-18-2016, 03:00 PM   #1
clg
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Rep: Reputation: Disabled
Can't erase my Sdcard...


Hi guys

I have a SDcard sitting in a USB card reader...
I have this in /etc/fstab :
/dev/sdc1 /media/claude/SDCARD vfat rw,user,auto,exec,gid=100,uid=1000,umask=002,utf8,codepage=850,shortname=mixed 0 0

so it is mounted in /media/claude/SDCARD...
I have those rights:
drwxrwxr-x 11 claude users 16384 janv. 1 1970 SDCARD

So far, so good...but I can't erase anything ( files/directories ) on this memory...)
When I launch a rm -R * command, everything seems to be erased but , next time I'll plug the Sd card, all the supposedly erased files are still there...which, to be honest, confuse ma a lot ( I'm the owner, I'm root...and I can't erase this memory)

2 quickies
1) what am I missing ?
2) what to be done to completely clean this SD memory
(FYI, I've tried erasing under Seven..lifting the perms, erasing..but same stuff, data still present...

Completely lost...help greatly appreciated !!!
rgds
 
Old 02-18-2016, 03:07 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138Reputation: 2138
How are you removing the card? Are you using umount and sync or just unplugging it?

Many (all?) SD cards also have a physical switch on the side that switches them to read-only, have you played with that?
 
Old 02-18-2016, 03:08 PM   #3
Soadyheid
Senior Member
 
Registered: Aug 2010
Location: Near Edinburgh, Scotland
Distribution: Cinnamon Mint 19.2 (Netbook) and 18.3 (Desktop)
Posts: 1,518

Rep: Reputation: 430Reputation: 430Reputation: 430Reputation: 430Reputation: 430
You've checked the write protect switch on the SD card...?

Play Bonny!

 
Old 02-18-2016, 03:30 PM   #4
clg
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hi
I'm doing an umount and then unplug...(sync ? dunno what it is...)
of course, The card is not write protected by the lateral slider...

As mentionned above, I can acces SDCARD...I see all the files/directories and throw rm command...it seems to erase the whole thing...
I have the feeling, but dunno if it is true...
I'm not erasing the card...but a copy of it !!!

drives me nuts this thing !!!

Last edited by clg; 02-18-2016 at 03:33 PM.
 
Old 02-18-2016, 06:02 PM   #5
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147
oh I don't know
did you try using gparted?
just unmount it
delete it the partition
reastablish it in the format you want
then click the arrow bada bing bada boom

dont for get that if you start it off the command line you got a be root.
 
Old 02-19-2016, 11:12 AM   #6
clg
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Hi

I've tried Gparted but almost everything is greyed out...
I came to the conclusion that the part id dead...I've tried to write on it...no success, then tried to kind of format it using dd...no success !!!
You may read, but not write which is pretty ennoying ( but hopefully, I've got a spare 32Gb which is working fine)

Anyway, many thks for yr concern and yr support
Cheers
 
Old 02-19-2016, 11:20 AM   #7
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147
Quote:
Originally Posted by clg View Post

I've tried Gparted but almost everything is greyed out...
did you try right click on grey area and maybe select "new" ? then take it from there.....

looking up in the right side ensuring you have the right device first... of course you knew that part

Last edited by BW-userx; 02-19-2016 at 11:21 AM.
 
Old 02-19-2016, 11:53 AM   #8
clg
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
Can't access my partition...
I see it, half full but the Partition menu does not give me any access ( resize,format...).everything greyed, "new" has no action...
Dead !!!
 
Old 02-19-2016, 12:08 PM   #9
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147
Quote:
Originally Posted by clg View Post
Can't access my partition...
I see it, half full but the Partition menu does not give me any access ( resize,format...).everything greyed, "new" has no action...
Dead !!!
are you running it i user mode? got a be in root to have permissions to play with partitions.

command line starting.
Code:
$sudo gparted
#or
$su
password
#gparted

Last edited by BW-userx; 02-19-2016 at 12:10 PM.
 
Old 02-19-2016, 12:17 PM   #10
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147
o Tay if that does not work for ya then try this next

Code:
sudo blkid
get the address to your sd /dev/xxx
then
Code:
sudo cfdisk /dev/sdx
where x = whatever it is.

when cfdisk opens up you'll see it then you can delete, create new, and set type, and other things off the command line (terminal). make sure you select write, when you are done, it will then ask for confirmation , type 'yes' so it sticks then quit.

example:

Code:
11:26 AM ~$ blkid
/dev/mmcblk0: UUID="2015-10-09-07-32-35-00" LABEL="VOID_LIVE" TYPE="iso9660" PTUUID="07e07223" PTTYPE="dos"



/dev/sda1: UUID="f79f684e-c079-4daa-8eb7-570890855ef9" TYPE="swap" PARTUUID="6147b2c4-01"
/dev/sda2: UUID="aa6520d6-bf65-4039-abd1-4b55bf95b551" TYPE="ext4" PARTUUID="6147b2c4-02"
/dev/sda3: UUID="cd01a154-f459-4b13-b867-1e4dbc86d677" TYPE="ext4" PARTUUID="6147b2c4-03"

/dev/mmcblk0p1: UUID="3b4605e3-2dba-40f4-acf6-b13da55d0868" TYPE="ext4" PARTUUID="07e07223-01"
/dev/mmcblk0p2: UUID="40cf62eb-8474-4a8a-a15c-c3910aff6fca" TYPE="ext4" PARTUUID="07e07223-02"
as you see I have three indecators for my SD Card, you need the device not the paritions.

that'd be the first one in this case.

Code:
sudo cfdisk /dev/mmcblk0
Code:
                                                          Disk: /dev/mmcblk0
                                          Size: 14.9 GiB, 16012804096 bytes, 31275008 sectors
                                                  Label: dos, identifier: 0x07e07223

    Device                  Boot                      Start               End           Sectors           Size         Id Type
>>  /dev/mmcblk0p1                                     2048          15888383          15886336           7.6G         83 Linux        
    /dev/mmcblk0p2                                 15888384          31275007          15386624           7.3G         83 Linux





 ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
 │ Partition type: Linux (83)                                                                                                        │
 │     Filesystem: ext4                                                                                                              │
 │Filesystem UUID: 3b4605e3-2dba-40f4-acf6-b13da55d0868                                                                              │
 └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────┘
                          [Bootable]  [ Delete ]  [  Quit  ]  [  Type  ]  [  Help  ]  [  Write ]  [  Dump  ]
that is what it looks like in cfdisk

I can delete everything then start over if I like.

using the arrow keys - first select the area partition raw area you want to work with then select what you want to do with it, then enter, type size if it asks you

10.7MB
or
10.3GB

the MB and GB being the most importaint so it knows what you are talking about.

formatting the new partitions may now be required,, I don't know everything

but when I open it up again in Gparted I get that little ! then I just tell it to format it then do it then the ! goes away.

Last edited by BW-userx; 02-19-2016 at 12:49 PM.
 
Old 02-19-2016, 03:28 PM   #11
clg
LQ Newbie
 
Registered: Feb 2016
Posts: 10

Original Poster
Rep: Reputation: Disabled
@BW_userx

Bad luck...sudo cfdisk /dev/sdc1 gives a fatal error. can't open disk...
Below, screen copy...
Thks anyway






Erreur fatale: Impossible d'ouvrir l'unité de disque
Appuyez sur n'importe quelle touche pour quitter cfdisk
 
Old 02-19-2016, 03:32 PM   #12
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (current), FreeBSD, Win10, It varies
Posts: 9,952

Rep: Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147Reputation: 2147
Quote:
Originally Posted by clg View Post
@BW_userx

Bad luck...sudo cfdisk /dev/sdc1 gives a fatal error. can't open disk...
Below, screen copy...
Thks anyway
Erreur fatale: Impossible d'ouvrir l'unité de disque
Appuyez sur n'importe quelle touche pour quitter cfdisk
DUDE I said not the partition

do this

again one more time...

Code:
sudo cfdisk /dev/sdc  <----- notice no 1
better yet, lets try this in google french

Quote:
DUDE je l'ai dit pas la partition

faire

encore une fois de plus...

Code:
sudo cfdisk /dev/sdc <----- Avis n° 1

Last edited by BW-userx; 02-19-2016 at 03:46 PM.
 
  


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
[SOLVED] can't mound sdcard amans Debian 1 03-28-2014 04:15 AM
using sdcard as flash memory msrihari Linux - Newbie 3 04-02-2010 04:37 AM
Sdcard on ARM linux ravi_chobey Linux - Embedded & Single-board computer 3 02-03-2010 09:03 AM
SDcard problems on HP dv2640 ocularb0b Linux - Hardware 0 11-15-2007 04:08 PM
SDCard Partition Problems ch4se Linux - Hardware 1 08-14-2005 08:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:03 PM.

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