View previous topic :: View next topic |
Author |
Message |
Vieri l33t
Joined: 18 Dec 2005 Posts: 901
|
Posted: Tue Apr 16, 2024 4:05 pm Post subject: minimal system |
|
|
Hi,
Is there by any chance a way to quickly get installed and running a minimal and functional Gentoo system of the size of Alpine Linux's Standard or Mini Root FS, or even TinyCore's Core?
I'm looking for a way to get <60MB base file system (amd64, no GUI).
Thanks |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9815 Location: almost Mile High in the USA
|
Posted: Tue Apr 16, 2024 4:20 pm Post subject: |
|
|
No, because of python and its deps to get portage (and its deps like gcc) working, even if the repo is not installed ...
Nonfunctional? Well my initramfs can do quite a bit on its own...though cannot emerge. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3836
|
Posted: Tue Apr 16, 2024 4:22 pm Post subject: |
|
|
Quickly... Code: | esiz sys-devel/gcc
* sys-devel/gcc-13.2.1_p20240210
Total files : 1796
Total size : 285.96 MiB | Such a solution would require to:
Identify what your functional portage stack is.
Identify which packages of it should remains as required by remaining packages.
Define and implement a feature that allows to pull out YOUR portage stack only packages + their disk stored data in a easy way to restore.
Yeah that would be nice to have something like that
Although I never tried it, the recent binary gentoo maybe the quick path with nearest size constrain. Still would expect some order of magnitude there.
It would be interesting what others have to say on the subject.
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Last edited by CaptainBlood on Tue Apr 16, 2024 4:54 pm; edited 3 times in total |
|
Back to top |
|
|
spica Guru
Joined: 04 Jun 2021 Posts: 329
|
Posted: Tue Apr 16, 2024 4:25 pm Post subject: |
|
|
Kernel modules exceed the requirement of 60Mb
Code: | $ du -hsx /lib/modules/6.6.21-gentoo/
92M /lib/modules/6.6.21-gentoo/ |
And gcc surpasses the value of 60Mb too
Code: | $ equery size gcc
* sys-devel/gcc-13.2.1_p20240210
Total files : 1762
Total size : 255.76 MiB |
|
|
Back to top |
|
|
CaptainBlood Advocate
Joined: 24 Jan 2010 Posts: 3836
|
Posted: Tue Apr 16, 2024 4:34 pm Post subject: |
|
|
spica wrote: | Kernel modules exceed the requirement of 60Mb
Code: | $ du -hsx /lib/modules/6.6.21-gentoo/
92M /lib/modules/6.6.21-gentoo/ |
|
USE="-* ...' everywhere policy leads to slightly debloated, signed and xz recompressed with couple of out of the tree modules here: Code: | du -hsx /lib/modules/6.8.5-gentoo-r1-std/
4,8M /lib/modules/6.8.5-gentoo-r1-std/ |
Thks 4 ur attention, interest & support. _________________ USE="-* ..." in /etc/portage/make.conf here, i.e. a countermeasure to portage implicit braces, belt & diaper paradigm
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. " |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54577 Location: 56N 3W
|
Posted: Tue Apr 16, 2024 4:44 pm Post subject: |
|
|
Vieri,
You can install and even maintain a system in an alternate root directory, the same way the initramfs binaries are built.
They are all in the right place, so such an 'install' can be copied.
For 60MB, glibc will need to be replaced by musl and you will need a lean mean hand crafted kernel.
The install will not be able to build anything or maintain itself.
How close to 60MB you get is up to you and the applications you need. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
spica Guru
Joined: 04 Jun 2021 Posts: 329
|
Posted: Tue Apr 16, 2024 4:58 pm Post subject: |
|
|
CaptainBlood wrote: | USE="-* ...' everywhere policy leads to slightly debloated, signed and xz recompressed with couple of out of the tree modules here: Code: | du -hsx /lib/modules/6.8.5-gentoo-r1-std/
4,8M /lib/modules/6.8.5-gentoo-r1-std/ |
|
Maybe it was not the best example, some module can be compiled into kernel, some not built at all. The distribution kernel also exceeds the requirement:
Code: | # curl -Iv https://mirror.netcologne.de/gentoo/distfiles/fa/gentoo-kernel-6.6.21-1.x86.gpkg.tar 2>&1 | grep -i content-length
< content-length: 68331520
content-length: 68331520
# curl -Iv https://mirror.netcologne.de/gentoo/distfiles/75/gentoo-kernel-6.6.21-1.amd64.gpkg.tar 2>&1 | grep -i content-length
< content-length: 146585600
content-length: 146585600
|
In some cases the kernel package is not needed, for example, if the purpose is a docker image. The requirement of 60Mb makes sense to prevent copying the data here and there again and again
Also it is worth to note that users who run custom initramfs technically run gentoo inside it. Just without portage, python, gcc, etc: Code: | # ls -al /boot/initramfs.img /boot/vmlinuz
-rwxr-xr-x 1 root root 5147655 Nov 30 17:18 /boot/initramfs.img
-rwxr-xr-x 1 root root 13386752 Mar 26 02:10 /boot/vmlinuz
|
5Mb(ramfs)+13Mb(kernel) is enough to run busybox and a few more applications.
I am curious to know what is the purpose of such 60Mb "distro"
Upd: Alpine's kernel package Installed size is 134.91 MB |
|
Back to top |
|
|
eccerr0r Watchman
Joined: 01 Jul 2004 Posts: 9815 Location: almost Mile High in the USA
|
Posted: Tue Apr 16, 2024 6:09 pm Post subject: |
|
|
My initramfs is eccerr0ros, not Gentoo.
It may have been built with Gentoo but it sure is not supported by Gentoo.
In any case yes the Gentoo tool chain far exceeds the 60MB suggestion. I suppose the stage3 is already "minimum" Gentoo, you can use that as your system without anything, and that at least will let you bootstrap to anything you want. If you don't want emerge and other tools, then I don't call that functional "Gentoo" anymore, and that can be made smaller. _________________ Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching? |
|
Back to top |
|
|
RIA77 Guru
Joined: 24 Feb 2016 Posts: 391
|
Posted: Sat May 18, 2024 8:42 am Post subject: |
|
|
CaptainBlood wrote: | spica wrote: | Kernel modules exceed the requirement of 60Mb
Code: | $ du -hsx /lib/modules/6.6.21-gentoo/
92M /lib/modules/6.6.21-gentoo/ |
|
USE="-* ...' everywhere policy leads to slightly debloated, signed and xz recompressed with couple of out of the tree modules here: Code: | du -hsx /lib/modules/6.8.5-gentoo-r1-std/
4,8M /lib/modules/6.8.5-gentoo-r1-std/ |
Thks 4 ur attention, interest & support. |
Tried path with -*
Problem is I can't make firefox to work without shuttering. No smooth scrolling.
It's nice experiment, but unfortunately no real benefits.
Few packages less, here and there, but not jus as Alpine. |
|
Back to top |
|
|
|