WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Minimizing TCE's disk space  (Read 5004 times)

Offline leekimpark

  • Newbie
  • *
  • Posts: 14
Minimizing TCE's disk space
« on: June 27, 2012, 10:55:10 PM »
So I'm fairly new to linux and tce, but I've been trying to install TCE and have it use the minimum amount of disk space. I've been testing it out on Virtualbox and I can't seem to bring down the disk usage to around 10mb. Right after installing using the Core-plus.iso to install with frugal install and options like text only, this is what my disk space usage looks like, using df -h

Filesystem   Size   Used   Available   Use%   Mounted on
rootfs      222.8M    9.4M   213.4M   4%   /
tmpfs      123.8M         0   123.8M   0%   /dev/shm
/dev/sda1       7.9G   25.6M       7.8G   0%   /mnt/sda1
/dev/sda1       7.9G   25.6M       7.8G   0%   /home
/dev/sda1       7.9G   25.6M       7.8G   0%   /opt

From what I've been reading via the website and google, TCE should be able to achieve much lower disk usage. I've also seen this thing about microcore, and I've tried to install it, but I can't seem to find the microcore.gz file during installation. All it gives me is core.gz. But regardless, what are other ways I can reduce disk space to about 10mb, or is this not possible? Sorry if this is a really newbie question.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Minimizing TCE's disk space
« Reply #1 on: June 28, 2012, 12:18:25 AM »
Hi leekimpark
The core.gz and vmlinuz files in your /mnt/sda1/boot/ directory account for about 12MB of that. To find out what
is taking the remaining space, check under the /mnt/sda1/tce/ directory.
Microcore is just called Core now and consists of core.gz and vmlinuz.

Offline leekimpark

  • Newbie
  • *
  • Posts: 14
Re: Minimizing TCE's disk space
« Reply #2 on: June 28, 2012, 01:33:58 AM »
Hi Rich,
There doesn't appear to be much in /mnt/sda1/tce, aside from the boot directory. Here's what ls -alh gives me:
total 20
drwxrwxr-x   5 tc   staff   4.0K Jun 28 05:20 ./
drwxrwxr-x   6 root   root   4.0K Jun 28 05:20 ../
drwxrwxr-x   3 tc   staff   4.0K Jun 28 05:20 boot/
-rw-rw-r--   1 tc   staff       0 Jun 28 05:20 mydata.tgz
-rw-rw-r--   1 tc   staff       0 Jun 28 05:20 onboot.lst
drwxrwxr-x   2 tc   staff   4.0K Jun 28 05:20 ondemand/
drwxrwxr-x   2 tc   staff   4.0K Jun 28 05:20 optional/

when I cd into and ls in the optional and ondemand directories there doesn't appear to be anything. Where else could the remaining space be used?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Minimizing TCE's disk space
« Reply #3 on: June 28, 2012, 02:12:35 AM »
Hi leekimpark
Try   du /mnt/sda1 | less
Use PageUp/PageDown to navigate, q to quit.

Offline leekimpark

  • Newbie
  • *
  • Posts: 14
Re: Minimizing TCE's disk space
« Reply #4 on: June 28, 2012, 02:37:20 AM »
Hi Rich,
du /mnt/sda1 gives me:

4.0K   /mnt/sda1/home/tc/.local/bin
8.0K   /mnt/sda1/home/tc/.local
24.0K   /mnt/sda1/home/tc
28.0K   /mnt/sda1/home
40.0K   /mnt/sda1/tce/boot/extlinux
7.6M   /mnt/sda1/tce/boot
4.0K   /mnt/sda1/tce/optional
4.0K   /mnt/sda1/tce/ondemand
7.6M   /mnt/sda1/tce
28.0K   /mnt/sda1/opt
16.0K   /mnt/sda1/lost+found
7.7M   /mnt/sda1

Still doesn't look like much, perhaps I messed up during the installation?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Minimizing TCE's disk space
« Reply #5 on: June 28, 2012, 02:50:21 AM »
'df' shows filesystem space used.
'du -s' shows summarized disk usage of files.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Minimizing TCE's disk space
« Reply #6 on: June 28, 2012, 02:52:32 AM »
Hi leekimpark
Looks like you have Core installed, 7.7MB.

Offline leekimpark

  • Newbie
  • *
  • Posts: 14
Re: Minimizing TCE's disk space
« Reply #7 on: June 28, 2012, 03:27:45 AM »
Hi Rich,
If that's the case, then do you have any idea what's using up all this disk space, or am I just misinterpreting the results of running df -h?

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Minimizing TCE's disk space
« Reply #8 on: June 28, 2012, 05:11:48 AM »
As implied in Reply #5, df includes space taken up by a filesystem, as opposed to du which shows only space taken up by the files residing on the filesystem per se.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Minimizing TCE's disk space
« Reply #9 on: June 28, 2012, 05:19:05 AM »
In reference to the thread subject:
Persistent /home & /opt mode is bound to result in the exact opposite.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Minimizing TCE's disk space
« Reply #10 on: June 28, 2012, 10:53:47 AM »
Hi leekimpark
I don't know why you have such a big discrepancy between the two commands. I just ran du and df on my
system and came up with 1.7GB and 1.9GB respectively for my drive. Maybe you did a re-install in between,
or deleted something, or maybe it's due to Virtualbox.

Offline leekimpark

  • Newbie
  • *
  • Posts: 14
Re: Minimizing TCE's disk space
« Reply #11 on: June 28, 2012, 09:46:32 PM »
Sorry about that, I'm new to all of this. I'm sure that i didn't reinstall or delete anything since I checked my disk space usage right after creating a new virtual machine and installing TCE. I'll try installing on a real machine later to see if this is because of Virtualbox. However, is TCE actually supposed to use just around 10mb right after installation?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11618
Re: Minimizing TCE's disk space
« Reply #12 on: June 28, 2012, 10:20:14 PM »
Hi leekimpark
Core will be about 8MB and Tinycore will be about 12MB installed. These are bare bones installations, and
you will need to install any applications you are interested in.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: Minimizing TCE's disk space
« Reply #13 on: June 29, 2012, 12:15:07 AM »
Hi leekimpark
I don't know why you have such a big discrepancy between the two commands. I just ran du and df on my
system and came up with 1.7GB and 1.9GB respectively for my drive. Maybe you did a re-install in between,
or deleted something, or maybe it's due to Virtualbox.

I wouldn't consider 17.9M on a partition of 7.9G a big discrepancy at all, not outside the expectable.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline coreplayer2

  • Hero Member
  • *****
  • Posts: 3020
Re: Minimizing TCE's disk space
« Reply #14 on: June 29, 2012, 01:56:28 AM »
The default VirtualBox drive capacity is (approximately) 8 GB  Unless you specify another size. 

Additionally, this is a frugal install which accounts for all the extra space used  IMO

Discard the frugal install you'll be left with only the boot loader, the core.gz, vmlinuz, file system overhead.  of course there will not be any apps  but you can always add tce to the bootloader config and install apps to that directory but permanent apps add lots of bulk to the system.

I have several VM's running less than 15MB with a few specialized applications and scripts,  I think the smallest I've deployed is a 12MB  ISO  (I'd have to recheck but iirc it's less than 12MB  using core with apps).
« Last Edit: June 29, 2012, 02:11:43 AM by coreplayer2 »