dogsled
Posts: 10
Joined: Mon Sep 14, 2015 9:09 pm

How big is the Operating System ?

Thu Jul 07, 2016 8:47 pm

I am pretty confused on this, because I am getting three different answers.

1 - looking at the SD card from Win10 explorer I get 57M and there is no sign of the Linux file system.
2 - looking at the SD card from Linux with free -m it says there is 195M in use
3 - If I use Win32DiskImager, which is supposed to save everything, I get a 7.5G .img file.

Can these all be correct ?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 12411
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: How big is the Operating System ?

Thu Jul 07, 2016 8:55 pm

Microsoft ignores Linux partitions as "not invented here".
You do not mention which OS you are talking about.

User avatar
Burngate
Posts: 6100
Joined: Thu Sep 29, 2011 4:34 pm
Location: Berkshire UK Tralfamadore
Contact: Website

Re: How big is the Operating System ?

Thu Jul 07, 2016 9:11 pm

And the last one - 7.5G - is because WinDiskImager makes an image of the whole disk / card irrespective of what's on it, files, data, empty space, ...

mfa298
Posts: 1387
Joined: Tue Apr 22, 2014 11:18 am

Re: How big is the Operating System ?

Thu Jul 07, 2016 10:41 pm

dogsled wrote:I am pretty confused on this, because I am getting three different answers.

1 - looking at the SD card from Win10 explorer I get 57M and there is no sign of the Linux file system.
2 - looking at the SD card from Linux with free -m it says there is 195M in use
3 - If I use Win32DiskImager, which is supposed to save everything, I get a 7.5G .img file.

Can these all be correct ?
1 & 3 are disk (or SD card related), 2 is Ram usage (not disk usage).

In Linux you can see how much of the SD card is used with df -lh

Although there's then a deeper question, what do you mean by Operating System, You could define it as the Linux Kernel in which care it's fairly small but not very useful. Or you start to include the various applications which are installed by default.

leiptrstormr
Posts: 60
Joined: Mon May 18, 2015 12:33 pm

Re: How big is the Operating System ?

Thu Jul 07, 2016 11:58 pm

1 There are two partitions being made. The /boot partition is in a format Windows can read. The / partition is not readable without 3rd party software on Windows. 57M is presumably the /boot partition.

2 df will tell you how much space is being used on whatever partition under Linux. free is used for RAM.

3 There is a bunch of empty space being introduced when you decompress the OS image. This is where future data will go after installation. If that empty space wasn't there, you would have no room to write to disk. You will want to further expand the / partition on SD cards larger than 8GB. You can do this through raspi-config.

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

Re: How big is the Operating System ?

Fri Jul 08, 2016 3:45 am

Welcome to the Forums.

Actually....none of those is the "size of the Operating System", at least, not in a strict sense. The kernel files (the actual OS that gets loaded at boot) on a card are around 4MB (kernel7.img is about 10KB bigger than kernel.img).

