Anyone got a gentoo cheatsheet?

So have I got this right .. to install stuff, I add the keyword to the USE line in make.conf, rebuild the kernel and it will install it when I next recompile? (for anything within portage?)

I know I can emerge <modname> but from what I am reading, it's best to use in kernel?

Also need to sort out images.. gif's and png's won't display :\
 
Dj_Jestar said:
So have I got this right .. to install stuff, I add the keyword to the USE line in make.conf, rebuild the kernel and it will install it when I next recompile? (for anything within portage?)

I know I can emerge <modname> but from what I am reading, it's best to use in kernel?

Also need to sort out images.. gif's and png's won't display :\
I think you need to read the documentation carefully. You havn't appeared to grasped how portage works yet, which is quite important.

USE flags will enable (and disable) certain configuration parameters of packages that are being compiled. This allows you to build packages with only the support you want in them, producing smaller binaries or binaries with fewer dependencies.

To emerge you simply need to "emerge <pkg-name>". For an easy to search portage tree I recommend http://gentoo-portage.com/. Emerging is for any package, not just kernel modules.

Generally you won't need to emerge kernel modules except in a few specific cases, like with laptops. Because you have used genkernel your kernel should contain all the hardware support you require. However I recommend soon learning how to compile you own kernel without genkernel (add a new entry to the boot loader when you do this, as a back up).

With gentoo, when you do something, try to find out why you are doing it, or you will very quickly have a borked system.

Good luck, and just post up any questions you have. As for images, not sure what the problem is, have you emerged a package to view images?
 
I have grasped Portage - I was asking after seeing that some packages come with the kernel sources already, thus was asking if it's better to compile in-kernel (to avoid needing to compile and modprobe after any/every kernel compile) or to go with emerging individual modules (to have latest version, but need to compile aside from kernel)

Still no success with nForce2 and ALSA though, but was trying for the built-in driver that comes with 2.6.. ditched that now, am going for the emerge alsa-driver instead, and am installing gtk+ to get gif's working.
 
Last edited:
Dj_Jestar said:
I have grasped Portage - I was asking after seeing that some packages come with the kernel sources already, thus was asking if it's better to compile in-kernel (to avoid needing to compile and modprobe after any/every kernel compile) or to go with emerging individual modules (to have latest version, but need to compile aside from kernel)

Still no success with nForce2 and ALSA though, but was trying for the built-in driver that comes with 2.6.. ditched that now, am going for the emerge alsa-driver instead, and am installing gtk+ to get gif's working.

Ah I see. I always compile into the kernel for speed and size. There is never going to be a time when you don't want nforce2 or alsa modules loaded, which generally means it is preferable to build them into the kernel. I'm not sure how far behind the kernel versions are compared to the modules, but some such as nforce2 will probably be very similar. What trouble were you having compiling into the kernel? If you are using genkernel, then you may have to go the emerge module route. I don't know much about genkernel, but from what I've heard it's not great.

It's nice to see new gentoo users though, what with most people going the ubuntu route these days.
 
Indeed, and even though I'm having difficulties (I installed Gentoo on Friday evening.. during my first compile it killed the box, CMOS was reset to factory settings and everything!) I'm still liking it and understand that a lot of the problems I am having are due to my lack of knowledge/know how. I've noticed the speed of Gentoo is just glorious, especially compared to Ubuntu and as I am a control freak, I am just inlove with the fact that Gentoo doesn't install the kitchen sink unless you tell it to :)

The problems I'm having seem to be quite 'common' but all the common fixes haven't worked for me.. I'm receiving the usual errors of "unknown symbol" when the modules are being modprobed (by genkernel)

These are the errors received when trying to start alsaconf:
Code:
Running modules-update... 
Loading driver... 
 * Loading ALSA modules ... 
 *   Loading: snd-card-0 ... 
WARNING: Error inserting snd_timer (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/snd-timer.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
WARNING: Error inserting snd_pcm (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/snd-pcm.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
WARNING: Error inserting snd_ac97_codec (/lib/modules/2.6.17-gentoo-r8/kernel/sound/pci/ac97/snd-ac97-codec.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
FATAL: Error inserting snd_intel8x0 (/lib/modules/2.6.17-gentoo-r8/alsa-driver/pci/snd-intel8x0.ko): Unknown symbol in module, or unknown parameter (see dmesg)             [ !! ] 
 *   Loading: snd-pcm-oss ... 
WARNING: Error inserting snd_mixer_oss (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/oss/snd-mixer-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
WARNING: Error inserting snd_timer (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/snd-timer.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
WARNING: Error inserting snd_pcm (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/snd-pcm.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
FATAL: Error inserting snd_pcm_oss (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/oss/snd-pcm-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg)         [ !! ] 
 *   Loading: snd-mixer-oss ... 
FATAL: Error inserting snd_mixer_oss (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/oss/snd-mixer-oss.ko): Unknown symbol in module, or unknown parameter (see dmesg)     [ !! ] 
 *   Loading: snd-seq ... 
WARNING: Error inserting snd_timer (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/snd-timer.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
FATAL: Error inserting snd_seq (/lib/modules/2.6.17-gentoo-r8/alsa-driver/acore/seq/snd-seq.ko): Unknown symbol in module, or unknown parameter (see dmesg)                 [ !! ] 
 *   Loading: snd-seq ... 
WARNING: Error inserting snd_timer (/lib/modules/2.6.17-gentoo-r8/kernel/sound/core/snd-timer.ko): Unknown symbol in module, or unknown parameter (see dmesg) 
FATAL: Error inserting snd_seq (/lib/modules/2.6.17-gentoo-r8/alsa-driver/acore/seq/snd-seq.ko): Unknown symbol in module, or unknown parameter (see dmesg)                 [ !! ] 
 * ERROR: Failed to load necessary drivers                                                                                                                                  [ ok ] 
 * Restoring Mixer Levels ... 
 * No mixer config in /etc/asound.state, you have to unmute your card!                                                                                                      [ ok ] 
Setting default volumes... 
amixer: Mixer attach default error: No such device 
Saving the mixer setup used for this in /etc/asound.state. 
/usr/sbin/alsactl: save_state:1163: No soundcards found...

Here is some (of the 100's) of dmesg's:
Code:
localhost ~ # dmesg | grep snd_ 
snd_timer: Unknown symbol snd_oss_info_register 
snd_pcm: Unknown symbol snd_timer_notify 
snd_pcm: Unknown symbol snd_timer_interrupt 
snd_pcm: Unknown symbol snd_timer_new 
snd_ac97_codec: Unknown symbol snd_interval_refine 
snd_ac97_codec: Unknown symbol snd_pcm_hw_rule_add 
snd_intel8x0: Unknown symbol snd_ac97_pcm_close 
snd_intel8x0: Unknown symbol snd_ac97_resume 
snd_intel8x0: Unknown symbol snd_pcm_new


and the emerge --info dump:
Code:
localhost ~ # emerge --info 
Portage 2.1-r2 (default-linux/x86/2006.1, gcc-4.1.1, glibc-2.4-r3, 2.6.17-gentoo-r8 i686) 
================================================================= 
System uname: 2.6.17-gentoo-r8 i686 AMD Athlon(tm) XP 1500+ 
Gentoo Base System version 1.12.1 
app-admin/eselect-compiler: [Not Present] 
dev-java/java-config: [Not Present] 
dev-lang/python:     2.4.3-r1 
dev-python/pycrypto: 2.0.1-r5 
dev-util/ccache:     [Not Present] 
dev-util/confcache:  [Not Present] 
sys-apps/sandbox:    1.2.17 
sys-devel/autoconf:  2.13, 2.59-r7 
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2 
sys-devel/binutils:  2.16.1-r3 
sys-devel/gcc-config: 1.3.13-r3 
sys-devel/libtool:   1.5.22 
virtual/os-headers:  2.6.11-r2 
ACCEPT_KEYWORDS="x86" 
AUTOCLEAN="yes" 
CBUILD="i686-pc-linux-gnu" 
CFLAGS="-O2 -march=athlon-xp -pipe" 
CHOST="i686-pc-linux-gnu" 
CONFIG_PROTECT="/etc /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config" 
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/terminfo" 
CXXFLAGS="-O2 -march=athlon-xp -pipe" 
DISTDIR="/usr/portage/distfiles" 
FEATURES="autoconfig distlocks metadata-transfer sandbox sfperms strict" 
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk " 
MAKEOPTS="-j2" 
PKGDIR="/usr/portage/packages" 
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'" 
PORTAGE_TMPDIR="/var/tmp" 
PORTDIR="/usr/portage" 
SYNC="rsync://rsync.europe.gentoo.org/gentoo-portage" 
USE="x86 X alsa berkdb bitmap-fonts cli crypt cups dlloader dri dvd fortran gdbm gpm hal ipv6 isdnlog kde libg++ ncurses nls nptl nptlonly opengl oss pam pcre perl ppds pppd python qt readline reflection session spl ssl symlink tcpd truetype-fonts type1-fonts udev unicode xorg zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_apm video_cards_ark video_cards_ati video_cards_chips video_cards_cirrus video_cards_cyrix video_cards_dummy video_cards_fbdev video_cards_glint video_cards_i128 video_cards_i740 video_cards_i810 video_cards_imstt video_cards_mga video_cards_neomagic video_cards_nsc video_cards_nv video_cards_rendition video_cards_s3 video_cards_s3virge video_cards_savage video_cards_siliconmotion video_cards_sis video_cards_sisusb video_cards_tdfx video_cards_tga video_cards_trident video_cards_tseng video_cards_v4l video_cards_vesa video_cards_vga video_cards_via video_cards_vmware video_cards_voodoo" 
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

(Note, I've got an XP2700+ - the setting was still factory in CMOS, changed now, and my USE string is a lot longer, but am not at home so can't copy atm)
 
Thats a lot of errors. Are you using the onboard sound? Is it the nivida sound you are trying to use. At the moment it appears the only sound driver modules that are compiled are ac97 and intel8x0. Although this shouldn't cause those errors, without the correct modules, it's never going to work.

Unfortunately with my lack of genkernel knowledge I can't really help. But I would recommend you move onto compiling your own kernel. It will give you a lot tighter control of your kernel, and should make it smaller, and you'll learn a lot about your system. Do make sure you keep your genkernel and grub entry so you have a backup to boot to.

If you don't want to go that route, then deffinately emerge the drivers, because either way its a module which will need loading.
 
Yeah, I read somewhere it might be due to needing a gcc lib or some such.

I am looking into making my own kernel, just not had the time to research it thus far and am hoping to get this working prior to doing so, as like you say I'd like a working install before going any further.

the onboard sound is nVidia nForce2, which according to alsa-project.com needs the intel8x0 module, and as far as I can tell, it doesn't have any abnormal dependencies that I haven't already got installed.
 
The unknown symbol sounds to me like the modules are a different version from the running kernel you are trying to insmod into. You got two ways round this really, recompile your modules, or just build the ones you need into the kernel. I would go with the latter, it's just a case of selecting the right hardware and executing a few commands.
 
Last edited:
Aye, I've since gathered that ('work' is such an excellent opportunity to read up on these things :D)

The documentation is a bit confusing at times I find, with so many "If you have x do this, if you have y go here, if you have z skip this" stuff, and as this is a purely hypothetical situation due to not being at the machine.. have I got this order of events right?

Code:
# ln -sfn /usr/src/kernel-source-name-here /usr/src/linux
# cd /usr/src/linux
# make menuconfig
<choose options in menus>
# make && make modules_install
<wait..>
# cp arch/i386/bzImage /boot/kernel-name-here
# nano -w /etc/modules.autoload.d/kernel-2.6
<add modules - should I add intel8x0 here, after checking it is in /etc/lib/kernel-version/modules?>
# nano -w /boot/grub/grub.conf
<add new kernel to boot options>
# reboot
 
Well when you do make menuconfig, you get an ncurses menu. You need to go through that and say yes (y) to all the drivers you want to be compiled into the kernel. If you press m it makes it a module. I don't bother with modules at all.. and just compile everything in I need. Apart from that the steps look the right order yes. Make sure you don't remove anything critical like elf support, else you won't be able to boot into that one. So its worth keeping your old kernel as a grub option incase you can't boot your freshly compiled one.

http://gentoo-wiki.com/HOWTO_Compile_a_Kernel_Manually
 
Last edited:
Thanks, that was the guide I was reading but as I said, all the "if this do that, if that do this, if not do the other" stuff makes it hard to follow sometimes. heh, maybe I'll even rewrite them some time and submit for review.
 
er.. I don't have a /boot/grub/grub.conf file.. I don't even have a /boot/grub dir, but I am defo using grub :<

Code:
# find / -name grub.conf
#

nothing..

Any ideas?

edit.. nvm.. idiot didn't have it mounted.
 
Last edited:
KDE makes baby jesus cry..

Code:
emerge kde

.. 'You need to reemerge kde-libs/qt-3* with USE="opengl"'

1 hour later ponder what the hell it's crying about, trawling though the config.log.. I see it was actually complaining that kde-libs/kdelibs-3.5.2 was not install (and not listed as a dep!) so I emerge that.. 2 hours later, I emerge kde again.

Start time: 10.30pm
Finish time: I'll let you know when it finishes :|
 
Back
Top Bottom