Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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
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.
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.
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.
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..
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
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
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).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.