Make Arch base even lighter?
Hey Arch Community,
I haven't been on Arch Linux for long, but I am already very enthusiastic about this distro and its capabilities. I mainly use it in a VirtualBox as I often implement various projects with it. However, something I would wish for is an even lighter version of Arch. Currently, even with the basic package without Linux firmware, you end up with over 1.4GB of space. Does anyone have experience with building an even more minimal system with Arch, including basic network/Wi-Fi support and essential tools? I think English language packages would suffice. I would be very pleased to hear your answers and ideas.
About this post
- Posted
- Archived
- Score
- 12 · 66% up
- Kind
- Text
- ID
- 172fgpy
49 comments
Go with Gentoo?
hell nah
Have you considered Alpine? the distro is originally designed to run in containers with very little resourse overhead, i think the base install is around 100mb
While installing Arch without all the dependencies of the base meta package is not officially supported, you can pick what packaged you want. You can also recompile the different packaged with fewer features. That said, if you want a smaller distro, you should just switch to a distro that is designed for small install size.
Try Alpine Linux for light weight.
Exactly my thought. There's a reason why so many dockers run it, I bet.
Yeah it’s my main distro now because it’s so well made and has so many nice common sense features built into it. But it’s super light weight. You literally add everything you need as you go. And it has the ability to be stable or rolling release with a simple command. The init system is OpenRC instead of systemd which is really nice too. The only problem is it uses Musl c library instead of glibc so proprietary Nividia drivers are difficult to get working. But I use it on a laptop with Intel so it’s fine for me.
I still think Arch is better in a lot of ways but Alpine is kind of brilliant.
Is using Linux Containers an option? Lightweight and fast.
Arch is going to use a ton of disk space because packages are built with a lot of options enabled and they don't split them up into -lib, -bin, -dev, etc. like a lot of distros do.
Pretty much anything else can achieve a smaller base. Gentoo can be tiny but you have to build from spurce, or your usual Debian/Fedora/OpenSUSE typically can have smaller base images.
Void is also pretty similar to Arch but I think splits packages more. I haven't used it much.
That is actually a feature.
Arch can be very slow. Op should probably post a list over stuff they have installed, and then we can give him some advice.
I just took a look at Alpine and it's indeed incredibly small for an installed system with network functionality. I'll definitely be taking a closer look at it. But for now, I'll still stick with Arch.
You can use pacstrap(8) to fine tune what gets pulled in as "base".
It sounds slow going but once you know what you want, you can script it for later installs.
I highly recommend doing this for i.e Debian (debootstrap) / Red Hat (dnf) too.
Gentoo is unfortunately not an alternative for me because I like to keep things simple. I also don't lack storage space. ;-) I was just wondering if it would be possible.
Arch isn't simple or light.
https://lists.archlinux.org/pipermail/arch-general/2015-July/039443.html
Interesting read, it's funny how the perception of being minimalistic and light goes against the actual reality.
This link, finally ! Something clean to share about Arch purpose and choices. Thanks, I'll use it !
If disk space is your issue then maybe think about investing in a SSD upgrade.
Gentoo or Linux from Scratch?
Arch is already pretty lightweight, and while I am a fan, if you want something lighter than you really need to invest into Gentoo (at least).
Strip down an installation to what you minimally need, make in image out of it.
Alternatively learn a different way to install arch, the wiki is your friend. 1st you need a partition, then a way to install pacman, and a shell, but they come together. At this point you can chroot into the installation, add the least amount needed to make it boot, kernel, bootloader. You need network, is dhcpcd and wpa_supplicant enough for you?
Now you can log-in, edit, connect, install. If you are not going to be building software what do you need base-devel for?
Trim trim trim, as long as you can boot and connect in any machine/situation you encounter. That is as minimal as you need. If you can boot without linux-firmware any place you try, then you don't need linux-frimware.
Arch makes an image so it can boot and provide basic utilities for nearly all situations and setups. To some people that is TOO much.
https://copy.sh/v86/?profile=archlinux
Artix
Thanks for the tip. I'm not quite sure if I've tried Artix yet, but I'll give it another shot.
welcome. im rurprised that many rqacomended gento and nobody artix... ok it comes from arch so will not be a huge improvement, but should be lighter, smaller. Pick dinit as init. or openrc if u want to be safer...
Alpine (Arch based) image on Docker is literally 7MB and comes with the basics.
Alpine is definitely not Arch based
I think the default install is like 500mb, but yeah. If I wanted something more minimalistic than Arch I would use Alpine. And I do.
kernel(drivers) is fat it takes about 1 gb
In VirtualBox, at least, you don't need different drivers for GPU/CPU/NETWORK-drivers, etc.
Consider Debian (with
debootstrapinstall you get aminbasevariant with just not more than 200MB), this is because Debian does separate -dev, dbg, lib, etc from regular pkg. Alpine is also a good option (apk -X ${mirror}/latest-stable/main -U --allow-untrusted -p ${chroot_dir} --initdb add your_pkgs).+1 for alpine, i use it for all my docker containers
Actually because of the Arch features described to you, minimalistic visual desktop environments like dwm or xmonad are so popular. In my opinion, the minimalism of window managers results in increased CPU utilization, but this is a debatable issue.
Gentoo as a "browser loader" will be a minimal system and take up 1.2-1.5 gigabytes of disk space. Gentoo with all necessary programs, virtual machine, IDE, etc. will take about 20 gigabytes on disk. Further everything will depend on how often you will update your system(world) and install programs.
Void can claim to be a minimalist system, but the most minimalism is found in the environment of peculiar independent distributions like NixOS, Guix or LFS. After installation, most of these systems don't even have an Internet browser. But the problem is not minimalism per se, but what will be installed in the system.
Thank you for your response. I'll take a look at Void-linux. I wasn't familiar with it, but it sounds promising.
You could do custom builds with ABS but at that point, just use Gentoo. Portage is the right tool for that type of job.
ArcoLinux is based off Arch and has a minimal edition (XD edition I think).
switch to void-musl
Since you are in a VM and you only need English as a language, take a look at file exclusion lists in pacman.conf from Arch's docker image. It greatly reduces the space that is required while having a functional system.
Guys, wait until he discovers containers :)
Thank you for all your great ideas. Currently, I'm trying it with Alpine Linux and am already very impressed with the possibilities and the slim system. However, I've also been quite taken with Arch and will continue to use it as well.
If someone can give me a good example of using containers that could apply to me, then I will give it a try. My main system is Windows 11 and I need Linux for some projects, where I prefer a slim, tidy system. When I finish, I want to remove the system again. I think it's very easy with VDI drives.
Wow, I hadn't looked at the
basepackage contents in a while -- it is quite extensive. Thepacmanwiki explains how you can choose packages within a group to install while not installing the entire group Installing package groups That's probably your best bet.