Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
minimal system
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Vieri
l33t
l33t


Joined: 18 Dec 2005
Posts: 885

PostPosted: Tue Apr 16, 2024 4:05 pm    Post subject: minimal system Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9680
Location: almost Mile High in the USA

PostPosted: Tue Apr 16, 2024 4:20 pm    Post subject: Reply with quote

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
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Apr 16, 2024 4:22 pm    Post subject: Reply with quote

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.
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
View user's profile Send private message
spica
Apprentice
Apprentice


Joined: 04 Jun 2021
Posts: 288

PostPosted: Tue Apr 16, 2024 4:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
CaptainBlood
Advocate
Advocate


Joined: 24 Jan 2010
Posts: 3628

PostPosted: Tue Apr 16, 2024 4:34 pm    Post subject: Reply with quote

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.
LT: "I've been doing a passable imitation of the Fontana di Trevi, except my medium is mucus. Sooo much mucus. "
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54272
Location: 56N 3W

PostPosted: Tue Apr 16, 2024 4:44 pm    Post subject: Reply with quote

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
View user's profile Send private message
spica
Apprentice
Apprentice


Joined: 04 Jun 2021
Posts: 288

PostPosted: Tue Apr 16, 2024 4:58 pm    Post subject: Reply with quote

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
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9680
Location: almost Mile High in the USA

PostPosted: Tue Apr 16, 2024 6:09 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum