LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 01-20-2018, 08:37 AM   #1
parsious
LQ Newbie
 
Registered: Jan 2018
Posts: 3

Rep: Reputation: Disabled
Angry SD card issues


Hi Team,

Iḿ having some issues with an SD card that was in a Pi 2,
its 8Gb in size and I want to reformat it so it can rebuilt with a new test OS fpr some stuff Im working on.

However my normal go to for formatting these cards being a card reader on a windows machine fails to format.

So after plugging the card reader into my pi and confirming that it mounts and writes to the card I have encountered issues with making any alterations to the partition table.

´lslbk´ confirms that the card is found on /dev/sdb with partitions 1,2,3,5 and 6.

I have tried ¨parted¨ which didn't work and then I went onto Fdisk which shows
Code:
=================================================================
Command (m for help): p
Disk /dev/sdb: 7.4 GiB, 7892631552 bytes, 15415296 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: 0x0009c1ec

Device     Boot    Start      End  Sectors   Size Id Type
/dev/sdb1           2048   242187   240140 117.3M  e W95 FAT16 (LBA)
/dev/sdb2         245760 15349759 15104000   7.2G 85 Linux extended
/dev/sdb3       15349760 15415295    65536    32M 83 Linux
/dev/sdb5         253952   376831   122880    60M  c W95 FAT32 (LBA)
/dev/sdb6         385024 15349759 14964736   7.1G 83 Linux

Partition table entries are not in disk order.

Command (m for help):
======================================================

I have gone through and deleted all of these and them made sure I wrote the new data which threw no errors or anything the looked out of the ordinary and the partition table seem not to have changed

lslbk still gives the same info ... starting fdisk again which I would be expecting to have no entries on the table as I didn´t add any back and a table print shows the original table with all 5 partitions

=====================================================

After a scratch of my head I remembered and confirmed that if I were to ´mkfs.ext4 /dev/sdb´ that should just blitz the partition table and rebuild an ext4 filesystem on the card, not really ideal for what i want but in all honesty i can probably deal with that.

So tried that and no dice.

=====================================================

Some more thinking and I had a look at
´dd if=/dev/zero of=/dev/sdb count=512 count=1' which if my memory serves me right should nuke it completely also.

still no dice!

so one last thing that I have tried is to put it in my phone and format it that way ... the phone wouldn't even mount it (not an unheard of issue with SD cards as it seems some android versions want a decent format to start from but hell you never know)..

======================================================

I will freely admit that while Iḿ not new to linux I´m deffinatally not a power user and I haven't really had to do anything too drastic to a machine in a few years

Anyone have any ideas about how I may be able to resurrect this card or is the card so dead even Bones cant save it...

failing that I´m fully prepared to be told I have overlooked some simple thing


Cheers
 
Old 01-20-2018, 11:27 AM   #2
Emerson
LQ Sage
 
Registered: Nov 2004
Location: Saint Amant, Acadiana
Distribution: Gentoo ~amd64
Posts: 7,661

Rep: Reputation: Disabled
I have more than one SD card expired this way. No writes possible, the contents is as it is and cannot be altered.
 
Old 01-20-2018, 11:42 AM   #3
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
it might be that write protection has been set to it, micro sd or a standard sd card?


on USB stick that with some have write protection on them I issues this command to remove it.
Code:
remove write protect usb stick 

hdparm -r0  /dev/sdx
do you got gparted on PI?

on a standard sd card they got a little tab on the side to turn on and off write protection.

I found this
SD Card Write protection
https://github.com/BertoldVdb/sdtool

Last edited by BW-userx; 01-20-2018 at 11:47 AM.
 
Old 01-20-2018, 03:24 PM   #4
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
I ran myself ragged last winter trying to fix a friend's Acer switch 10 with emmc drive/chip. It's exactly like this. I eventually gave up, no help from the Chinese manufacturer. Buddy said he was surfing around and it just suddenly froze and that was it. He is heavy into porn, most of his data is of that nature, I have many of his broken machines and keep telling him to stay away from those places. However, if I remember correctly, I did manage to nuke something with diskpart via a Windows PE, but unable to add partitions.

I wasn't able to find any information like the link you posted BW-userx, no matter how much Googling, but that was a year ago. Do I want to attempt this again, that is the question I am now pondering. Maybe I'll just subscribe to this thread for now. I ran a 30 day trial of Windows 8.1 off a USB stick with Win2USB setup and really liked this little 32bit thing, love the portability.
 
Old 01-20-2018, 04:18 PM   #5
Myrddin Emrys
LQ Newbie
 
Registered: Dec 2017
Posts: 6

Rep: Reputation: Disabled
Here too as well, it is quite annoying, I thought SD cards are supposed to be more resilient.
 
Old 01-20-2018, 04:51 PM   #6
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by Myrddin Emrys View Post
Here too as well, it is quite annoying, I thought SD cards are supposed to be more resilient.
It is a known fact flash based memory has limited writes.
 
Old 01-20-2018, 06:46 PM   #7
parsious
LQ Newbie
 
Registered: Jan 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post
it might be that write protection has been set to it, micro sd or a standard sd card?

https://github.com/BertoldVdb/sdtool


It's a microSD so no stupid tab .. that was my initial thought .. but I have proven I can write to the FS that is there.

you can get gparted on Pi and all sorts of the GUI tools but I'm an old guy and Command line is where I do most of my work so I tend to use it

Last edited by parsious; 01-20-2018 at 06:49 PM.
 
Old 01-20-2018, 06:52 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,130

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
When I got my first pi3, I went and bought a couple of class 10 SDcards (same as I use in my DSLR). One was DOA.
Tossed it in the bin.
 
