Anyone got a gentoo cheatsheet?

Caporegime
Joined
18 Oct 2002
Posts
29,493
Location
Back in East London
EDIT:

After installing Gentoo.. I decided to make my own Cheatsheet for future use.. I did this with kernel sources 2.6.17-r8, and the Minimal Install CD, for a networked install.. will be making changes as and when I find they need making..

Code:
1.  Insert CD.
2.  Select LiveCD Kernel to boot with, and with optional args (such as nodhcp)
3.  ifconfig eth0 <ip> netmask <mask> brd <ip broadcast>
4.  route add default gw <gateway address>
5.  fdisk (setup partitions - minimum 3 needed, /boot, / and swap. Ensure types set.)
    (N.B. from here on, replace hdxx with the relevant device name.
    Note that /, /boot and swap all need their own partition/device and do not share.)
6.  mkswap /dev/hdxx && swapon
7.  mke2fs -j /dev/hdxx (for both /boot and /)
8.  mkdir /mnt/gentoo/boot
9.  mount /dev/hdxx /mnt/gentoo/boot && mount /dev/hdxx /mnt/gentoo (perform each separately)
10. cd /mnt/gentoo
11. links http://gentoo.blueyonder.co.uk/releases/x86/current/stages/stage3-i686-<version>.tar.bz2
12. tar xvjpf stage3*
13. links http://gentoo.blueyonder.co.uk/snapshots/portage-latest.tar.bz2
14. tar xvjf portage-latest.tar.bz2
15. nano -w /mnt/gentoo/etc/make.conf
16. <add CFLAGS, CXXFLAGS, MAKEOPTS and USE variables with your options>
17. date (!! important - check your system clock/date is correct !!)
18. chroot /mnt/gentoo /bin/bash
19. env-update && source /etc/profile
20. cd /usr/src/linux
21. make menuconfig
22. <select all relevant hardware options from menu and save config>
23. make && make modules_install (and wait for complilation.)
24. cp /arch/i386/boot/bzImage /boot/kernel-<version>-<name> (NOTE: remember what name you give it.)
25. emerge grub
26. nano -w /boot/grub/grub.conf
27. <add your new kernel (using the remembered name) to the list. Use the file grub.conf.example if needed.>
28. exit
29. cd /
30. umount /mnt/gentoo/boot && umount /mnt/gentoo
31. reboot (wihout CD)
32. <select your kernel, cross your fingers and prepare to cheer or cry>


/EDIT


A simple list of install steps I mean.. I don't have the paper for the online handbook :o (I don't want/need all the gubbins inbetween with examples etc.. just the list of commands.. and I'm lazy :D so I don't fancy c+p'ing everything..)

From the i686 live cd (full, not minimal)

Much obliged!

/cue replies "there isn't one"
 
Last edited:
not got that option :)

I'm also getting bored, so have the minimal CD instead..

It's only really the base/kernel install part I need the cheat sheet for really.. (and a list of commands incase I forget them like net-setup blah blah)
 
Ha! Nuked windows by mistake.. frustrating. fdisked in.. saw a nice fat partition with no labels (I delib left vacant) .. enter the shizzle for option 'n'.. windows gone .. :| OcUK looks.. funny, when using 'links' browser on livecd..
 
not got that far yet .. downloading tarball now. I'm guessing all I've done is overwrite the MBR? anyway, gonna go twidlle thumbs until this finished dl'ing.
 
ok, it appears they are there.. but unsure as yet.

Anyway.. I've got the tarball, but I can't untar.. no enough space. I'm in /mnt/gentoo.. where is this in terms of disk/partition and how do I relocate? (or rather, how do I find out?)
 
think I've lost the whole disk tbh, it's reading as a Sun Label Disk and is now showing no partitions (bar 32mb of boot) :s

Won't let do anything with it though, not even blam the lot.
 
*sigh* now I'm getting all kinds of errors with genkernel.. I kicked it off last nigh, went to bed, and returned to pc to find it had shutdown - and reset my cmos to factory settings :s

So booted up.. mounted/chrooted back to where I was.. errors installing.

Re-compile.. spits out errors all over the place. "touch" errors etc. "dyn_unpack" errors.

For both vanilla-sources and gentoo-sources (via emerge)

Fandabbytastic...:(
 
kernel compiled, but kde failed on emerge.. so still stuck with links atm. Anyone know where to adjust the CLI/CGI resolution? Is on 640x480 atm, which is a PITA..
 
I got KDE up, even though it was 'broken' I emerged X11 and opegl, all ok now.

Now just fiddling with init.d and rc-update to get it to open on boot. Gentoo is quick though :)
 
The minimal CD worked well - once I realised I could use links to read the manual whilst installing I was fine :)

I did have a boo-boo though, when creating the partition for gentoo I wiped the whole 250gb disk.. losing Windows (buhu) and a load of my personal stuff.. 9gig of mp3's.. all my web-dev work (a lot was 'new' and hadn't been uploaded anywhere yet :() and a whole heap of stuff I generally found useful that i had aquired over the years. :(
 
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 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:
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)
 
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.
 
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
 
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