Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
small Gentoo
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
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Wed Mar 26, 2014 1:57 pm    Post subject: small Gentoo Reply with quote

Hi,

I'd like to build a small Gentoo live ISO with just X and 1 or 2 X applications. I'm hoping to get an ISO <100MB.

I noticed that the embedded stage3 files are quite old:
http://distfiles.gentoo.org/experimental/x86/embedded/
Are they unsupported?

Would I benefit size-wise using musl or uclibc instead o glibc? The stage3 file sizes aren't that different between these:
http://distfiles.gentoo.org/experimental/x86/musl/
http://distfiles.gentoo.org/experimental/x86/uclibc/
and this:
http://distfiles.gentoo.org/releases/x86/current-stage3/

In any case, I started installing from the uclibc stage3: http://distfiles.gentoo.org/experimental/x86/uclibc/stage3-i686-uclibc-hardened-20140305.tar.bz2
but when I chroot into it and emerge, say, mesa, I get compilation errors (that I didn't have when using a glibc stage3).
Should I report the ebuild problems to bugs.gentoo.org even if the stage3 files are "experimental"?

Does anyone know of a clear guide to get X (just the X server and xterm app) on Gentoo with as little software as possible (+- 80 MB)?

I just found Rat Gentoo and will give it a try but was wondering if there was an "official" guide (or an official stage from which to start).

Thanks,

Vieri


Last edited by Vieri on Tue Apr 15, 2014 6:47 am; edited 3 times in total
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7972
Location: ~Brussels - Belgique

PostPosted: Wed Mar 26, 2014 2:08 pm    Post subject: Reply with quote

Hello,

Take a look at SystemRescueCD (based on Gentoo): the iso is really small but contains A LOT of useful applications.
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Wed Mar 26, 2014 4:28 pm    Post subject: Reply with quote

Hi Xavier,

I actually did take a look at system rescue cd. I even customized it and created an iso. I tried to trim it down to just X and I couldn't get below 400MB, even after removing manually certain dirs (such as devtools, portage, docs, man pages, etc).

It's amazing how slitaz (with X) can be under 40MB, ten times less. I'm hoping to do the same with Gentoo.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Wed Mar 26, 2014 8:34 pm    Post subject: Reply with quote

Vieri ...

I think you probably want experimental/{arch}/uclibc these stages seem to be more recent (the last being 20140305) and they are about 114/116MB for vanilla/hardened (x86) respectively. Blueness has been doing quite a lot of work with hardened uclibc (see lilblue) and many of the issue with hardened/uclibc and xorg have been ironed out. You should be able to generate something closer to your desired size by stripping out unneeded docs, manpages, infopages (FEATURES="nodoc noman noinfo") and with the use of package.use, profile/package.provided and (perhaps) INSTALL_MASK. I guess it really comes down to what exactly you need (XFCE for instance will obviously take more space than x11-wm/ratpoison or x11-wm/i3). Lilblue is XFCE based with quite a few GUI tools and its exactly 1GB.

As for compilation, uclibc support is a work in progress, I had one or two issue some time (maybe 8 months) back but they tend to get fixed fairly quickly (again, thanks in part to blueness, aka, "Anthony Basile"). I haven't used xorg with any of these slim targets so I have no knowledge of what the current status is with mesa, but with the above stages you can report it on b.g.o and assign it to blueness (I'm pretty sure he'd want the feedback, but I can't seem to find the blog post where he actually said this ... check is blog ... maybe you'll find it.)

Re musl ... support is still behind that of uclibc, I have built a (non gentoo) system with it using Aboriginal Linux. I don't recommend it unless you have *a lot* of time to troubleshoot.

HTH & best ... khay
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Thu Mar 27, 2014 6:48 am    Post subject: Reply with quote

Thanks khay for the info.
The fact that the uclibc stage3 tarballs start out at 114MB and I still need to emerge X and dependencies means that I'm going to have a very hard time keeping the whole system beneath 100MB even if I remove man and info pages.
Anyway, I'll give it a shot.

Thanks
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Thu Mar 27, 2014 7:02 am    Post subject: Reply with quote

The portage system of Gentoo is probably one big piece that puts a lower bound on how small the install can be. If you omit this, meaning using ROOT= to build a system ala stage1 and leave out portage/emerge/etc., you might be able to get away with a smaller system.

However things have been getting mighty bloaty and even without portage installed, it will still be fairly large. I remember doing this exercise to fit a small X11 capable boot CF card in less than 512MB uncompressed with Firefox installed with space to spare. It's possible but getting more and more difficult as time goes on, due to tons of dependencies that get pulled in... It's mostly trying to keep perl and python from installing somehow... and of course gnome...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Mar 27, 2014 7:46 am    Post subject: Reply with quote

Vieri wrote:
Thanks khay for the info.

Vieri ... you're welcome ...

Vieri wrote:
The fact that the uclibc stage3 tarballs start out at 114MB and I still need to emerge X and dependencies means that I'm going to have a very hard time keeping the whole system beneath 100MB even if I remove man and info pages. Anyway, I'll give it a shot.

well, a stage3 contains a lot of things not strictly required for use ... gcc, python, portage, etc ... so there is a whole lot that can be stripped out, it all depends on your use case. I imagine slitaz being 40mb is due to it having much of what's included in a stage3 stripped out, or replaced (busybox in place of core utilities, etc) thats why I mentioned profile/package.provided.

I didn't think to mention "ROOT=" ... thanks go to eccerr0r for that ... so there are many ways to approach this, infact, if you plan to rip out much of what makes the system gentoo (updatable, etc) then maybe this isn't the best build system and you might want to take a closer look at Aboriginal (linked above) which is really designed for bootstrapping a basic system.

best ... khay
Back to top
View user's profile Send private message
xaviermiller
Administrator
Administrator


Joined: 23 Jul 2004
Posts: 7972
Location: ~Brussels - Belgique

PostPosted: Thu Mar 27, 2014 7:54 am    Post subject: Reply with quote

Hi Vieri,

Is it 400 MB with squashed rootfs or uncompressed size?
_________________
Kind regards,
Xavier Miller
Back to top
View user's profile Send private message
defer-
Tux's lil' helper
Tux's lil' helper


Joined: 11 Jun 2007
Posts: 140
Location: Finland

PostPosted: Thu Mar 27, 2014 8:47 am    Post subject: Reply with quote

Here are some tips for freeing up disk space.

Remove doc, man and info pages
Add to /etc/portage/make.conf
FEATURES="nodoc noman noinfo"
$ rm -r /usr/share/man /usr/share/doc /usr/share/info

Optimize for size
Add to /etc/portage/make.conf
CFLAGS="-march=native -Os -pipe"
CXXFLAGS="${CFLAGS}"

Tweak use flags
Add to /etc/portage/make.conf
USE="minimal -fortran -deprecated -iptables -ipv6"

Strip base system
Remove all unneeded packages from /usr/portage/profiles/base/packages

Use ramdisk
Add to /etc/fstab
none /tmp tmpfs size=128M,noatime 0 0
none /var/tmp tmpfs size=2048M,noatime 0 0
none /var/log tmpfs size=8M,noatime,noexec,nosuid 0 0

Clean up ~/.cache/
$ rm -r ~/.cache/

Rebuild system
$ emerge --sync
$ emerge -eav @world
$ emerge -av --depclean

Use ncdu to find out what takes up disk space
$ emerge -av ncdu
$ ncdu /
If you want to find out which package file belongs. Use equery belongs filename

Remove old kernels and kernel modules
Clean old kernels from /usr/src. You can even remove all kernel sources after you have installed kernel.
Remove old kernel modules from /lib64/modules/

Remove distfiles
Remove all unneeded:
$ eclean -d distfiles
Or remove all:
$ rm -r /usr/portage/distfiles/*
_________________
https://github.com/defer-
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Thu Mar 27, 2014 9:43 am    Post subject: Reply with quote

Xavier, that's squashed.

Defer, thanks for the tips.

I'm currently taking a look at https://forums.gentoo.org/viewtopic-t-705771-start-0.html which uses glibc and I may not have as many compilation problems as with uclibc.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Thu Mar 27, 2014 10:13 am    Post subject: Reply with quote

defer- wrote:
Here are some tips for freeing up disk space.

defer- ... these tips will reduce the system size somewhat but for a minimal target there is still a lot left that isn't required for the system to function. Take the following for example, this is an aboriginal linux bootstrap ...

Code:
# du -ha --max-depth 1 --exclude source
0 ./lib
71M ./usr
4.0K ./sys
0 ./etc
0 ./bin
4.0K ./tmp
0 ./sbin
4.0K ./arch
4.0K ./home
4.0K ./dev
4.0K ./root
4.0K ./mnt
71M .

... and the minimal bootable/functional system that its used to create ...
Code:
# du -ha --max-depth 1
16K ./functions.sh
20K ./etc
2.5M ./bin
4.0K ./dev
4.0K ./init
2.5M .

... that 2.5M system has busybox, lvm2, cryptsetup, dropbear (and a few other scripts/utilities) and will boot to a command prompt with nothing else required but a kernel (its actually just an initramfs, but none the less a functioning system).

So, as eccerr0r pointed out if you want to make a minimal system then you need to work with something other than a standard stage3 (ie, "ROOT=") because a stage3 contains all the tools needed to bootstrap and these tools are not necessary for the target ... a functioning system.

Also ...
Code:
# awk '!/(#|^$)/{print}' ~portdir/profiles/embedded/packages
*>=sys-apps/busybox-0.60.5-r1

best ... khay
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Fri Mar 28, 2014 7:22 am    Post subject: Reply with quote

I noticed that what's really killing my intent of keeping the system small is trying to install CUPS. I really need to install a "printer server" so users can print directly with a URI (ipp://, http://host:631/printers/name).
Any ideas of how I can reduce the size of the CUPS installation (and dependencies)?
Or are there alternatives to cups, like dropbear is to openssh?

Code:

These are the packages that would be merged, in order:

Calculating dependencies... done!
[ebuild  N     ] app-text/poppler-data-0.4.6 to /target/ 4,085 kB
[ebuild  N     ] app-arch/cpio-2.11-r1  USE="nls" 995 kB
[ebuild  N     ] app-text/poppler-data-0.4.6  0 kB
[ebuild  N     ] media-fonts/dejavu-2.33  USE="-X -fontforge" 4,767 kB
[ebuild  N     ] media-fonts/dejavu-2.33 to /target/ USE="-X -fontforge" 0 kB
[ebuild  N     ] sys-libs/readline-6.2_p1 to /target/ 2,226 kB
[ebuild  N     ] media-libs/lcms-2.5:2  USE="zlib -doc -jpeg -static-libs {-test} -tiff" 6,837 kB
[ebuild  N     ] media-libs/lcms-2.5:2 to /target/ USE="zlib -doc -jpeg -static-libs {-test} -tiff" 0 kB
[ebuild  N     ] app-arch/rpm2targz-9.0.0.5g  6 kB
[ebuild  N     ] virtual/ttf-fonts-1  0 kB
[ebuild  N     ] virtual/ttf-fonts-1 to /target/ 0 kB
[ebuild  N     ] sys-devel/bc-1.06.95  USE="readline -libedit -static" 284 kB
[ebuild  N     ] media-fonts/urw-fonts-2.4.9 to /target/ USE="-X" 3,124 kB
[ebuild  N     ] media-fonts/urw-fonts-2.4.9  USE="-X" 0 kB
[ebuild  N     ] sys-devel/bc-1.06.95 to /target/ USE="-libedit -readline -static" 0 kB
[ebuild  N     ] media-libs/libpng-1.6.8:0/16  USE="-apng (-neon) -static-libs" 856 kB
[ebuild  N     ] media-libs/tiff-4.0.3-r6  USE="cxx zlib -jbig -jpeg -lzma -static-libs {-test}" 2,004 kB
[ebuild  N     ] media-libs/libpng-1.6.8:0/16 to /target/ USE="-apng (-neon) -static-libs" 0 kB
[ebuild  N     ] media-libs/tiff-4.0.3-r6 to /target/ USE="cxx zlib -jbig -jpeg -lzma -static-libs {-test}" 0 kB
[ebuild  N     ] dev-libs/expat-2.1.0-r3 to /target/ USE="unicode -examples -static-libs" 550 kB
[ebuild  N     ] app-text/qpdf-4.1.0:0/10  USE="-doc -examples -static-libs {-test}" 4,941 kB
[ebuild  N     ] dev-lang/nasm-2.10.07  USE="-doc" 665 kB
[ebuild  N     ] app-text/libpaper-1.1.24-r2  347 kB
[ebuild  N     ] app-text/libpaper-1.1.24-r2 to /target/ 0 kB
[ebuild  N     ] media-libs/jbig2dec-0.11-r1  USE="-png -static-libs {-test}" 363 kB
[ebuild  N     ] sys-libs/db-4.8.30:4.8 to /target/ USE="cxx -doc -examples -java -tcl {-test}" 22,351 kB
[ebuild  N     ] media-libs/jbig2dec-0.11-r1 to /target/ USE="-png -static-libs {-test}" 0 kB
[ebuild  N     ] media-libs/libjpeg-turbo-1.3.0-r3 to /target/ USE="-java -static-libs" 1,344 kB
[ebuild  N     ] media-libs/libjpeg-turbo-1.3.0-r3  USE="-java -static-libs" 0 kB
[ebuild  N     ] virtual/jpeg-0-r2  USE="-static-libs" 0 kB
[ebuild  N     ] virtual/jpeg-0-r2 to /target/ USE="-static-libs" 0 kB
[ebuild  N     ] sys-libs/gdbm-1.8.3-r4 to /target/ USE="berkdb" 224 kB
[ebuild  N     ] app-arch/libarchive-3.1.2-r1:0/13  USE="bzip2 e2fsprogs iconv lzma zlib -acl -expat -lzo -nettle -static-libs -xattr" 4,422 kB
[ebuild  N     ] dev-lang/perl-5.16.3:0/5.16 to /target/ USE="berkdb gdbm ithreads -debug -doc" 0 kB
[ebuild  N     ] app-admin/perl-cleaner-2.7 to /target/ 6 kB
[ebuild  N     ] net-misc/curl-7.35.0  USE="ssl threads -adns -idn -ipv6 -kerberos -ldap -metalink -rtmp -ssh -static-libs {-test}" CURL_SSL="openssl -axtls -cyassl -gnutls -nss -polarssl" 2,717 kB
[ebuild  N     ] dev-libs/libpcre-8.33:3 to /target/ USE="bzip2 cxx jit recursion-limit (unicode) zlib -libedit -pcre16 -pcre32 -readline -static-libs" 1,408 kB
[ebuild  N     ] dev-util/cmake-2.8.11.2  USE="ncurses -emacs -qt4 (-qt5) {-test} -vim-syntax" 5,750 kB
[ebuild  N     ] app-text/qpdf-4.1.0:0/10 to /target/ USE="-doc -examples -static-libs {-test}" 0 kB
[ebuild  N     ] media-libs/fontconfig-2.10.92:1.0  USE="-doc -static-libs" 1,490 kB
[ebuild  N     ] app-admin/eselect-fontconfig-1.1  2 kB
[ebuild  N     ] app-text/poppler-0.24.5:0/44  USE="cxx introspection jpeg lcms utils -cairo -cjk -curl -debug -doc -jpeg2k -png -qt4 -tiff" 1,478 kB
[ebuild  N     ] net-print/cups-1.7.1  USE="ssl threads usb -X -acl -dbus -debug -gnutls -java -kerberos -lprng-compat -pam -python (-selinux) -static-libs -xinetd -zeroconf" LINGUAS="ca es fr it ja ru" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" 8,534 kB
[ebuild  N     ] app-text/ghostscript-gpl-9.10-r2  USE="cups -X -bindist -dbus -djvu -gtk -idn -static-libs" LINGUAS="-de -ja -ko -zh_CN -zh_TW" 30,263 kB
[ebuild  N     ] net-print/cups-filters-1.0.43-r1  USE="foomatic -dbus -jpeg -perl -png -static-libs -tiff -zeroconf" 1,074 kB
[ebuild  N     ] media-libs/fontconfig-2.10.92:1.0 to /target/ USE="-doc -static-libs" 0 kB
[ebuild  N     ] app-admin/eselect-fontconfig-1.1 to /target/ 0 kB
[ebuild  N     ] app-text/poppler-0.24.5:0/44 to /target/ USE="cxx introspection jpeg lcms utils -cairo -cjk -curl -debug -doc -jpeg2k -png -qt4 -tiff" 0 kB
[ebuild  N     ] net-print/cups-1.7.1 to /target/ USE="ssl threads usb -X -acl -dbus -debug -gnutls -java -kerberos -lprng-compat -pam -python (-selinux) -static-libs -xinetd -zeroconf" LINGUAS="ca es fr it ja ru" PYTHON_SINGLE_TARGET="python2_7 -python2_6" PYTHON_TARGETS="python2_7 -python2_6" 0 kB
[ebuild  N     ] app-text/ghostscript-gpl-9.10-r2 to /target/ USE="cups -X -bindist -dbus -djvu -gtk -idn -static-libs" LINGUAS="-de -ja -ko -zh_CN -zh_TW" 0 kB
[ebuild  N     ] net-print/cups-filters-1.0.43-r1 to /target/ USE="foomatic -dbus -jpeg -perl -png -static-libs -tiff -zeroconf" 0 kB

Total: 51 packages (51 new), Size of downloads: 113,099 kB


[EDIT] USE="$USE -gdbm -berkdb" seems to reduce to 90MB. I guess I can't avoid emerging Perl.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Fri Mar 28, 2014 12:41 pm    Post subject: Reply with quote

If I wanted something really small I think I'd start with Puppy or DSL or TinyCore.
At least checking them would give you an idea of what packages are needed,
whether you used the actual distro or not.

Will
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Fri Mar 28, 2014 1:48 pm    Post subject: Reply with quote

Hmm. CUPS wants to install ghostscript, which is a "huge" package...
Do you need to translate file formats is the question, and if you do, ghostscript is needed.

Else you could install lprng or something that doesn't know how to convert file formats?
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Tue Apr 01, 2014 6:54 am    Post subject: Reply with quote

eccerr0r, I believe lprng doesn't support IPP/HTTP printing.

By the way, when installing packages with ROOT=TARGETDIR emerge PACKAGE, won't ebuild commands such as enewgroup fail? For instance, if I do ROOT=/target emerge cups then a new user and group are create in /etc/passwd and /etc/group but NOT in /target/etc/{passwd,group}.
That's because /usr/portage/eclass/user.eclass uses commands such as getent and groupadd which I believe know nothing about the ROOT/target dir.
I would have to chroot into my target dir and create the group myself but I was wondering if there's a fix or a better workaround for this.
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


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

PostPosted: Tue Apr 01, 2014 1:28 pm    Post subject: Reply with quote

You're probably stuck with cups then, and have to take ghostscript along.
Hmm... I wonder if sandbox should be used to detect this situation and they should be flagged as a bug. Honestly I gave up on the ROOT= method, I tend to make all my Gentoo installs self-updating and use another, binary Linux distribution if disk space is that much of a concern. Updates are very important for security, and a Gentoo without portage is kind of a lame install...
_________________
Intel Core i7 2700K@ 4.1GHz/HD3000 graphics/8GB DDR3/180GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1969

PostPosted: Tue Apr 01, 2014 3:52 pm    Post subject: Reply with quote

I _thought_ that CUPS without the doc flag avoided Ghostscript, but the world may have
changed while I wasn't looking. Generally in limited space you want "-doc" in make.conf
anyway.

Will
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Thu Apr 03, 2014 12:02 pm    Post subject: Reply with quote

I managed to create a 61MB iso file that I could load with PXE. [EDIT: rebuilt with -Os and -fomit-frame-pointer as well as removed some more unneeded subdirs and got 55MB iso of which 32MB as squashfs and the rest as kernel image and initramfs]
Besides a few console utilities it has X, rdesktop and a custom fltk app.
The interesting thing is that it's NOT based on busybox and uclibc.
I made it from a "release" stage3 (i486) with glibc.
I'm 14MB away from a slitaz-cooking iso but I'm quite happy with what I could do with Gentoo.

I also created another target with all of the above plus cups/ghostscript, extra ppds, ccid, pcsc-lite. That came up to around 115MB (the iso).

I'm wondering if size reduction would be significant if I were to use uclibc or if it's not worth struggling with the compilation issues.
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Tue Apr 08, 2014 7:21 am    Post subject: Reply with quote

Just for the record, the minimal system with X, rdesktop, etc., packaged as a 55MB glibc ISO (-Os -fomit-frame-pointer) as mentioned in my previous post was rebuilt with the experimental uclibc stage3 and the ISO file size was brought down to 47MB. Correct me if I'm wrong but I don't see any significant size advantages between uclibc and glibc when using certain optimization flags.
Back to top
View user's profile Send private message
khayyam
Watchman
Watchman


Joined: 07 Jun 2012
Posts: 6228
Location: Room 101

PostPosted: Tue Apr 08, 2014 9:23 am    Post subject: Reply with quote

Vieri wrote:
Correct me if I'm wrong but I don't see any significant size advantages between uclibc and glibc when using certain optimization flags.

Vieri ... it should be, see: So uClibc is smaller then glibc?. You perhaps want to use 'savedconfig' and select which features are enabled.

best ... khay
Back to top
View user's profile Send private message
beandog
Developer
Developer


Joined: 04 May 2003
Posts: 2066
Location: /usa/utah

PostPosted: Wed Apr 09, 2014 6:28 am    Post subject: Reply with quote

Vieri wrote:
I'm wondering if size reduction would be significant if I were to use uclibc or if it's not worth struggling with the compilation issues.


I'm kinda thinking that the smaller libcs are sometimes more suited for (very) low-memory environments instead. *random guess*

dunno though, squashfs is what I've just done in the past.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
beandog
Developer
Developer


Joined: 04 May 2003
Posts: 2066
Location: /usa/utah

PostPosted: Wed Apr 09, 2014 6:35 am    Post subject: Reply with quote

Okay, so it's late at night, and I'm stuck at work, so this may be a bit rambly ... but .. how are you guys installing TO your target OS anyway?

Here's how I've done it in the past ... I use buildpkg in FEATURES and then with the new install, I do emerge -KO package with a HUGE install mask that strips out all development files, unnecessary nls files, etc, etc, etc.

I was pretty hardcore about removing as much as possible. There's a lot of binaries you don't need ... busybox is nice, but sometimes you need the extra functionality.

I notice there's a tendency to worry about the number of dependencies, but these libraries come in really small files in the long run, for the most part.

Also, this may answer someone's earlier question, but look at emerge --config-root to pull in a separate portage/make.conf enviroment.
_________________
If it ain't broke, tweak it. dvds | blurays | blog | wiki
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Wed Apr 09, 2014 4:21 pm    Post subject: Reply with quote

The feedback on this thread as well as other blogs on the web helped a lot and I'm happy to see that I could build a very small target system with my favorite distro (Gentoo). I didn't manage to get it as small (and feature-packed) as eg., Slitaz but I'm getting close enough. I'm sure I can further tweak the target and slim it down some more.

Thanks all
Back to top
View user's profile Send private message
Vieri
Guru
Guru


Joined: 18 Dec 2005
Posts: 546

PostPosted: Fri Apr 11, 2014 2:34 pm    Post subject: Reply with quote

I'm having some minor issues understanding emerge/portage.

Within my "build environment" with 'buildpkg' FEATURE in make.conf I ran:

Code:
# emerge talloc


It emerged OK.

Then I ran:

Code:
# ROOT=/target emerge --nodeps --usepkg -avD talloc


but I got the following error:

Code:

 * IMPORTANT: 4 news items need reading for repository 'gentoo'.
 * Use eselect news to read news items.


These are the packages that would be merged, in order:

[binary  N     ] sys-libs/talloc-2.0.8 to /target/ USE="-python -compat" 0 kB

Total: 1 package (1 new, 1 binary), Size of downloads: 0 kB

Would you like to merge these packages? [Yes/No] Yes

>>> Emerging binary (1 of 1) sys-libs/talloc-2.0.8 for /target/
 * talloc-2.0.8.tbz2 MD5 SHA1 size ;-) ...                               [ ok ]
>>> Extracting info
 * ERROR: sys-libs/talloc-2.0.8::gentoo failed (setup phase):
 *   dev-lang/python:2.7 is not installed


I don't really *need* to install python:2.7 on my "target", do I?
So how can I "force" emerge to install the talloc binary package.
Of course I could simply untar the bin pkg to /target but I'd prefer another way.

[EDIT] I forgot to mention that I disabled the python use flag and the content of /usr/portage/packages/sys-libs/talloc-2.0.8.tbz2 does not contain any python talloc library. File content is:
Code:

drwxr-xr-x root/root         0 2014-04-11 16:56:43 ./
drwxr-xr-x root/root         0 2014-04-11 16:56:43 ./usr/
drwxr-xr-x root/root         0 2014-04-11 16:56:43 ./usr/include/
-rw-r--r-- root/root     61751 2012-11-30 09:49:18 ./usr/include/talloc.h
drwxr-xr-x root/root         0 2014-04-11 16:56:43 ./usr/lib/
lrwxrwxrwx root/root         0 2014-04-11 16:56:43 ./usr/lib/libtalloc.so -> libtalloc.so.2.0.8
drwxr-xr-x root/root         0 2014-04-11 16:56:43 ./usr/lib/pkgconfig/
-rw-r--r-- root/root       286 2014-04-11 16:56:37 ./usr/lib/pkgconfig/talloc.pc
lrwxrwxrwx root/root         0 2014-04-11 16:56:43 ./usr/lib/libtalloc.so.2 -> libtalloc.so.2.0.8
-rwxr-xr-x root/root     30184 2014-04-11 16:56:43 ./usr/lib/libtalloc.so.2.0.8
drwxr-xr-x root/root         0 2014-04-11 16:56:43 ./usr/share/
drwxr-xr-x root/root         0 2014-04-11 16:56:43 ./usr/share/man/
drwxr-xr-x root/root         0 2014-04-11 16:56:44 ./usr/share/man/man3/
-rw-r--r-- root/root      7019 2014-04-11 16:56:42 ./usr/share/man/man3/talloc.3.bz2
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