Perhaps if you could expand your question a bit so that we can be sure what the actual question is, a more meaningful answer can be given. (And don't be put off...depending one what you want to know, getting the question right can be rather difficult.)

dogsled
Posts: 10
Joined: Mon Sep 14, 2015 9:09 pm

Re: How big is the Operating System ?

Fri Jul 08, 2016 3:56 am

OK - I realize it was not a well considered question. I learned a good bit. Thanks to all.

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

Re: How big is the Operating System ?

Fri Jul 08, 2016 5:02 am

dogsled wrote:OK - I realize it was not a well considered question. I learned a good bit. Thanks to all.
Thanks for sticking around. What was it you actually wanted to know, or did that get answered along the way?

dogsled
Posts: 10
Joined: Mon Sep 14, 2015 9:09 pm

Re: How big is the Operating System ?

Fri Jul 08, 2016 1:50 pm

All my confusion was resolved, thanks.

MHIBONL
Posts: 7
Joined: Wed Sep 07, 2016 4:20 pm

Re: How big is the Operating System ?

Wed Sep 07, 2016 4:26 pm

I searched the forumthreads ~ this seemed a likely place to add my 2-cents, rather than start another new thread...

So ... maybe I jumped the gun.
I bought 6 Pi_3's and *8* 32GB micro SD's
(I wish to give a few as gifts).

All of my 1st 6 "OS_loads" boot fine, having "Berryboot" triple-boot option, with Raspbian/UbuntuMate/OpenElec(w/Kodi, for movies, which play great!).

Of course, the sad part is, videos must be streamed from several 128GB flash drives, because I find NO way to transfer ANY videos onto the "built-in-remainder" of the (micro)SD cards...(?)

System files on all 6 cards show as 60.8MiB ("size on disk") and the [_]/ "unnamed folder" shows as 3.2GiB ("size on disk")... insufficient space for a 4GB-or-larger group of video files.

To continue:
In [Config], when I select (1) Expand Filesystem
I consistently get the immediate return-message:
"is not an SD card. Don't know how to expand."

So, my first question is:
Is the 'expand' feature a remnant from the older Pi models/OS's, that USED "SD" cards, and NOT "microSD" cards?

Or is something ELSE going on here?

Any pointers appreciated.

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: How big is the Operating System ?

Wed Sep 07, 2016 7:22 pm

I'm using micro sdcards on my pi and it give's about 29gb when a 32gb card is used
i'm running debian jessie

and df -h wil give me the total of used space and the total size of the card as also the card in the card reader

[email protected]:/dev# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/root 30G 8.1G 20G 29% /
devtmpfs 214M 0 214M 0% /dev
tmpfs 218M 0 218M 0% /dev/shm
tmpfs 218M 25M 193M 12% /run
tmpfs 5.0M 12K 5.0M 1% /run/lock
tmpfs 218M 0 218M 0% /sys/fs/cgroup
/dev/mmcblk0p1 63M 21M 43M 33% /boot
tmpfs 44M 0 44M 0% /run/user/1000
/dev/sda9 160M 104M 57M 65% /media/pi/62D2-C973
/dev/sda8 1022M 1.4M 951M 1% /media/pi/00b7c225-bc5d-4f6b-a10a-ee2ec91c417c
/dev/sda7 160M 104M 57M 65% /media/pi/5D1E-92B5
/dev/sda6 3.6G 3.1G 356M 90% /media/pi/root
/dev/sda5 60M 21M 40M 34% /media/pi/boot
/dev/sda3 27M 2.1M 23M 9% /media/pi/SETTINGS
/dev/sda10 1022M 1.4M 951M 1% /media/pi/cc71a102-2962-4807-91ef-7be96f0e1b7b
tmpfs 44M 0 44M 0% /run/user/0
[email protected]:/dev#

the card /dev/mmcblk0 is the boot card and the /dev/sda is the mounted one in the card reader
linux patrition wil not showup on a windows machine

drgeoff
Posts: 9925
Joined: Wed Jan 25, 2012 6:39 pm

Re: How big is the Operating System ?

Wed Sep 07, 2016 8:20 pm

MHIBONL wrote: So, my first question is:
Is the 'expand' feature a remnant from the older Pi models/OS's, that USED "SD" cards, and NOT "microSD" cards?
Except for the lock switch, the difference between SD cards and micro-SDs card is only the physical size of the casing and connectors. Electrically, they are exactly the same.

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

Re: How big is the Operating System ?

Wed Sep 07, 2016 11:57 pm

MHIBONL wrote: Of course, the sad part is, videos must be streamed from several 128GB flash drives, because I find NO way to transfer ANY videos onto the "built-in-remainder" of the (micro)SD cards...(?)

System files on all 6 cards show as 60.8MiB ("size on disk") and the [_]/ "unnamed folder" shows as 3.2GiB ("size on disk")... insufficient space for a 4GB-or-larger group of video files.

To continue:
In [Config], when I select (1) Expand Filesystem
I consistently get the immediate return-message:
"is not an SD card. Don't know how to expand."

So, my first question is:
Is the 'expand' feature a remnant from the older Pi models/OS's, that USED "SD" cards, and NOT "microSD" cards?

Or is something ELSE going on here?

Any pointers appreciated.
The raspi-config expand function only works with a single installed OS image, e.g. Raspbian. OS images are released in the smallest size that will hold everything. When the image is written to the SD/microSD card the root partition only uses that minimal amount of space. If you use the expand option, the root filesystem is extended to use the otherwise unused space. If you install using NOOBS or Berryboot, the OSes are installed using all available space on the card, and if multiple OSes are installed, each OS iwll get a lot less space than if it were the only one on the card, so there is no space to expand the file system into. One feature NOOBS has is the ability to create a 500MB "OS" partition with nothing in it. That data partition can be mounted as part of any OS on the card.

In the most recent release of Raspbian, the file system is automatically expanded on first boot, followed by a reboot.

One thing you might consider for your streaming is to get a WD PiDrive. It's a low power, 314GB, single platted HDD specifically "tuned" to be run off a single USB port on a Pi. Or you could attach a self-powered external HDD (or SSD) or whatever size you want. I understand that there are 10TB drives on the market....

MHIBONL
Posts: 7
Joined: Wed Sep 07, 2016 4:20 pm

Re: How big is the Operating System ?

Thu Sep 08, 2016 3:07 pm

W. H. Heydt wrote: "If you use the expand option, the root filesystem is extended to use the otherwise unused space. ... and if multiple OSes are installed, each OS iwll get a lot less space than if it were the only one on the card, so there is no space to expand the file system into.....
I have read, and re-read this "til my brain hurts" <grin>. I seem to be missing something, at the "foundation-level".
Begin with a 32GB micro-SD, which, admittedly, only affords 28-or-so "useable Gigs" of "storage space".
Install a series of "miniscule" OS's that consume a couple hundreds of magabytes of that space.

I am certain that it is something within the very CONCEPT of an "image" that I am missing. How does a couple hundred megabytes of data - ITSELF - "expand" to fill literally gigabytes of "space"? Where does all that space "go"... where does the "fat"/"filling" come from?

Is there NO POINT WHATSOEVER in using a card larger than 4GB to operate a Pi? Is there really/truly no way to "use" all that {how shall I say it?} "not-so-extra-anymore" space, on a 32GB card...?

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: How big is the Operating System ?

Thu Sep 08, 2016 3:18 pm

What's df -h telling you

mikerr
Posts: 2789
Joined: Thu Jan 12, 2012 12:46 pm
Location: UK
Contact: Website

Re: How big is the Operating System ?

Thu Sep 08, 2016 3:36 pm

MHIBONL wrote: Begin with a 32GB micro-SD, which, admittedly, only affords 28-or-so "useable Gigs" of "storage space".
Install a series of "miniscule" OS's that consume a couple hundreds of magabytes of that space.
Miniscule ? Earlier you said:
MHIBONL wrote: having "Berryboot" triple-boot option, with Raspbian/UbuntuMate/OpenElec
Each one of those is likely 4GB ...
Is there NO POINT WHATSOEVER in using a card larger than 4GB to operate a Pi? Is there really/truly no way to "use" all that {how shall I say it?} "not-so-extra-anymore" space, on a 32GB card...?
4GB is probably the minimum, 8GB more reasonable for raspbian
Android app - Raspi Card Imager - download and image SD cards - No PC required !

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: How big is the Operating System ?

Thu Sep 08, 2016 3:59 pm

I had the same problem with noobs install the linux partition was in a fixed extended partition so there's no way you can extend your partition if that's the case

MHIBONL
Posts: 7
Joined: Wed Sep 07, 2016 4:20 pm

Re: How big is the Operating System ?

Thu Sep 08, 2016 4:06 pm

drgeoff wrote: Except for the lock switch, the difference between SD cards and micro-SDs card is only the physical size of the casing and connectors. Electrically, they are exactly the same.
Thank you for that straightforward reply...
"bit-by-bit", with such straightforward answers/help, this "ex-Windows-junkie" might become a full-fledged "Convert"...(!)

MHIBONL
Posts: 7
Joined: Wed Sep 07, 2016 4:20 pm

Re: How big is the Operating System ?

Thu Sep 08, 2016 4:47 pm

nl3prc wrote:What's df -h telling you
I had no idea what you were asking <blush> until I seemed to recall seeing "df -h" previously, and scrolled-up-a-bit.

Here is what I see (with 1 of my 128GB flash drives inserted) :
df_-h_results.png
df_-h_results.png (15.12 KiB) Viewed 2225 times
Q : Is it possible to explain what-it-all-means in "laymen's terms".....(?)

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: How big is the Operating System ?

Thu Sep 08, 2016 5:06 pm

MHIBONL wrote:
nl3prc wrote:What's df -h telling you
I had no idea what you were asking <blush> until I seemed to recall seeing "df -h" previously, and scrolled-up-a-bit.

Here is what I see (with 1 of my 128GB flash drives inserted) :
df_-h_results.png
Q : Is it possible to explain what-it-all-means in "laymen's terms".....(?)
As you can see the card is already at full capacity look at the none LINE 29gb 2.8 used and 25gb available

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

Re: How big is the Operating System ?

Thu Sep 08, 2016 5:23 pm

MHIBONL wrote:
W. H. Heydt wrote: "If you use the expand option, the root filesystem is extended to use the otherwise unused space. ... and if multiple OSes are installed, each OS iwll get a lot less space than if it were the only one on the card, so there is no space to expand the file system into.....
I have read, and re-read this "til my brain hurts" <grin>. I seem to be missing something, at the "foundation-level".
Begin with a 32GB micro-SD, which, admittedly, only affords 28-or-so "useable Gigs" of "storage space".
Install a series of "miniscule" OS's that consume a couple hundreds of magabytes of that space.

I am certain that it is something within the very CONCEPT of an "image" that I am missing. How does a couple hundred megabytes of data - ITSELF - "expand" to fill literally gigabytes of "space"? Where does all that space "go"... where does the "fat"/"filling" come from?

Is there NO POINT WHATSOEVER in using a card larger than 4GB to operate a Pi? Is there really/truly no way to "use" all that {how shall I say it?} "not-so-extra-anymore" space, on a 32GB card...?
The current "full" Raspbian Jessie takes a minimum of 4.3GB, so the minimum card to run it would be 8GB. (I use a lot of 8GB cards.) The current release automatically expands the root partition to use all space not being used by the /boot partition, so root gets a bit under 8GB, with 3.5+GB of free space.

Here is a df -h of such a card:

Code: Select all

Filesystem      Size  Used Avail Use% Mounted on
/dev/root       7.2G  4.0G  2.9G  59% /
devtmpfs        427M     0  427M   0% /dev
tmpfs           432M     0  432M   0% /dev/shm
tmpfs           432M   44M  388M  11% /run
tmpfs           5.0M  4.0K  5.0M   1% /run/lock
tmpfs           432M     0  432M   0% /sys/fs/cgroup
/dev/mmcblk0p1   63M   21M   43M  33% /boot
tmpfs            87M     0   87M   0% /run/user/1000
The important parts there are the /dev/root, mounted at '/' and /dev/mmcblk0p1 mounted at '/boot'.

When a partition is expanded, the space becomes available for use. You can't put data, programs or directory structures in space that isn't part of a file system because anything that isn't part of a mounted file system can't be "seen" by the OS. This is also true on--for instance--Windows. It's just that on Windows very few people these days manipulate the partition structure on an HDD, so that all gets hidden away where very few people will ever see it.

Now.... If you install multiple OSes--whether through Berryboot or NOOBS--each OS will get one or more partitions and each one will only be aware of its own partitions. If you want to see *everything*, use gparted. It will show you the partition structure of the entire device.

Another step (which has--I think--gone unmentioned in this thread) is that OS install images are downloaded in a compressed format. For single OS images, or NOOBS, the compression is one that is easy for a Windows user to uncompress using common tools like Peazip. For the full NOOBS image, a highly compressed (< 1GB vs. 1.3GB) image of Raspbian is included. The degree to which a file can be compressed depends a great deal on the nature of the data involved. In order to be used, the system has to be uncompressed, and at that point, it will take whatever space it really takes. About 4.3GB in the case of the full version of the Raspbian image.

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: How big is the Operating System ?

Thu Sep 08, 2016 6:47 pm

you can also check your partitions with fdisk

fdisk /dev/mmcblk0

and then enter p voor partitions

[email protected]:/sys# fdisk /dev/mmcblk0

Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 29.8 GiB, 32026656768 bytes, 62552064 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: 0x914ba946

Device Boot Start End Sectors Size Id Type
/dev/mmcblk0p1 8192 137215 129024 63M c W95 FAT32 (LBA)
/dev/mmcblk0p2 137216 62552063 62414848 29.8G 83 Linux


Command (m for help):

and with my noobs sd card its look like this

as you kan see the sda6 partition is in the range of the sda2 so here you can see that the sda6 is in the sda2 partition here is the problem that you can't make sda6 bigger than 6.2gig no matter what your sdcard size
Attachments
fdisk-noobs.jpg
fdisk-noobs.jpg (54.74 KiB) Viewed 2119 times

MHIBONL
Posts: 7
Joined: Wed Sep 07, 2016 4:20 pm

Re: How big is the Operating System ?

Thu Sep 08, 2016 10:59 pm

nl3prc wrote: As you can see the card is already at full capacity look at the none LINE 29gb 2.8 used and 25gb available
Forgive me, but...although I *do*, in fact, see a "none line" {and the corresponding 25gb}, it is embedded-in with a number of other lines that I don't FULLY comprehend, here. And, the "none" means exactly that to me at this point!

See my "further post", below please... (and Thank-you for your effort to help steer me towards understanding this "altogether-new-and-different-to-me" system...).

MHIBONL
Posts: 7
Joined: Wed Sep 07, 2016 4:20 pm

Re: How big is the Operating System ?

Thu Sep 08, 2016 11:32 pm

nl3prc wrote: as you kan see the sda6 partition is in the range of the sda2 so here you can see that the sda6 is in the sda2 partition here is the problem that you can't make sda6 bigger than 6.2gig no matter what your sdcard size
Believe-it-or-not, re-reading this, while looking at your [enlarged] graphic, makes sense.
However, this does not completely erase my "uncertainties", regarding my own scenario.

I do want to thank you for your input here; once the term "partition" was mentioned, things seem to be making (slightly) "better" sense to me (though STILL a bit blurry).

Correct me here-and-now, please, if I do not have THIS correct:
Each of the 3 OS's that are installed-and-functioning (for me) can only see THAT "partition" to which they are installed.
Assuming that the above statement is "axiomatic", my question can now be more clearly "framed" (I think).

My desire REMAINS to understand whether-or-not there is ANY chance of making the "unused portion" of these 32GB cards "usable/accessible-to" the OpenElec(Kobi) part of the "Triple-boot-System".

W. H. Heydt wrote (above):
"If you use the expand option, the root filesystem is extended to use the otherwise unused space..."

I am NOW "fully-lost" as to the fundamental vision of "root", when discussing this scenario. Do I, or do I not have 4 distinct / different "roots"? 1)Berryboot("primary"), 2)Raspian-boot, 3)OpenElec-boot, 4)UbuntuMate-boot...?

