Removing unnecessary hardware support

Anything that pertains to Portage

Moderator: Moderators

Post Reply
dukdukgoos
Young Hen
Posts: 35
Joined: Wed Jan 24, 2007 9:39

Removing unnecessary hardware support

Post by dukdukgoos » Tue Jul 17, 2007 8:20

I've been doing world updates using wolfden's guide for a while now and they work great, but in doing them I've noticed I'm compiling a lot of stuff my system has no need of. Here are some examples:
  • wireless support (I have wired ethernet on my sabayon box)
    modem support (I have cable, don't need dialup, DSL, ISDN, etc.)
    laptop support (touchpad, etc.)
    additional languages (I need English and Japanese only)
    other X11 stuff for hardware I don't have
Can someone make or point me to a HOW TO for customizing Sabayon to specific hardware? Maybe using the new installer's ability to create a minimal system will help?

Thanks!

freeallbadgers
Growing Hen
Posts: 181
Joined: Sun Mar 11, 2007 8:12
Location: Glasgow, UK.
Contact:

Post by freeallbadgers » Tue Jul 17, 2007 8:44

This can be done by recompiling/upgrading your kernel, you can remove all the unnecessary hardware support in the menuconfig menu.

Guide here .. http://www.sabayonlinux.org/wiki/index. ... _genkernel

dukdukgoos
Young Hen
Posts: 35
Joined: Wed Jan 24, 2007 9:39

Post by dukdukgoos » Tue Jul 17, 2007 8:47

Would recompiling the kernel then trigger portage to uninstall previously installed unnecessary packages? My assumption is that it doesn't. I want to remove the support but also the packages so they continue to be upgraded by a world update.

freeallbadgers
Growing Hen
Posts: 181
Joined: Sun Mar 11, 2007 8:12
Location: Glasgow, UK.
Contact:

Post by freeallbadgers » Tue Jul 17, 2007 8:51

No, it wouldnt remove them, you could remove the packages by using emerge -C packagename, keep in mind that it doesnt check for dependencies on removal.

wolfden
Sharecropper
Posts: 9051
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA
Contact:

Post by wolfden » Tue Jul 17, 2007 8:59

Best place to look is at your world file

Code: Select all

 /var/lib/portage/world
and go thru that and decide what you want to remove and than you can simple emerge -C it, but some packages may get pulled back in due to dependency, but at least you are cutting down a majority.

I am in the process of doing a world update at the moment and after going thru the world file I removed:
emerge -C man-pages-de man-pages-es man-pages-fr man-pages-it man-pages-ja man-pages-nl man-pages-pl man-pages-ro man-pages-ru man-pages-zh_CN skim laptop-mode-tools aspell-fr aspell-it aspell-pl aspell-uk myspell-de myspell-en myspell-eo myspell-es myspell-fr myspell-ga myspell-gl myspell-it myspell-nl myspell-ru aspell-de lacie-lightscribe-labeler lightscribe lightscribe-simplelabeler radeontool kuroo nexuiz sauerbraten warsow cowsay secondlife-bin dangerdeep flightgear torcs savage-bin wesnoth globespan-adsl mingetty ppp pppconfig pptpclient rp-l2tp rp-pppoe slmodem speedtouch wvdial kmyfirewall amsn bcm43xx-firmware bcm43xx-fwcutter bluez-bluefw bluez-hcidump bluez-libs bluez-utils chillispot ipw2200-firmware ipw3945-ucode iwlwifi-ucode iwlwifi4965-ucode kdebluetooth kismet libbtctl libertas-firmware prism54-firmware prism54-usb-firmware rt61-firmware rt73-firmware zd1211 zd1211-firmware 915resolution lilo ati-drivers linuxwacom xf86-video-apm xf86-video-ark xf86-video-ati xf86-video-chips xf86-video-cirrus xf86-video-cyrix xf86-video-dummy xf86-video-fbdev xf86-video-glint xf86-video-i128 xf86-video-i740 xf86-video-i810 xf86-video-imstt xf86-video-mga xf86-video-neomagic xf86-video-nsc xf86-video-nv xf86-video-openchrome xf86-video-rendition xf86-video-s3 xf86-video-s3virge xf86-video-savage xf86-video-siliconmotion xf86-video-sis xf86-video-sisusb xf86-video-tdfx xf86-video-tga xf86-video-trident xf86-video-tseng xf86-video-v4l xf86-video-voodoo metisse clamav klamav gnokii gsmlib

also

Code: Select all

/etc/make.conf 
is vital - remove hardware from there that you do not have.

dukdukgoos
Young Hen
Posts: 35
Joined: Wed Jan 24, 2007 9:39

Post by dukdukgoos » Tue Jul 17, 2007 9:02

Right, here's where it gets tricky. I've already manually removed some of the obvious stuff like language files I don't need, ksynaptic, and a few others, but is it possible to get a comprehensive list of unneeded packages so I can uninstall them all? For example, how can I get all the dialup modem packages off the system? Will it come down to doing something like:

Code: Select all

emerge -S dialup
and pouring through the returns looking for things to get rid of? Seems like there should be a better way... maybe something with USE flags?

wolfden
Sharecropper
Posts: 9051
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA
Contact:

Post by wolfden » Tue Jul 17, 2007 9:10

/var/lib/portage/world <--lists everything installed open it with a text editor and search

dukdukgoos
Young Hen
Posts: 35
Joined: Wed Jan 24, 2007 9:39

Post by dukdukgoos » Tue Jul 17, 2007 9:57

I've already cleaned my world file of dependencies with udept, so searching through world won't reveal much.

Wolfden, your previous post where you listed all the packages you uninstalled is very helpful. Those types of tutorials on how advanced users use Sabayon are extremely useful to people like me who are new but want to become power users eventually.

My next question is how do you know you don't need those files? Is it just reading descriptions of the packages and learning more about what each one does? Is this knowledge you've just accumulated over the years of using linux/gentoo? It may be that there's no real shortcut for what I'm asking, that I need to just learn about what each package does to know if I need it or not.

I guess what I was hoping for was something like a script or process you could use to remove unneeded files, similar to what --depclean does with dependencies. So i would:
  • remove unneeded hardware/USE from make.conf
    recompile kernel
    do something that would flag any programs/libs that depend on support that was no longer there.
Then I could go through that list and emerge -C any/all of them.

wolfden
Sharecropper
Posts: 9051
Joined: Sat Jan 14, 2006 0:55
Location: Midwest USA
Contact:

Post by wolfden » Tue Jul 17, 2007 11:15

dep clean isn't going to remove unnecessary packages
depclean to remove the conditional dependencies that were emerged on your "old" system but that have been obsoleted by the new USE flags.
- I don't know how else to say it, the world file contains everything that is presently installed. A vital key to knowing what u have.

How do I know what to remove? I know my hardware and what I want out of my computer. It's a learning process and no, there is no script that you could possibly run cause everyone has different hardware and usages. You would have to custom make it yourself.

Gentoo based stuff makes you learn, which is great. The gentoo documentation is huge and yes you will have to go thru it. It's a never ending learning experience as things change. What works for me, isn't going to work for you cause I build to me and you should build to yourself. Just takes time.

dukdukgoos
Young Hen
Posts: 35
Joined: Wed Jan 24, 2007 9:39

Post by dukdukgoos » Wed Jul 18, 2007 0:50

the world file contains everything that is presently installed.
I've used udept to purge dependencies from my world file, so it's not all the packages I have installed, just the ones that aren't dependencies of something else, plus anything I've explicitly installed with "emerge packagename". I think to get a list of all installed packages you use this command from gentoolkit:

Code: Select all

equery list
As far as the rest: Yeah, I guess it'll just take time to learn how the packages relate to my particular hardware. I really need to install vanilla Gentoo on my true hardware at some point (I've only ever tried installing it in a VM). I think building it up from scratch will make a lot of these questions clearer for me.

Anyway, I appreciate your efforts to give more information about running Sabayon in a more Gentoo-like way. Any tips or HOWTOs (like the great world update HOWTO) on how to bridge the gap between Sabayon and Gentoo are greatly appreciated!

Post Reply