Old 01-20-2018, 07:42 PM   #9
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by parsious View Post
I can write to the FS that is there.
As I mentioned, I had exact same issues. I could write to the partitions via the Windows PE, it's the partitioning/formatting that could not be altered. I came to the conclusion it was something towards the beginning of the drive that was either burnt in or locked.
The Acer Switch 10 had Windows 8.1, someone on some forum said that operating system enabled bitlocker automatically, the Win2USB OS I ran on it said there was no bitlocker encryption.
Some time in the past there were a lot of threads here related to not being able to convert a U3 smart drive to normal data drive, similar situation as this, something at the beginning of the drive is locked.
EDIT: Something like this:
The U3 platform is a "closed" platform / proprietary format. SanDisk, the rightsholders for U3, ask for a 5% royalty from USB flash drive manufacturers who wish to implement the platform on their products.

Last edited by Brains; 01-20-2018 at 08:01 PM.
 
Old 01-20-2018, 08:29 PM   #10
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
It's the corporate way
You have to buy another one.

My Grandfather's farm pickup was an International harvester pickup when I was a child, it was 50 years old at the time and we used it every day, it was also quite impossible to find parts but that was obviously not an issue.

Today, if you buy a new vehicle and put it in a shed and don't drive it, 50 years from now it will be inoperable, seals will be shot, etc etc etc.

The corporation does not want you to buy one vehicle in your lifetime, they want you to buy one every two years.

EDIT: Had you not gone to the porn site......?

Last edited by Brains; 01-20-2018 at 09:02 PM.
 
Old 01-21-2018, 08:27 AM   #11
Myrddin Emrys
LQ Newbie
 
Registered: Dec 2017
Posts: 6

Rep: Reputation: Disabled
Quote:
Originally Posted by Brains View Post
It is a known fact flash based memory has limited writes.
That's not the case this time.
 
Old 01-21-2018, 02:21 PM   #12
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by parsious View Post
It's a microSD so no stupid tab .. that was my initial thought .. but I have proven I can write to the FS that is there.

you can get gparted on Pi and all sorts of the GUI tools but I'm an old guy and Command line is where I do most of my work so I tend to use it
it was just an idea for one more thing to use to try and blast them partitions out of it. If you got windows laying around on a PC somewhere you might want to try their built in partitioning software they have. Just make it one partition in ntfs or whatever windows format, then redo the format whence you get it back to PI Linux. It's just an idea.

for all of this grief it is giving you .. you might want to just pick up a new one.

EDIT
from everything I've seen on write protect on a micro SD Card, they keep showing that tab on the adapter ... just out of curiosity and process of elimination. if you have one of them adapters, I'd just slip it in and move that tab to remove write protect then take it out of that adapter then see if that had any effect on it.

it is not a guarantee. just one more (idea) thing to try..

Last edited by BW-userx; 01-21-2018 at 02:32 PM.
 
Old 01-21-2018, 09:27 PM   #13
Brains
Senior Member
 
Registered: Apr 2009
Distribution: All OS except Apple
Posts: 1,591

Rep: Reputation: 389Reputation: 389Reputation: 389Reputation: 389
Quote:
Originally Posted by Myrddin Emrys View Post
That's not the case this time.
I know, that's why I mentioned porn sites and 5% royalty from flash drive manufacturers who wish to implement the platform. Notice this time I omitted the word "USB"
EDIT: And...it's the corporate way

Last edited by Brains; 01-21-2018 at 09:55 PM.
 
Old 01-21-2018, 10:00 PM   #14
parsious
LQ Newbie
 
Registered: Jan 2018
Posts: 3

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by BW-userx View Post

for all of this grief it is giving you .. you might want to just pick up a new one.

EDIT
from everything I've seen on write protect on a micro SD Card, they keep showing that tab on the adapter ... just out of curiosity and process of elimination. if you have one of them adapters, I'd just slip it in and move that tab to remove write protect then take it out of that adapter then see if that had any effect on it.

it is not a guarantee. just one more (idea) thing to try..
Yeah .. New card is being obtained today ... and yep I tried the adapter trick too for write protect ...

in in that weird state where I know there is almost no hope but I'm too suborn to be beaten my a bloody SD card
 
Old 01-22-2018, 07:11 AM   #15
BW-userx
LQ Guru
 
Registered: Sep 2013
Location: Somewhere in my head.
Distribution: Slackware (15 current), Slack15, Ubuntu studio, MX Linux, FreeBSD 13.1, WIn10
Posts: 10,342

Rep: Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242Reputation: 2242
Quote:
Originally Posted by parsious View Post
Yeah .. New card is being obtained today ... and yep I tried the adapter trick too for write protect ...

in in that weird state where I know there is almost no hope but I'm too suborn to be beaten my a bloody SD card
I know that feeling... I've never heard of such a thing as an microSD Card going on write protect all by its little self. It has to be something to do with that write bit that is stored on it. Like the USB Stick that come with write protect already and I just issue that hdparm -r0 /dev/sdx to set it for read / write. but on one is talking on the internet about it. It might be one of them conspiracies we so often do not hear about. ( sarcastically speaking of course).
 
  


Reply



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
Ubuntu Issues - Media Card Reader and Wireless Card illiniguy3043 Ubuntu 6 09-09-2008 10:17 AM
TV Card issues streaker Linux - Hardware 1 01-30-2006 10:09 AM
Sound card Issues in Suse 9.3 with a ??Conexant?? Sound card in Gateway laptop hackerarchangel Linux - Hardware 3 12-30-2005 11:35 PM
more Wireless Card issues... Spectre630 Slackware 6 12-08-2005 07:34 AM
Issues with sound card card Scrob Linux - Newbie 1 02-17-2005 12:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 11:23 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
Open Source Consulting | Domain Registration