In order to try to more clearly understand what my "Pi" can see on the card, I tried what you had suggested:

fdisk /dev/mmcblk0
{{and I got}}
Welcome to fdisk (util-linux 2.25.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
fdisk: cannot open /dev/mmcblk0: Permission denied

So : I re-booted [having a "vague_image" of that "sector_designation" in my mind from booting (and re-booting) so many times]
and , saw THIS:
booting_1.jpg
booting_1.jpg (24.72 KiB) Viewed 2047 times
So I tried the ^above^ command again, using "mmcblk0p2" and,
got the same "error msg":
fdisk: cannot open /dev/mmcblk0p2: Permission denied

To anybody who now understands my confusion, I ask:
What command(s) might I use, in order to find out EXACTLY how much "usable_space" IS available to each of the 3 OS's on my cards...?

AND - (again, in "Layman's terms", if possible): is there any way whatsoever that the "unused" portion of these 32GB cards might be made "usable" by the Pi's...?

Thanks to all for sharing...(!)

User avatar
nl3prc
Posts: 160
Joined: Sun Jul 24, 2016 12:39 pm
Location: Den Helder the netherlands

Re: How big is the Operating System ?

Fri Sep 09, 2016 9:31 am

i think you logged in as user pi so fdisisk is not working without sudo before it
as you can see you don't use the p1 or p2 after the /dev/mmcblk0
sudo fdisk /dev/mmcblk0

and than enter p voor partitions

if you want to do it without sudu go in as superuser with command su -
Attachments
fdisk-rasbian-jessie.JPG
fdisk-rasbian-jessie.JPG (50.04 KiB) Viewed 1950 times

Return to “Beginners”