[raspberry-vi] Re: Micro SD Card nightmare, can anyone help?

  • From: <kperry@xxxxxxxxxxxxx>
  • To: <raspberry-vi@xxxxxxxxxxxxx>
  • Date: Sun, 24 Jan 2021 14:14:21 -0500

Probably silly question but if you wrote this on windows did you eject first 
and wait?  Second ifit is windows did you unmount the sd card after writing it 
before using it?

Ken

-----Original Message-----
From: raspberry-vi-bounce@xxxxxxxxxxxxx <raspberry-vi-bounce@xxxxxxxxxxxxx> On 
Behalf Of Mobeen Iqbal
Sent: Sunday, January 24, 2021 4:49 AM
To: raspberry-vi@xxxxxxxxxxxxx
Subject: [raspberry-vi] Micro SD Card nightmare, can anyone help?

Hello Everyone.

Recently, I got myself a pi 4 with 8GB of ram. I was rather looking forward to 
seeing what it had to offer. Whilst I was at it, I bought my self a samsung evo 
plus 128GB Micro SD  card, under the assumption that I could use the larger SD 
card in the pi4 and take advantage of the extra storage. You may wonder why I 
would need the storage. I am working on a project which could require the 
storing of rather large files, and whilst I could store the files to an 
external device, there are times when I want them on the card for convenience 
so I can image the card and keep a backup. I wrote the latest raspbian lite 
image to the SD card and booted the pi.

Everything seemed to be going OK, until I actually tried to use it. The pi was 
fine with writing larger files, but when performing operations such as apt-get 
upgrade where lots of smaller files were involved and lots of IOPS were being 
carried out, the SD card slowed to a crawl. It would take the pi more than an 
hour to update.

My next step was to try a different brand of micro SD card. I bought a 128GB 
Sandisk extreme pro micro SD card. I wrote the lite image to the card, booted 
and it was running like a dream. Updating fine within 15 minutes, file copy 
speeds were amazing, the usual.

Thinking I was on to a winner, I bought myself a second pi4, and bought another 
sandisk Micro SD card, exactly the same as the first.

I wrote the image to the card and booted. The pi wouldn't boot. It would get as 
far as resizing the partition then hang. I couldn't SSH in or anything.

Thinking it might be the image, I tried a different one, as another lite image 
had been released in early January. Still no joy. OK I thought, it must be the 
software.

I tried formatting the micro SD card using the official SD formatter tool, then 
tried burning the image with etcher, win flash tool, and roadkill's disk 
imager. All 3 times, the pi would refuse to boot and would hang at the same 
stage.

I also tried zeroing the card and formatting the micro SD card using the
fat32 file system, again using the recommended guiformat SD software. 
Still no joy when the image was written.

I then tried to write the image using DD in linux, using a completely different 
card reader to eliminate both the reader and the operating system/software. The 
image was successfully written and all of the partitions were showing up as 
expected. However, the pi would still not boot.

I had a 32GB micro SD card handy, so I thought I would try using that card 
instead using the above methods of writing the image. Still no joy.

Finally, I tried an alternative image from raspberry-asterisk.org. This is an 
image which includes the FreePBX switchboard software. This time, the pi did 
boot and I was able to log in. However, the partitions were not resized as they 
had disabled the auto resize script. No problem I thought, I'll use the 
raspi-config script. The resizing process started, but hung on syncing disks. I 
couldn't get it to progress beyond that point.

OK I thought, it could be a faulty batch of cards. I bought another card, this 
time I tried with a 256GB microSD card made by sandisk. 
Here's where things got interesting. I wrote various images to the card based 
on raspbian lite. At first, I had exactly the same issue, i.e hanging on boot. 
The FreePBX image would boot, but still wouldn't resize. I remembered about the 
latest raspbian lite image which I hadn't yet tried. I wrote it to the card a 
few times, trying different software, different card readers, the usual. On the 
4th or 5th attempt, the image booted fine. The partitions were resized, and I 
was able to use the pi as usual and the 256GB micro SD card is working like a 
dream. 
To prove the point, I installed freePBX, which is quite an intensive 
installation process involving multiple reboots and plenty of IOPS.

My question is this. Why are the images working sometimes and not others? The 
first pi with a 128GB card and the second pi with the 256GB card are both 
working fine, but I don't know what changed in the image writing process to 
make them work. Also, why do they seem to work on some cards of the same brand 
but not others? I have run HW2Test on the cards to see if they're genuine and 
they pass the tests.

I have double checked to make sure the partition UUID isn't changing after the 
resize script runs, and it seems to be fine.

If it was an issue with the cards, surely they wouldn't boot or work at all. 
Are we still at the stage that the pi4 can't support booting from larger micro 
SD cards? If so, then it's certainly a shame now that larger SD cards are 
cheaper than they were. Smaller cards aren't going to be made forever. I also 
tried resizing the partitions manually on the FreePBX image using another linux 
box. The resize went absolutely fine, but the pi refused to boot from the new 
partition after the resize. I haven't yet tried making sure the partition UUID 
is the same, as I was giving up by this point. Why should I have to use another 
linux system to resize the partitions? I am wondering if it is to do with the 
way the pi powers down after a reboot. If the partitions are resizing and the 
pi is restarting, perhaps the reboot isn't completing? I did try turning the 
power off and back on when the pi was hanging, still no joy.

I have also tried the cards on a known working Pi4 with the same results. Does 
anyone have any theories as to what could be going on? I can't think of 
anything else to try at this stage. I could switch to another operating system 
such as arch, but there are certain projects where I would prefer to use 
raspbian if possible. I could try different brands of cards, but I am unsure 
which brands to try next. Also, I don't want to end up with too many cards that 
I can't use. I've never had this issue with previous raspberry pi's. I have 
some model 2B's and model 3B's and all images have worked fine on there, even 
if I've used a larger SD card such as 64GB. Does anyone have any ideas?

Thanks for reading,

Mo.


===========================================================
The raspberry-vi mailing list
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

=========================================================== 
The raspberry-vi mailing list 
Archives: //www.freelists.org/archives/raspberry-vi
Administrative contact: <mike.ray@xxxxxxxxxxxxxx>
-----------------------------------------------------------
Raspberry Pi and the Raspberry Pi logo are trademarks of the Raspberry Pi 
Foundation.

This list is not affiliated to the Raspberry Pi Foundation and the views and 
attitudes expressed by the subscribers to this list do not reflect those of the 
Foundation.

Mike Ray, list creator, January 2013

Other related posts: