2

I've been building my own Linux distribution, and I've stripped the binaries, etc. The system won't use GCC or development tools, as it will be a Chrome kiosk, so it would greatly help if I could strip down the system.

I was wondering, is there a way that I can delete all of the unused system files (like binaries, etc.) by watching what files/libraries are used during runtime? Maybe another method is preferred, but is there a way to accomplish something like this?

EsmaeelE
  • 123
Blender
  • 666

5 Answers5

3

These are some things I would do:

  • Build my own kernel with no loadable modules. (Build in all the required modules.) Eliminates /lib/modules ..
  • Review the init scripts and drop any programs that are not required.
  • Use ldd on the programs that are run to identify the libaries that are required.
  • Identify which commands can be replaced by busybox, and build a custom busybox to supply only those commands.
  • Identify the programs required for support and add them in.

Consider looking at what is included in a distribution like OpenWRT to see what is required for a relatively base installation. Remove what your don't need, and add what your do. OpenWRT now has builder package which makes it easier to investigate the distribution.

BillThor
  • 11,345
  • 2
  • 28
  • 25
2

debootstrap is the tool you want. http://www.debian-administration.org/articles/426 . It's much better to build up rather than strip down.

1

start from something like damn small Linux and build up from that. dsL image is at most 50 mb

bbaja42
  • 3,051
0

For building your own Linux filesystem try Buildroot. There are a lot of tutorials on the Internet.

redbeam_
  • 537
-1

Why bother? Is it security you're worried about, or space/memory? I would recommend: if in doubt, don't spend the time on it.