2

I know Ubuntu server is already slimmed down, but... We're deploying a custom configured Ubuntu Server as an OVA. The size of the .vmdk file inside the OVA is 700+ MB (basically thats the bare bones default Ubuntu Server 12.04 install). Our VM does a VERY basic task and doesn't need a lot of other things present in the operating system. Can someone help us slim down the Ubuntu server to below bare minimum. I'm talking about removing things like man pages, and other parts of the OS that are not critical to our environment.

* UPDATE *

Even going as far as removing things like extra shell environments (not sure if you can safely do that). We want to remove everything that wont break the OS from booting and running Java. Maybe we dont need commands like fdisk etc. Anywhere we can save space will reduce the size of the OVA which will speed up the download for customers.

Thanks

2 Answers 2

2

Perhaps building it from the minimal build upwards would be a better option.

https://help.ubuntu.com/community/Installation/MinimalCD

This way you only have the dependencies that are necessary and don't have to keep track of the dependencies that some packages may rely on when removing other packages.

Something similar would be to start with the core and build it up as needed.

https://wiki.ubuntu.com/Core/InstallationExample

Just a thought.

2

If you're building an appliance (that it's likely nobody will actually have to use - from a command line perspective), you could just start with a Ubuntu Minimal install (about 80M last time I tried, if I remember correctly) and just install the packages you need.

This will omit all sorts of packages (including things like nano and bash completion) so it can be quite a disorientating to newer users.

I'd also suggest liberal use of --no-install-recommends with your apt-get commands. And run an apt-get clean before you take your image.


There are two ways of arriving at a "minimal" installation:

  • You can use the Minimal CD. This is basically a partitioner and a download mechanism. It needs to download everything. If you're installing quite a bit, this can be slower than using an ISO... But it should mean you start off with fresh packages.
  • You can use the standard Ubuntu Server CD to do a minimal install. This might be more useful in a low-bandwidth environment but it'll need updating straight after install.

I wouldn't recommend knocking into coreutils though. There'll be a ton of commands in there that you think you'll never need but they account for kilobytes. All sorts of stuff relies on these commands which is why the kernel packages depend on it.

2
  • Is that achomplished using the mini.iso found in the link jmunsch recommended above?
    – Atomiklan
    Jan 14, 2014 at 22:37
  • @Atomiklan Yeah, or you can use the server CD. I've added a little section on how.
    – Oli
    Jan 15, 2014 at 13:47

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .