Take a fresh install of Navigatrix on an 8GB stick and run
df -h (
display
file system in
-human readalbe form) it leaves something under the parrot like:
Attachment:
8GB-default.png [ 33.34 KiB | Viewed 32532 times ]
...more information than you can shake a stick at.
It shows the type; size; how much is used; what space is left in that file system; the percentage of use in that file system;...and where that file system is attached to the rest of the structure. It is frequently talked about like a 'tree'. The root (
/) is the base to which all others are connected. Everything else branches off the root, or something connected to the root.
[ For the moment ignore the last five lines. They are 'virtual' filesystems and sized to be half (1/2) of the RAM on the computer. This particular machine has 2GB RAM...really, ignore them for the moment. ]
However this traditional simplicity becomes a twisted hall of mirrors in order for a "LiveCD" system to function both as something that works like a CD but also is something that can be modified.
A default installation is on a USB stick that is attached to the computer at
/dev/sda1 (/device/scsi device...the first one; first partition)
As you see the USB stick as it weighs in at 7.5GB (on an 8GB stick...computer arithmetic adds up even when it doesn't make sense). 1.9GBs are used; 5.6GBs leftover; 26% capacity...and it is all mounted at
/cdrom. This is where you go (
/cdrom) to see what's on the stick.
Now of that 1.9GBs, 1.3GBs is in a read-only-file-system on a loop (think spinning CD) appropriately branching from the root at
/rofs. This contains all the software for the system. It is cleverly packed away in a compressed form. When you, or the computer, need to use something from there that part is un-packed and read. No one can modify this package...but it can be unpacked and read fairly rapidly. People love to say it's decompressed "on the fly". Unpacked it takes up about three times the space.
A computer could run on everything in that 1.3GB read-only compressed package. So far we have something that functions like a CD; it just doesn't take up much room. But it has limited function....it's just a CD on a stick.
This is where it all starts to get mind-bendingly slick...in order to have a system that can be modified we need some structures that will accept those changes AND be there the next time the computer (and the system) is started.
ENTER: The persistent file.
To fully function on a USB stick Navigatrix uses two persistent files;
casper-rw and
home-rw. They are overlays to the read-only files system. Like a transparent overlay on a book or map they change the nature of the information presented underneath. And as their names suggest, they are files that can be 'read' and 'written'.
home-rw overlays the
/home directory branch and
casper-rw overlays the root...that is by default everything else. Remember,
/home is where your heart is and
/ is...well, everything else. You see them mounted in their respective places. One is 10% full and the other is 5%.
With these two files you can modify the system and come back the next time and those changes will be there. You can delete them and the underlying information is still there. But
they are a static size. This is the primary reason people have "memory issues". They fill up one or the other persistent file and the world falls apart.
The default setting is casper-rw is 100MBs and home-rw is 500MBs. When we do the math that 1.3 + .1 + .5 = 1.9GBs on a bare bones system and coincidentally the size of the file system of
/dev/sda1 mounted at
/cdrom.
As you see here.....
Attachment:
8GB-whats-really-there.png [ 101.93 KiB | Viewed 32532 times ]
Once again I don't really get computer arithmetic...but there you go. The
LIBRARY directory contains some information but
CHARTS;
DESKTOP through to
PICTURES and then including
VIDEOS are empty directories symbolically linked to the file structure...I'll get to that in a moment.
If you dive into the
casper directory at the top of the
File Manager listing you will see a large file called
filesystem.squashfs that contains the entire system in compressed form and a few other files that make the thing go as a LiveCD. The very large file is the contents of the read-only filesystem.
Stepping back to
/cdrom is the
syslinux directory which has some preliminary road map instructions..and miscellaneous other 'stuff'.....and there you have it...about 5GB worth of information and software in a tidy 1.9GB package that fits on a 4GB USB stick.
Less than 2GBs on a 4GB stick! The optimist says "Cool, it's half empty." The pessimist says "What happens with the other 2GBs?"
This is where the empty direcories come into play. On a 4GB stick a person has about 2GBs for personal data that can go into those directories. They are separate from the rest of the system but magically (symbolically) linked to to the user's home (e.g,
/home/nx/Desktop) However, it doesn't take long, after you add your charts, a few picture, etc. you are soon riding on the rims.
There are two (2) reasons for the symbolic links and size of the persistent files being done this way.
1) If you mangle the system you can rebuild without loosing your personal data.
2) All 4GB sticks or SD cards are not 4GBs. Some are smaller...some a lot smaller. By symbolically linking data directories to a 500MB
/home people with more normal 4GB devices can use nearly all of their space without being limited by an installer that puts the same system on a device with less capacity....or the inverse...those with marginal capacity can install on their device and not have it fail because it's 10KB short.
And, 3) Added flexibility. Situations change. People have differing styles, purposes and applications in the use of a computer system. This seems to be a 'best fit' solution to most people.
As you might have noticed from the first screenshot in this post I have the good fortune that my 4GB stick is nearly 4GBs larger than other 4GB sticks and I have another 5.6GBs available. Depending how someone uses their machine; if Navigatrix is on a 4, 8 16...even 32GB stick would influence what would happen.
It's speculation until you encounter specific cases. For example, My Aunt Elaine might never run into a space problem with 100MB root and 500MB for home because she would use the system differently than another who fills up the space in a half hour....ten minutes.; which is possible. I've done it.
If you need more space in root, home or both you create a larger
casper-rw and/or
home-rw. It is a simple matter of telling the machine.
Open the
File Manager go to
/cdrom; dive into the
syslinux directory and locate
syslinux.cfg.
Open it with the
Text Editor and scroll down to about line 45 you will see:
Code:
label fix
menu label reset persistent data
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent boot=casper initrd=/casper/initrd.gz autopersistent root_size=100 home_size=500 max_loop=32 ip=frommedia quiet splash fix
Edit
root_size=100 and
home_size=500.
Change them to what values you think you need. It depends how you use the machine. It doesn't necessarily have to change...but it can.
A rule of thumb...and only as a guideline
4- root_size=100 home_size=500
8- root_size=250 home_size=1000
16-root_size=500 home_size=1500
32-root_size=1000 home_size=2500
I repeat, if the person uses the USB differently than it can be changed....if needed. You decide.
Save your edited
syslinux.cfg file. Use the
File Manager to delete the two files
casper-rw and
home-rw.
Reboot
When the
BLUE splash screen appears with eagle ray in the lower right corner appears hit the
<esc> key. You've gotta be fast. You have 1 second...but still plenty of time to hit the
<esc> key because you know it's coming.
For good measure I hit it repeatedly until the screen turns black...and stays black.
In the upper left hand corner the word
boot:will appear.
Type in:
fixand hit the
<Enter> key.
....go get a beer. The machine will rebuild the persistent files
casper-rw and
home-rw to your specifications.
When it is done....
Attachment:
8GB-larger-persistent.png [ 31.86 KiB | Viewed 32531 times ]
The root (
/) and
/home have more space and the rest of the numbers fall in line with the computer's way of adding up the numbers. This allows more room for additional modifications, programs...whatever I thought I might need.
If I then load up the stick with a couple of gigabytes worth of charts, music, photos....
Attachment:
8GB-loaded.png [ 30.47 KiB | Viewed 32531 times ]
You see they take space but do not choke up either my root, or home. I can add another 2GBs of junk and root and home will still have that new car smell.