ontstudios
Posts: 6
Joined: Wed Jun 17, 2020 10:01 am

Installing an OS clears the SD Card

Wed Jun 17, 2020 10:04 am

Hi, I inserted a 128gb sd card and when I installed the os, it shows that it has only 47 megabytes. Why's that? If I put it in the raspberry pi will it still have 128gb of storage? When I tried to format the card, it still showed as 47mb.

Can someone explain why it does that?

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 10:44 am

Different file systems, the first partition is FAT (which windows recognises) the rest would be EXT4 which windows does not, Linux recognises both (and the pi needs a fat partition to boot from) so yes when installed in your Pi after initial startup your card will show full capacity.

EDIT: Burn the OS image and even if windows suggests you format the card afterwards DO NOT DO SO.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

fruitoftheloom
Posts: 23132
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:11 am

ontstudios wrote:
Wed Jun 17, 2020 10:04 am
Hi, I inserted a 128gb sd card and when I installed the os, it shows that it has only 47 megabytes. Why's that? If I put it in the raspberry pi will it still have 128gb of storage? When I tried to format the card, it still showed as 47mb.

Can someone explain why it does that?

Just ignore what Windows 10, as above stated, MS do not natively understand EXT formatted partitions.

Use the Pi-Imger to create a Bootable SD Card, put the SD Card in your RPi and boot, it will expand the partitions to make full use of the space.

https://www.raspberrypi.org/blog/raspbe ... g-utility/
Rather than negativity think outside the box !
RPi 4B 4GB (SSD Boot)..
Asus ChromeBox 3 Celeron is my other computer...

ontstudios
Posts: 6
Joined: Wed Jun 17, 2020 10:01 am

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:13 am

Thank you so much guys! Really means a lot, but that means the SD card is no longer usable on Windows?

jahboater
Posts: 5680
Joined: Wed Feb 04, 2015 6:38 pm
Location: West Dorset

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:14 am

When its all finished installing, use the command "df -h" to see what space you have.
Pi4 8GB running PIOS64

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:20 am

It can be read on windows (search for ext file extensions), writing is more problematic. However, if the two systems are networked then sharing the card is not too difficult as the underlying file system is irrelevant.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

ontstudios
Posts: 6
Joined: Wed Jun 17, 2020 10:01 am

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:25 am

How can I restore the card so it is like newly bought? Means only one partition, which shows all of the 128gb.

ontstudios
Posts: 6
Joined: Wed Jun 17, 2020 10:01 am

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:26 am

wildfire wrote:
Wed Jun 17, 2020 10:44 am
if windows suggests you format the card afterwards DO NOT DO SO.
Why? I already formatted the card, thinking it would restore it to 128gb.

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:32 am

ontstudios wrote:
Wed Jun 17, 2020 11:25 am
How can I restore the card so it is like newly bought? Means only one partition, which shows all of the 128gb.
If you're using the Raspberry Pi Imager to write your SDCard you don't need to worry about that. It will re-partition the SDCard. On first boot in your RPi it will expand the Linux filesystem to use the whole 128GB SDCard.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:32 am

