Reduce Ubuntu Server
· 3 min read
0. Sizes for /boot
and /boot/efi
- /boot Partition: You could reduce the
/boot
partition size to around 200 MB. This should still be sufficient to hold the kernel and initramfs image. Be cautious, as going too small could lead to issues during unexpected updates or changes that might require space, such as security patches for the kernel. - /boot/efi Partition: The EFI System Partition (
/boot/efi
) typically doesn't require much space if you're only using a few boot loaders. A size of 100 MB is often recommended as a minimum by many Linux distributions and should be more than adequate for most single-boot configurations.
1. Install pre-installed ubuntu server
- Download pre-installed ubuntu server: Ubuntu Server 24.04 (Noble Numbat) Daily Build
- use mkusb - Community Help Wiki to flash:
dus xxx.tar.xz
2. Remove Unnecessary Packages (compile envionrment)
After installation, you can remove packages that are not necessary for your server's purpose:
- List installed packages:
dpkg-query -W --showformat='${Installed-Size}\t${Package}\n' | awk '{print $1/1024 " MB\t" $2}' | sort -n -r