ontstudios wrote:
Wed Jun 17, 2020 11:25 am
How can I restore the card so it is like newly bought? Means only one partition, which shows all of the 128gb.
Use SD Formatter (https://www.sdcard.org/downloads/formatter/) or a phone/camera.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

GlowInTheDark
Posts: 594
Joined: Sat Nov 09, 2019 12:14 pm

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:35 am

ontstudios wrote:
Wed Jun 17, 2020 11:13 am
Thank you so much guys! Really means a lot, but that means the SD card is no longer usable on Windows?
(Not being snarky; these are true, valid, non-rhetorical questions)
Why do/would you want to use it under Windows when it is being used to boot the Pi?

What is your actual use case? What problem are we actually trying to solve?

Anyway, the short answer to your question is, for all practical purposes: No.

Finally, I suppose the fact that the card is so large (128G) is what makes it seem weird that once you put it in the Pi, it feels like it has been "consumed". I think using large SD card with Pis is basically a waste. Most users use smaller cards (8-32 G). Myself, I still boot mostly from 8G cards (even though the CW here is that 8G is too small for the latest, greatest, all souped up versions of RPi OS).

Finally, finally, it would be possible, to use Gparted to shrink the ext4 partition down to, say, 60G or thereabouts, then create a new FAT32 partition after that and then access that from Windows (after shutting down the Pi, of course, and moving the card back to the Windows machine). There is a (potential) glitch here, that exists in earlier versions of Windows, that I have heard is fixed in W10 (not that any sane person would be using W10, of course), that would prevent Windows from accessing that newly created partition. But, again, it is, so I've heard, fixed in W10, so if you are using that, it might "just work".

Edit: I see that as I was composing this rather lengthy response, several other posters have weighed in. Let me add that you don't need to reformat it to get back all the space. The space is there and is accessible by Linux. It's just not (easily) accessible by Windows.

And, finally, finally, finally, it sounds like you've already reformatted it, so all this may now be moot.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

wildfire
Posts: 606
Joined: Sat Sep 03, 2016 10:39 am
Location: Dundee, Scotland

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 11:36 am

ontstudios wrote:
Wed Jun 17, 2020 11:26 am
wildfire wrote:
Wed Jun 17, 2020 10:44 am
if windows suggests you format the card afterwards DO NOT DO SO.
Why? I already formatted the card, thinking it would restore it to 128gb.
To add, you formatted the partition, not the card.
E8 85 A2 64 C9 64 81 94 64 81 95 64 89 84 89 96 A3
Still NF Shirls

emma1997
Posts: 774
Joined: Sun Nov 08, 2015 7:00 pm
Location: New England (not that old one)

Re: Installing an OS clears the SD Card

Wed Jun 17, 2020 10:14 pm

GlowInTheDark wrote:
Wed Jun 17, 2020 11:35 am
Why do/would you want to use it under Windows when it is being used to boot the Pi?
Some people like me and a few friends use the SD to transfer big files instead of hunting down special readers and cables every time or when network is not available.

I solved this by making /root barely more than 4 gigabytes and /boot the rest of the card which is many times bigger. Violates the official Pi rule of law and truly heretical. But now it only takes a couple minutes to backup/restore instead of hours and me and sneakernetter pals finally achieve nirvana.

W. H. Heydt
Posts: 12431
Joined: Fri Mar 09, 2012 7:36 pm
Location: Vallejo, CA (US)

Re: Installing an OS clears the SD Card

Thu Jun 18, 2020 12:25 am

emma1997 wrote:
Wed Jun 17, 2020 10:14 pm
GlowInTheDark wrote:
Wed Jun 17, 2020 11:35 am
Why do/would you want to use it under Windows when it is being used to boot the Pi?
Some people like me and a few friends use the SD to transfer big files instead of hunting down special readers and cables every time or when network is not available.

I solved this by making /root barely more than 4 gigabytes and /boot the rest of the card which is many times bigger. Violates the official Pi rule of law and truly heretical. But now it only takes a couple minutes to backup/restore instead of hours and me and sneakernetter pals finally achieve nirvana.
USB sticks will work for sneakernet, so no need to make a weirdly formatted SD card. Also bear in mind that where you go over (IIRC) 64GB for a partition, it will be exFAT, which the Pi bootloader can't read.

GlowInTheDark
Posts: 594
Joined: Sat Nov 09, 2019 12:14 pm

Re: Installing an OS clears the SD Card

Thu Jun 18, 2020 1:57 am

Also bear in mind that where you go over (IIRC) 64GB for a partition, it will be exFAT, which the Pi bootloader can't read.
That is the Windows default, but better/smarter tools (the kind all us Kewl people use) can ensure that it is FAT32. I believe FAT32 is actually good up to 2T, even though Windows pretends that it maxes out at 32G.

Reference (from Wikipedia):
The FAT32 boot sector uses a 32-bit field for the sector count, limiting the maximum FAT32 volume size to 2 tebibytes (approximately 2.2 terabytes) with a sector size of 512 bytes. The maximum FAT32 volume size is 16 TiB (approximately 17.6 TB) with a sector size of 4,096 bytes.
GitD's list of things that are not ready for prime time:
1) IPv6
2) 64 bit OSes
3) USB 3
4) Bluetooth

ontstudios
Posts: 6
Joined: Wed Jun 17, 2020 10:01 am

Re: Installing an OS clears the SD Card

Thu Jun 18, 2020 11:21 am

Also bear in mind that where you go over (IIRC) 64GB for a partition, it will be exFAT, which the Pi bootloader can't read.
I made an image with the official Raspberry Pi Imager, and it shows it as exFAT.

User avatar
rpdom
Posts: 17029
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Installing an OS clears the SD Card

Thu Jun 18, 2020 12:32 pm

ontstudios wrote:
Thu Jun 18, 2020 11:21 am
Also bear in mind that where you go over (IIRC) 64GB for a partition, it will be exFAT, which the Pi bootloader can't read.
I made an image with the official Raspberry Pi Imager, and it shows it as exFAT.
That sounds unlikely. Can you show evidence of this so it can be investigated?
Unreadable squiggle

ontstudios
Posts: 6
Joined: Wed Jun 17, 2020 10:01 am

Re: Installing an OS clears the SD Card

Thu Jun 18, 2020 1:09 pm

rpdom wrote:
Thu Jun 18, 2020 12:32 pm
ontstudios wrote:
Thu Jun 18, 2020 11:21 am
Also bear in mind that where you go over (IIRC) 64GB for a partition, it will be exFAT, which the Pi bootloader can't read.
I made an image with the official Raspberry Pi Imager, and it shows it as exFAT.
That sounds unlikely. Can you show evidence of this so it can be investigated?
My mistake, sorry, it shows fat32. 😁

Return to “Troubleshooting”